[bot] LiteLLM: Batches API passthrough (`create_batch`/`retrieve_batch`/`list_batches`/`cancel_batch`) not instrumented
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- observability
Línea de trabajo
Start with py/src/braintrust/integrations/litellm/patchers.py, where each existing LiteLLM entry point (for example the embedding patcher) is registered in _ALL_LITELLM_PATCHERS, then read the matching wrapper in tracing.py. The batch functions need a span shape for asynchronous jobs that span several calls, so decide that design with maintainers first. Done means create, retrieve, list and cancel (sync and async) each produce a span, with tests built on the existing cassette setup.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
LiteLLM ships a documented Batches API passthrough surface — litellm.create_batch / litellm.acreate_batch, litellm.retrieve_batch / litellm.aretrieve_batch, litellm.list_batches / litellm.alist_batches, and litellm.cancel_batch / litellm.acancel_batch — which proxies real async batch-inference jobs to the underlying provider's Batch API (OpenAI, Azure OpenAI, Vertex AI, Bedrock, Mistral, vLLM, xAI). This is a distinct execution surface from litellm.batch_completion (client-side fan-out over concurrent completion() calls, tracked separately and closed not_planned in #755 because it already produces spans via the patched completion function).
The Braintrust LiteLLM integration (py/src/braintrust/integrations/litellm/) instruments 22 patchers across 11 top-level entry points (completion/acompletion, text_completion/atext_completion, responses/aresponses, decisions/adecisions (+ systemone/asystemone aliases), image_generation/aimage_generation, embedding/aembedding, moderation/amoderation, speech/aspeech, transcription/atranscription, rerank/arerank), but has no patcher for any of the 8 Batches API functions. Calls made through create_batch/retrieve_batch/list_batches/cancel_batch (or their async variants) produce zero Braintrust spans — no batch submission metadata, no status, no linkage to the resulting generations.
What is missing
| LiteLLM function | Description | Instrumented? |
|---|---|---|
litellm.completion / .acompletion |
Single-call chat completion | Yes |
litellm.create_batch / .acreate_batch |
Submit an async batch inference job to the underlying provider's Batch API | No |
litellm.retrieve_batch / .aretrieve_batch |
Poll batch job status/result metadata | No |
litellm.list_batches / .alist_batches |
List batch jobs | No |
litellm.cancel_batch / .acancel_batch |
Cancel a batch job | No |
Braintrust docs status
not_found. The Braintrust LiteLLM integration page (https://www.braintrust.dev/docs/integrations/sdk-integrations/litellm) explicitly enumerates the entry points it patches — completion, acompletion, text_completion, atext_completion, responses, aresponses, image_generation, aimage_generation, embedding, aembedding, moderation, amoderation, speech, aspeech, transcription, atranscription, rerank, arerank — with no mention of create_batch/retrieve_batch/list_batches/cancel_batch anywhere on the page.
Upstream sources
- LiteLLM Batches API docs: https://docs.litellm.ai/docs/batches — documents
create_batch/acreate_batch,retrieve_batch/aretrieve_batch,list_batches/alist_batches,cancel_batch/acancel_batchas current, actively maintained functions proxying to OpenAI, Azure, Vertex AI, Bedrock, Mistral, vLLM, and xAI batch endpoints. - Confirmed actively maintained via recent upstream PRs, e.g.
fix(vertex_ai): honor timeout on batch create, retrieve, list and cancel(BerriAI/litellm#47322) andfix(batches): register ownership for every batch create path(BerriAI/litellm#39810).
Local repo files inspected
py/src/braintrust/integrations/litellm/patchers.py— defines 22 patchers (LiteLLMCompletionPatcherthroughLiteLLMArerankPatcher); no batch patcher exists.py/src/braintrust/integrations/litellm/tracing.py— wrapper implementations for all currently-patched entry points; no batch wrapper functions.py/src/braintrust/integrations/litellm/integration.py—LiteLLMIntegration.patchersis sourced entirely from_ALL_LITELLM_PATCHERSinpatchers.py.py/src/braintrust/wrappers/litellm.py— grep for "batch" (case-insensitive): zero matches.- Grep for "batch" (case-insensitive) across
py/src/braintrust/integrations/litellm/: only one incidental match inside a cassette YAML (unrelated content string); no code or test references tocreate_batch/retrieve_batch/list_batches/cancel_batch.
Relationship to existing issues
- #755 (closed, not_planned) covers
litellm.batch_completion/batch_completion_modelsspecifically — a client-side concurrent-fan-out helper that already produces spans via the patchedcompletion()function. This issue is about the separate, real async Batches API passthrough (create_batchet al.), which has no instrumentation path today since it doesn't callcompletion()internally.
- Lenguaje dominante
- Python
- Estrellas
- 22
- Forks
- 30
- Merge medio
- 9 h
- PR fusionados (30 d)
- 128
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de braintrustdata/braintrust-sdk-python
-
Temporal: add `workflow.Info.original_execution_run_id` to workflow span metadataPosiblemente ocupada @Mohith26 la tomó hace 3 días. Abiertofeature python
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
braintrustdata/braintrust-sdk-python#868 ·
Los mantenedores suelen responder en 1 día
-
python
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
braintrustdata/braintrust-sdk-python#1038 ·
Los mantenedores suelen responder en 1 día
-
new-integration python
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
braintrustdata/braintrust-sdk-python#999 ·
Los mantenedores suelen responder en 1 día
-
python
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
braintrustdata/braintrust-sdk-python#957 ·
Los mantenedores suelen responder en 1 día
-
python
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
braintrustdata/braintrust-sdk-python#956 ·
Los mantenedores suelen responder en 1 día
Todos los issues de braintrustdata/braintrust-sdk-python
Issues similares
-
community enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Hochfrequenz/sapgui.mcp#1039 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
didi/helixharness#18 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
API /search : typer la réponseAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dataforgoodfr/democracy-watch#46 · 1 reacción ·