Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BOT ISSUE] OpenAI Responses API instrumentation uses wrong token-limit parameter name and is missing several metadata fields

オープン
#145 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
ruby
領域
observability

調査の方向性

lib/braintrust/contrib/openai/instrumentation/responses.rb と lib/braintrust/contrib/ruby_openai/instrumentation/responses.rb の METADATA_FIELDS から始め、次に lib/braintrust/contrib/openai/instrumentation/chat.rb および upstream の ResponseCreateParams 定義と比較します。Responses instrumentation のメタデータがドキュメントに記載されたパラメータ名と一致し、issue に列挙されたすべてのフィールドを含んでいることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Summary

The Responses API instrumentation in both the openai and ruby-openai integrations has an incorrect parameter name (max_tokens instead of max_output_tokens) and is missing several parameters that are part of the stable upstream API. Users who set max_output_tokens, service_tier, include, text, or background on their Responses API calls get no visibility into these values in their Braintrust span metadata.

What is missing

The METADATA_FIELDS constant in both Responses API instrumentations currently includes:

METADATA_FIELDS = %i[
  model instructions modalities tools parallel_tool_calls
  tool_choice temperature max_tokens top_p frequency_penalty
  presence_penalty seed user metadata store response_format
  reasoning previous_response_id truncation
].freeze
Wrong parameter name
Current field Correct field Why it matters
max_tokens max_output_tokens The Responses API uses max_output_tokens, not max_tokens. The SDK captures a field that doesn't exist in the Responses API, and misses the one users actually pass.
Missing parameters
Parameter Why it matters
service_tier Controls processing priority (auto, default, flex, priority). Already captured in the Chat Completions instrumentation — this is an inconsistency within the SDK.
include Array controlling what additional data is returned (e.g., web_search_call.action.sources, code_interpreter_call.outputs). Important for understanding what data the user requested.
text Text response format configuration for structured outputs. The newer alternative to response_format for the Responses API.
background Boolean for async/background response execution. Changes how the response is processed — users need to see this in traces to understand response behavior.

Braintrust docs status

not_found — The Braintrust docs at https://www.braintrust.dev/docs/instrument/wrap-providers do not mention max_output_tokens, service_tier, include, text, or background for the Responses API.

Upstream sources

Local repo files inspected

  • lib/braintrust/contrib/openai/instrumentation/responses.rb (lines 26–31) — METADATA_FIELDS uses max_tokens (wrong) and is missing max_output_tokens, service_tier, include, text, background
  • lib/braintrust/contrib/ruby_openai/instrumentation/responses.rb (lines 32–37) — identical METADATA_FIELDS, same issues
  • lib/braintrust/contrib/openai/instrumentation/chat.rb (lines 27–32) — Chat Completions already captures service_tier, showing this is an oversight in the Responses instrumentation
主要言語
Ruby
スター
9
フォーク
10
平均マージ
3日 43分
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

braintrustdata/braintrust-sdk-ruby のほかの issue

braintrustdata/braintrust-sdk-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。