Skip to content

fix: handle missing usage object in OpenAIClient - #15

Merged
alexzhang13 merged 2 commits into
alexzhang13:mainfrom
lakshyaag:fix/openai-cost-tracking
Jan 5, 2026
Merged

alexzhang13 merged 2 commits into
alexzhang13:mainfrom
lakshyaag:fix/openai-cost-tracking

Conversation

@lakshyaag

@lakshyaag lakshyaag commented Jan 5, 2026 •

Copy link
Copy Markdown
Contributor
  • Fixes _track_cost in OpenAIClient to raise an error if usage details are empty.
  • Adds explicit handling of extra_body={"usage": {"include": True}} for PrimeIntellect Inference API

@lakshyaag
lakshyaag marked this pull request as ready for review January 5, 2026 03:17
@alexzhang13

Copy link
Copy Markdown
Owner

Thanks! Looks good, we might re-factor this later but it works for now.

@alexzhang13
alexzhang13 merged commit 3efda5c into alexzhang13:main Jan 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants