Files
litellm/litellm/batch_completion
Emerson Gomes 8f242c42a1 fix(batch_completion): submit all model futures before waiting (#20705)
* fix(batch_completion): submit all model futures before waiting

* test: add batch_completion all responses concurrency regression

* fix(batch_completion): continue collecting responses on per-model failures

* fix(batch_completion): handle empty and string models in all responses

* test(batch_completion): avoid blocking wait in concurrency regression
2026-02-11 15:44:37 +05:30
..

Implementation of litellm.batch_completion, litellm.batch_completion_models, litellm.batch_completion_models_all_responses

Doc: https://docs.litellm.ai/docs/completion/batching

LiteLLM Python SDK allows you to:

  1. litellm.batch_completion Batch litellm.completion function for a given model.
  2. litellm.batch_completion_models Send a request to multiple language models concurrently and return the response as soon as one of the models responds.
  3. litellm.batch_completion_models_all_responses Send a request to multiple language models concurrently and return a list of responses from all models that respond.