[bot] LiteLLM: Batches API passthrough (`create_batch`/`retrieve_batch`/`list_batches`/`cancel_batch`) not instrumented
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 22
- フォーク
- 30
- 平均マージ
- 9時間
- マージ済み PR(30日)
- 128
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
braintrustdata/braintrust-sdk-python のほかの issue
-
Temporal: add `workflow.Info.original_execution_run_id` to workflow span metadata対応中かも @Mohith26 が 3 日前に担当しました。 オープンfeature python
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
braintrustdata/braintrust-sdk-python#868 ·
メンテナーはふだん 1 日以内に返信
-
python
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
braintrustdata/braintrust-sdk-python#1038 ·
メンテナーはふだん 1 日以内に返信
-
new-integration python
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
braintrustdata/braintrust-sdk-python#999 ·
メンテナーはふだん 1 日以内に返信
-
python
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
braintrustdata/braintrust-sdk-python#957 ·
メンテナーはふだん 1 日以内に返信
-
python
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
braintrustdata/braintrust-sdk-python#956 ·
メンテナーはふだん 1 日以内に返信
braintrustdata/braintrust-sdk-python の issue をすべて見る
似ている issue
-
community enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Hochfrequenz/sapgui.mcp#1039 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
didi/helixharness#18 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dataforgoodfr/democracy-watch#46 · リアクション 1 件 ·