Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

OpenRouter: GA `client.responses` is not traced by `wrap_openrouter()`, and `client.beta.responses` is not auto-instrumented

Chiusa
#860 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@AbhiPrasad ci sta già lavorando.

Dal 8/10/2026.

  • #893 di @AbhiPrasad — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
observability

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug python

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

Lingua principale
Python
Stelle
21
Fork
23
Merge medio
18h 23m
PR unite (30g)
104

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di braintrustdata/braintrust-sdk-python

Tutte le issue di braintrustdata/braintrust-sdk-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.