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() in py/src/braintrust/integrations/openrouter/tracing.py only wraps client.beta.responses, so GA client.responses.send / send_async calls are never traced on wrapped clients.
auto_instrument() patches the GA Responses class but not BetaResponses, so client.beta.responses.send is never traced there.
Fix
- In
py/src/braintrust/integrations/openrouter/patchers.py, add patchers for BetaResponses.send / send_async, applied only when openrouter.beta_responses exists (so 0.6.0 keeps working).
- Make
wrap_openrouter() also wrap client.responses.
- Add a cassette-backed
client.responses.send test, and a Responses check in test_auto_openrouter.py (it only covers chat today).
- Optional: add the new
alignment field to _RESPONSES_RESPONSE_KEYS.
Parent: #858 (found while reviewing the 2026-10-05 weekly dependency update, #849).
🤖 Generated with Claude Code
In current openrouter releases (1.2.32 and 1.3.22),
client.responsesis the GAopenrouter.responses.Responses, whileclient.beta.responsesis a separate, deprecatedopenrouter.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
py/src/braintrust/integrations/openrouter/patchers.py, add patchers forBetaResponses.send/send_async, applied only whenopenrouter.beta_responsesexists (so 0.6.0 keeps working).wrap_openrouter()also wrapclient.responses.client.responses.sendtest, and a Responses check intest_auto_openrouter.py(it only covers chat today).alignmentfield to_RESPONSES_RESPONSE_KEYS.Parent: #858 (found while reviewing the 2026-10-05 weekly dependency update, #849).
🤖 Generated with Claude Code