Skip to content

#88: Add test for usage[cost] field path in OpenRouterClient.generate() - #102

Merged
deyna256 merged 1 commit into
deyna256:mainfrom
sathvik458:fix-cost-field-test
Mar 14, 2026
Merged

#88: Add test for usage[cost] field path in OpenRouterClient.generate()#102
deyna256 merged 1 commit into
deyna256:mainfrom
sathvik458:fix-cost-field-test

Conversation

@sathvik458

@sathvik458 sathvik458 commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Adds a test ensuring the usage["cost"] branch in OpenRouterClient.generate()

The existing test only covered the total_cost field, leaving the first branch of:

cost_usd = usage.get("cost") or usage.get("total_cost")

Tests have passed!

Resolve #88

@deyna256
deyna256 merged commit 27c3cb6 into deyna256:main Mar 14, 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.

usage.get("cost") field path in generate() is never exercised by tests

2 participants