[bot] OpenAI Videos API (`videos.create()` / Sora) not instrumented
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 58/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
首先将 js/src/wrappers/oai.ts、js/src/auto-instrumentations/configs/openai.ts、js/src/instrumentation/plugins/openai-channels.ts、js/src/instrumentation/plugins/openai-plugin.ts 和 js/src/vendor-sdk-types/openai.ts 与现有的 provider instrumentation 进行比较。确定应如何表示 create、polling 和 download 的生命周期,然后在 e2e/scenarios/openai-instrumentation/ 下添加覆盖。完成的标准是:videos.create 已按照约定的生命周期完成 instrument,并且 e2e 场景验证生成的 spans。
由索引模型根据 Issue 内容生成。
描述
Summary
The OpenAI Node SDK (openai npm package, >=6.2.0) exposes a GA client.videos.create() API for text-to-video and image-to-video generation using the Sora 2 / Sora 2 Pro models. This is a distinct generative execution surface — separate from chat completions, the Responses API, and images.generate() — and is completely uninstrumented in this repo. Users generating video with Sora through the JS SDK get no Braintrust spans.
This repo already treats the analogous gaps for other providers/modalities as in-scope and trackable:
- OpenAI
images.generate()/images.edit()— open gap braintrustdata/braintrust-sdk-javascript#1628 - Google GenAI
models.generateVideos()(Veo) — open gaps braintrustdata/braintrust-sdk-javascript#2030 / braintrustdata/braintrust-sdk-javascript#2176
The OpenAI videos.* resource is the same category of gap (a dedicated generative media API, distinct from the text/chat path) but for OpenAI specifically, and it is not covered by any of those issues or any other open issue in this repo.
What instrumentation is missing
- Wrapper (
js/src/wrappers/oai.ts): No proxy for thevideosresource. Onlychat.completions,embeddings,moderations, andresponsesare wrapped (confirmed by reading the file — novideoreferences at all). - Auto-instrumentation config (
js/src/auto-instrumentations/configs/openai.ts): No config entry forvideos.create(orvideos.remix/videos.retrieve). The file only instrumentschat.completions.create,embeddings.create,chat.completions.parse,moderations.create,chat.completions.stream, and theresponses.*family. - Channels (
js/src/instrumentation/plugins/openai-channels.ts): No channel definitions for video generation (confirmed — novideoreferences). - Plugin (
js/src/instrumentation/plugins/openai-plugin.ts): No handler for video generation calls. - Vendor types (
js/src/vendor-sdk-types/openai.ts): NoVideos/VideoCreateParamstypes. - e2e: No test scenario under
e2e/scenarios/openai-instrumentation/exercises video generation.
Upstream reference
- OpenAI Videos API reference: https://developers.openai.com/api/reference/resources/videos/methods/create
- Video generation guide: https://developers.openai.com/api/docs/guides/video-generation
client.videos.create({ model, prompt, size, seconds, input_reference })—modelacceptssora-2/sora-2-pro; returns a video job object (object: "video", withid,status,created_at,model) that is polled viavideos.retrieve(id)until the render completes, then downloaded viavideos.downloadContent(id).- This is a stable, GA, production API available in
openaiNode SDK>=6.2.0— well within this repo's already-supportedopenaiversion range (>=4.0.0, and the repo's own dev-pin is[email protected], which already includes this resource). - Similar to
models.generateVideos()in Google GenAI, this uses a long-running-operation/polling pattern rather than a single synchronous response — instrumentation will likely need to decide whether to span just the initialcreate()call or track the full poll-to-completion lifecycle (the existing google-genai-generate-videos issues note the same design question).
Braintrust docs status
not_found — Fetched https://www.braintrust.dev/docs/integrations/ai-providers/openai directly: it documents chat completions, embeddings (via gateway), audio transcriptions, images, structured outputs, and function calling as traced via wrapOpenAI, but does not mention videos.create, Sora, or any video generation capability anywhere.
Local repo files inspected
js/src/wrappers/oai.ts— novideoreferencesjs/src/auto-instrumentations/configs/openai.ts— full method list confirmed (chat completions, embeddings, parse, moderations, stream, responses create/stream/parse/compact); no videos entryjs/src/instrumentation/plugins/openai-channels.ts— novideoreferencesjs/src/vendor-sdk-types/openai.ts— novideo/Videoreferencese2e/scenarios/openai-instrumentation/— no video generation scenario- Full repo grep for
video/Videounderjs/src/— only unrelated matches inattachment-utils.ts,google-genai.tsvendor types, andstrands-agent-sdkfiles; none reference OpenAI's videos resource
- 主要语言
- TypeScript
- 星标
- 29
- 派生
- 16
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 70
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-javascript 的其他 Issue
-
typescript
难度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-javascript#2578 ·
维护者通常 1 天内回复
-
typescript
难度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-javascript#2577 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-javascript#2527 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 65/100
braintrustdata/braintrust-sdk-javascript#2526 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 56/100
braintrustdata/braintrust-sdk-javascript#2482 ·
维护者通常 1 天内回复
查看 braintrustdata/braintrust-sdk-javascript 的全部 Issue
相似的 Issue
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagree未关闭
难度 2/5 1-3 小时 新手友好度 68/100
sidorares/react-x11-components#764 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
backnotprop/plannotator#1840 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
JoviDeCroock/pracht#432 ·
维护者通常 1 天内回复
-
approved check:passed streams:add
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
Hardware attribute name "app Connection Support" has inconsistent casing可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
walletbeat/walletbeat#1628 ·
维护者通常 1 天内回复