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
fix(usage): Normalize None token details on Usage initialization
Some providers don't populate optional token detail fields, resulting
in None values that bypass Pydantic validation. This fix adds a
__post_init__ method to normalize None to 0 for cached_tokens and
reasoning_tokens on any Usage object creation.
This defensive approach handles the issue at the boundary we control,
regardless of how providers construct their response objects.
Signed-off-by: Adrian Cole <[email protected]>
0 commit comments