Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[bot] Groq Batch API (`client.batches`) is not instrumented

未关闭
#2,686 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 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 内容生成。

描述

typescript

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. No batch-related channel exists in the file.
  • js/src/instrumentation/plugins/groq-interceptors.ts — grepped for batch/Batch (case-insensitive): zero matches. No groqChannels.batch* exists.
  • js/src/vendor-sdk-types/groq.ts — grepped for batch/Batch (case-insensitive): zero matches. No GroqBatch/GroqBatchJob type is modeled anywhere.
  • js/src/wrappers/groq.ts — wrapGroq()/groqProxy() (lines 74-205) proxies only chat.completions, embeddings, and audio.{speech,transcriptions,translations} (lines 80-167). A client's batches property is returned unwrapped through the top-level proxy's generic function-binding fallback (lines 169-201), so client.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() requires endpoint, completion_window ("24h" through "7d"), and input_file_id; supported endpoints are /v1/chat/completions, /v1/audio/transcriptions, /v1/audio/translations; status via groq.batches.retrieve(); results retrieved via groq.files.content(output_file_id).

Braintrust docs sources checked

Local repo files inspected

  • js/src/instrumentation/plugins/groq-plugin.ts — GroqPlugin.onEnable() (lines 37-172), full enumerated channel list
  • js/src/instrumentation/plugins/groq-interceptors.ts — grepped for batch/Batch, zero matches
  • js/src/vendor-sdk-types/groq.ts — grepped for batch/Batch, zero matches
  • js/src/wrappers/groq.ts — groqProxy() (lines 74-205), proxy coverage limited to chat.completions/embeddings/audio.*
主要语言
TypeScript
星标
29
派生
21
平均合并
1 天 15 小时
30 天内合并 PR
76

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

braintrustdata/braintrust-sdk-javascript 的其他 Issue

查看 braintrustdata/braintrust-sdk-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。