You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenRouter: GA client.responses is not traced by wrap_openrouter(), and client.beta.responses is not auto-instrumented #860
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).
Activity
AbhiPrasad commentedon Oct 14, 2026
released with https://github.com/braintrustdata/braintrust-sdk-python/releases/tag/py-sdk-v0.46.0
feat(openrouter): trace GA and beta Responses APIs (braintrustdata#893)