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
review: harden against malformed Usage shapes (litellm / non-OpenAI providers)
If a provider returns a ModelResponse with a Usage shape the OpenAI Agents
SDK didn't fully normalize — missing input_tokens_details, missing usage
entirely, None token values — we want to record what we can and skip the
rest, never crash the caller.
- Move requests.add outside the usage-extraction try block so the success
counter still fires when usage access raises (e.g., None).
- Add three tests covering: response with raising .usage property,
Usage missing input_tokens_details, and Usage with all-None token values.
0 commit comments