[bot] OpenAI Videos API (Sora video generation) not instrumented
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- ruby
- Domain
- backend-api-design, observability
Research direction
Start with lib/braintrust/contrib/openai/patcher.rb and compare the existing ChatPatcher, ResponsesPatcher, and ModerationsPatcher implementations with lib/braintrust/contrib/openai/instrumentation/. Issue #147 provides the analogous Images API pattern. Done means create, edit, extend_, and remix are instrumented with the specified inputs, metadata, outputs, and latency, while retrieve polling remains out of scope.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Ruby
- Stars
- 9
- Forks
- 10
- Avg merge
- 3d 43m
- Merged PRs (30d)
- 9
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from braintrustdata/braintrust-sdk-ruby
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
ruby
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
ruby
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in braintrustdata/braintrust-sdk-ruby
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 85/100
cloudflare/mcp#271 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
IHP-GmbH/IHP-Open-PDK#1266 ·
Maintainers usually reply within 2 days
-
Source Support
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
we-promise/sure#4056 ·
Maintainers usually reply within 1 day
-
Refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
valkey-io/valkey-glide-ruby#347 ·
Maintainers usually reply within 4 days