[bot] OpenAI Videos API (Sora video generation) not instrumented
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 72/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- ruby
调研方向
从 lib/braintrust/contrib/openai/patcher.rb 开始,将现有的 ChatPatcher、ResponsesPatcher 和 ModerationsPatcher 实现与 lib/braintrust/contrib/openai/instrumentation/ 进行比较。Issue #147 提供了 Images API 的对应模式。完成标准是:为 create、edit、extend_ 和 remix 添加 instrumentation,并包含指定的 inputs、metadata、outputs 和 latency;retrieve 的轮询仍不在范围内。
由索引模型根据 Issue 内容生成。
描述
Summary
The OpenAI Ruby SDK exposes a stable videos resource for Sora video generation (client.videos.create, edit, extend_, remix). None of these generative execution methods are instrumented by the Braintrust Ruby SDK. This is the same class of gap as the already-filed Images API issue (#147), but for video generation.
What is missing
The official openai gem provides OpenAI::Resources::Videos with four generative execution methods:
client.videos.create(prompt:, model:, seconds:, size:, ...)— Initiates a video generation job from a text prompt. Uses Sora-2 or Sora-2-pro models. ReturnsOpenAI::Models::Videowith a job ID and status.client.videos.edit(video_id:, prompt:, ...)— Edits an existing video using a text prompt.client.videos.extend_(video_id:, ...)— Extends a completed video with additional generated segments.client.videos.remix(video_id:, prompt:, ...)— Remixes a completed video using a new prompt.
None of these are patched. The existing openai patcher (lib/braintrust/contrib/openai/patcher.rb) registers ChatPatcher, ResponsesPatcher, and ModerationsPatcher only.
What a span should capture
Video generation spans (client.videos.create) should capture:
- Input: the text prompt
- Metadata: model (
sora-2,sora-2-pro), seconds (clip duration), size (resolution), provider (openai), endpoint (/v1/videos/generations) - Output: the returned
Videoobject'sidandstatus - Metrics: latency of the create call
Video editing spans (edit, remix) follow the same pattern with an additional video_id input.
Note: The Videos API is async/job-based — create returns immediately with a job ID; video generation completes asynchronously. Instrumentation of create captures the initiation; retrieve polls are CRUD and out of scope.
Braintrust docs status
not_found — The Braintrust OpenAI integration docs at https://www.braintrust.dev/docs/integrations/ai-providers/openai and https://www.braintrust.dev/docs/guides/tracing do not mention video generation or the Sora API. All documented examples cover chat completions and audio.
Upstream sources
- Official OpenAI Ruby SDK
Videosresource: https://github.com/openai/openai-ruby/blob/main/lib/openai/resources/videos.rb — exposescreate,edit,extend_,remix,retrieve,list,delete,download_content - OpenAI Sora-2 model docs: https://developers.openai.com/api/docs/models/sora-2
- OpenAI API reference — Video generation: https://platform.openai.com/docs/api-reference/video-generation
Local repo files inspected
lib/braintrust/contrib/openai/patcher.rb— definesChatPatcher,ResponsesPatcher,ModerationsPatcher; noVideosPatcherlib/braintrust/contrib/openai/instrumentation/— containschat.rb,responses.rb,moderations.rb,common.rb; novideos.rb- Grep for
video,sora,Videosacrosslib/braintrust/returns zero matches - Issue #147 (OpenAI Images API not instrumented) demonstrates the equivalent existing gap for images — the same pattern applies here for video generation
- 主要语言
- Ruby
- 星标
- 9
- 派生
- 10
- 平均合并
- 3 天 43 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-ruby 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
ruby
难度 4/5 3-5 天 新手友好度 48/100
-
ruby
难度 4/5 3-5 天 新手友好度 48/100
查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Homebrew/homebrew-cask#293134 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
notch8/iiif_print#430 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
ActionText::Content#to_markdown: <br> in a table cell and empty <tr> produce malformed Markdown tables可能已有人在做 @azmi2409 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 2 天内回复