[bot] Groq Batch API (`client.batches`) is not instrumented
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start in js/src/instrumentation/plugins/groq-plugin.ts by reading GroqPlugin.onEnable() and the existing synchronous channels, then compare with groq-interceptors.ts to see how channel handlers create spans. Read js/src/wrappers/groq.ts around groqProxy() to confirm where client.batches currently falls through unwrapped, and model batch types in js/src/vendor-sdk-types/groq.ts. Done means batches.create, batches.retrieve, and result retrieval via files.content produce spans consistent with existing Groq instrumentation, with tests covering the lifecycle.
由索引模型根据 Issue 内容生成。
描述
Summary
Groq's official SDK exposes a documented Batch API (groq.batches.create()/.retrieve(), plus groq.files.content() for results) for submitting async chat-completion, audio-transcription, and audio-translation jobs with a configurable completion window. This repo instruments every one of Groq's synchronous execution surfaces (chat, embeddings, audio speech/transcription/translation) but has zero coverage of the batch lifecycle.
What's missing
js/src/instrumentation/plugins/groq-plugin.ts—GroqPlugin.onEnable()(lines 37-172) subscribes to exactly five channels:chatCompletionsCreate,embeddingsCreate,audioSpeechCreate,audioTranscriptionsCreate,audioTranslationsCreate. Nobatch-related channel exists in the file.js/src/instrumentation/plugins/groq-interceptors.ts— grepped forbatch/Batch(case-insensitive): zero matches. NogroqChannels.batch*exists.js/src/vendor-sdk-types/groq.ts— grepped forbatch/Batch(case-insensitive): zero matches. NoGroqBatch/GroqBatchJobtype is modeled anywhere.js/src/wrappers/groq.ts—wrapGroq()/groqProxy()(lines 74-205) proxies onlychat.completions,embeddings, andaudio.{speech,transcriptions,translations}(lines 80-167). A client'sbatchesproperty is returned unwrapped through the top-level proxy's generic function-binding fallback (lines 169-201), soclient.batches.create(...)produces no span: no submission span, no status/polling span, no per-request result spans.
This means a customer submitting client.batches.create({ endpoint: "/v1/chat/completions", completion_window: "24h", input_file_id }) — a fully supported, documented Groq API call — gets no trace in Braintrust whatsoever, while the same customer's synchronous chat.completions.create calls are fully traced with input, output, and token/timing metrics.
Braintrust docs status
not_found. https://www.braintrust.dev/docs/providers/groq documents only synchronous spans: "Chat completion spans... Embedding spans... Audio speech spans... Audio transcription spans... Audio translation spans," plus streaming and time_to_first_token behavior. No batch/async-job tracing is mentioned anywhere on the page.
Upstream sources
- https://console.groq.com/docs/batch — Batch API guide:
groq.batches.create()requiresendpoint,completion_window("24h"through"7d"), andinput_file_id; supported endpoints are/v1/chat/completions,/v1/audio/transcriptions,/v1/audio/translations; status viagroq.batches.retrieve(); results retrieved viagroq.files.content(output_file_id).
Braintrust docs sources checked
- https://www.braintrust.dev/docs/providers/groq
- https://www.braintrust.dev/docs/guides/tracing/integrations
Local repo files inspected
js/src/instrumentation/plugins/groq-plugin.ts—GroqPlugin.onEnable()(lines 37-172), full enumerated channel listjs/src/instrumentation/plugins/groq-interceptors.ts— grepped forbatch/Batch, zero matchesjs/src/vendor-sdk-types/groq.ts— grepped forbatch/Batch, zero matchesjs/src/wrappers/groq.ts—groqProxy()(lines 74-205), proxy coverage limited tochat.completions/embeddings/audio.*
- 主要语言
- TypeScript
- 星标
- 29
- 派生
- 21
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 76
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-javascript 的其他 Issue
-
typescript
难度 4/5 3-5 天 新手友好度 45/100
braintrustdata/braintrust-sdk-javascript#2685 ·
维护者通常 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 于 14 天前认领。 未关闭
难度 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
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 67/100
anthropics/claude-code#106183 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
feature:App-Tour feature:Chat ready Web
难度 2/5 1-3 小时 新手友好度 62/100
digitalfabrik/integreat-app#4523 · 2 个 reaction ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Required Lexical field accepts two empty paragraphs可能已有人在做 @lazerg 今天认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 76/100
payloadcms/payload#19222 ·
维护者通常 1 天内回复