[bot] Mistral Batch API (`client.batch.jobs`) is not instrumented
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript, typescript
- 領域
- observability, tooling
研究方向
Start by reading js/src/instrumentation/plugins/mistral-interceptors.ts to see how existing Mistral channels are declared, then mistral-plugin.ts to see how they are subscribed. Compare js/src/wrappers/mistral.ts and js/src/vendor-sdk-types/mistral.ts to understand how the batch namespace is currently unwrapped and typed. Done means client.batch.jobs.create/get/list and result download produce spans consistent with the existing chat and embeddings instrumentation, with tests covering the batch lifecycle.
由索引模型根據 Issue 內容生成。
描述
Summary
Mistral's official TypeScript SDK exposes a documented Batch API (client.batch.jobs.create()/.get()/.list(), plus client.files.download() for results) for submitting large-scale async chat, embeddings, FIM, moderation, classification, OCR, and conversation jobs. This repo instruments every one of Mistral's synchronous execution surfaces but has zero coverage of the batch lifecycle — no channel, no plugin logic, no vendor type.
What's missing
js/src/instrumentation/plugins/mistral-plugin.ts—MistralPlugin.onEnable()/subscribeToMistralChannels()(lines 24-277) subscribes to exactly ten channels:chatComplete,chatStream,embeddingsCreate,classifiersModerate,classifiersModerateChat,classifiersClassify,classifiersClassifyChat,fimComplete,fimStream,agentsComplete,agentsStream. There is nobatch-related channel anywhere in the file.js/src/instrumentation/plugins/mistral-interceptors.ts— grepped forbatch/Batch(case-insensitive): zero matches. NomistralChannels.batch*exists for the plugin to subscribe to in the first place.js/src/vendor-sdk-types/mistral.ts—MistralClient(lines 222-229) is typed as{ chat?, fim?, agents?, embeddings?, classifiers?, [key: string]: unknown }. There is nobatchnamespace type at all (noMistralBatch,MistralBatchJob, etc.), so even an untyped passthrough isn't modeled.js/src/wrappers/mistral.ts—wrapMistral()/mistralProxy()(lines 85-108) proxies onlychat,fim,agents,embeddings,classifiers. A client'sbatchproperty is returned as-is via the proxy'sdefaultbranch (Reflect.get, line 104) — fully unwrapped, soclient.batch.jobs.create(...)produces no span of any kind: no submission span, no status/polling span, no per-request result spans.
This means a customer submitting client.batch.jobs.create({ endpoint: "/v1/chat/completions", inputFiles: [...] }) — a fully supported, documented Mistral API call — gets no trace in Braintrust whatsoever, while the same customer's synchronous chat.complete/embeddings.create calls are fully traced with input, output, and token metrics.
Braintrust docs status
not_found. https://www.braintrust.dev/docs/providers/mistral documents only synchronous spans: "Chat completion spans (mistral.chat.complete...)", "Embedding spans (mistral.embeddings.create)", "Fill-in-the-middle completion spans", "Audio transcription spans." The page's "All call types support sync and async variants" line refers to Python's asyncio client variants, not batch jobs. No batch/async-job tracing is mentioned anywhere on the page.
Upstream sources
- https://docs.mistral.ai/capabilities/batch/ — Batch API guide:
client.batch.jobs.create()acceptsinput_files(file-based, up to 1,000,000 requests) or inlinerequests(up to 10,000); supportsendpointvalues/v1/embeddings,/v1/chat/completions,/v1/fim/completions,/v1/moderations,/v1/chat/moderations,/v1/ocr,/v1/classifications,/v1/conversations,/v1/audio/transcriptions; status viaclient.batch.jobs.get()/.list(); results retrieved viaclient.files.download().
Braintrust docs sources checked
- https://www.braintrust.dev/docs/providers/mistral
- https://www.braintrust.dev/docs/guides/tracing/integrations
Local repo files inspected
js/src/instrumentation/plugins/mistral-plugin.ts—subscribeToMistralChannels()(lines 24-277), full enumerated channel listjs/src/instrumentation/plugins/mistral-interceptors.ts— grepped forbatch/Batch, zero matchesjs/src/vendor-sdk-types/mistral.ts—MistralClienttype (lines 222-229)js/src/wrappers/mistral.ts—mistralProxy()(lines 85-108), proxy coverage limited tochat/fim/agents/embeddings/classifiers
- 主要語言
- TypeScript
- 星號
- 29
- 分支
- 22
- 平均合併
- 1 天 15 小時
- 30 天內合併 PR
- 76
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
braintrustdata/braintrust-sdk-javascript 的其他 Issue
-
typescript
難度 3/5 1-2 天 新手友好度 45/100
braintrustdata/braintrust-sdk-javascript#2686 ·
維護者通常 1 天內回覆
-
[bot] Cloudflare Workers AI `queueRequest` (batch) inference is explicitly excluded from tracing未關閉cloudflare typescript
難度 4/5 3-5 天 新手友好度 30/100
braintrustdata/braintrust-sdk-javascript#2684 ·
維護者通常 1 天內回覆
-
High TypeScript checking cost from generated Zod 3 schemas可能已有人在做 @lforst 於 16 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 22/100
braintrustdata/braintrust-sdk-javascript#2624 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
[bot] Instrument Luma AI (17,324 weekly downloads)可能重新可做 關聯的 PR 已關閉且未合併。 未關閉typescript
難度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-javascript#2578 ·
維護者通常 1 天內回覆
-
[bot] Instrument Letta Agent SDK (87,205 weekly downloads)可能重新可做 關聯的 PR 已關閉且未合併。 未關閉typescript
難度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-javascript#2577 ·
維護者通常 1 天內回覆
查看 braintrustdata/braintrust-sdk-javascript 的全部 Issue
相似的 Issue
-
enhancement tech debt
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
danielmiessler/LifeOS#2533 ·
維護者通常 9 天內回覆
-
auto:producer auto:uiux
難度 2/5 1-3 小時 新手友好度 78/100
fritzprix/libr-agent#2447 ·
維護者通常 1 天內回覆
-
bug low priority
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100