OpenRouter: GA `client.responses` is not traced by `wrap_openrouter()`, and `client.beta.responses` is not auto-instrumented
維護者通常 1 天內回覆
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 74/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- python
研究方向
Start with py/src/braintrust/integrations/openrouter/patchers.py and tracing.py, then compare the existing GA Responses patching with BetaResponses and the behavior for OpenRouter 0.6.0. Add the requested cassette-backed client.responses.send coverage and a Responses check in test_auto_openrouter.py; done when GA calls through wrapped clients and beta calls through auto-instrumentation are traced without breaking 0.6.0.
由索引模型根據 Issue 內容生成。
描述
In current openrouter releases (1.2.32 and 1.3.22), client.responses is the GA openrouter.responses.Responses, while client.beta.responses is a separate, deprecated openrouter.beta_responses.BetaResponses.
wrap_openrouter()inpy/src/braintrust/integrations/openrouter/tracing.pyonly wrapsclient.beta.responses, so GAclient.responses.send/send_asynccalls are never traced on wrapped clients.auto_instrument()patches the GAResponsesclass but notBetaResponses, soclient.beta.responses.sendis never traced there.
Fix
- In
py/src/braintrust/integrations/openrouter/patchers.py, add patchers forBetaResponses.send/send_async, applied only whenopenrouter.beta_responsesexists (so 0.6.0 keeps working). - Make
wrap_openrouter()also wrapclient.responses. - Add a cassette-backed
client.responses.sendtest, and a Responses check intest_auto_openrouter.py(it only covers chat today). - Optional: add the new
alignmentfield to_RESPONSES_RESPONSE_KEYS.
Parent: #858 (found while reviewing the 2026-10-05 weekly dependency update, #849).
🤖 Generated with Claude Code
- 主要語言
- Python
- 星號
- 21
- 分支
- 23
- 平均合併
- 19 小時 23 分鐘
- 30 天內合併 PR
- 97
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
braintrustdata/braintrust-sdk-python 的其他 Issue
-
feature python
難度 2/5 1-3 小時 新手友好度 76/100
braintrustdata/braintrust-sdk-python#868 ·
維護者通常 1 天內回覆
-
auto_instrument() creates duplicate LLM spans for Google ADK Gemini calls可能已有人在做 @AbhiPrasad 今天認領。 未關閉bug python
braintrustdata/braintrust-sdk-python#896 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
new-integration python
難度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-python#854 ·
維護者通常 1 天內回覆
-
new-integration python
難度 5/5 一週以上 新手友好度 35/100
braintrustdata/braintrust-sdk-python#853 ·
維護者通常 1 天內回覆
-
new-integration python
難度 4/5 3-5 天 新手友好度 52/100
braintrustdata/braintrust-sdk-python#852 ·
維護者通常 1 天內回覆
查看 braintrustdata/braintrust-sdk-python 的全部 Issue
相似的 Issue
-
docs(types): update the collection binding note now that typed collections shipped in pycubrid 1.9.0未關閉documentation priority: low size: S
難度 2/5 1-3 小時 新手友好度 75/100
cubrid-lab/sqlalchemy-cubrid#768 ·
維護者通常 1 天內回覆
-
bug help wanted
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
documentation
難度 1/5 1 小時以內 新手友好度 65/100
ansys/pydpf-core#3547 ·
維護者通常 1 天內回覆
-
core
難度 2/5 1-3 小時 新手友好度 70/100
vectorize-io/hindsight#5457 ·
維護者通常 1 天內回覆
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recording可能已有人在做 @ktz03 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
volcengine/OpenViking#5806 ·
維護者通常 1 天內回覆