Skip to content

fix: fail cost scorer when costUsd is undefined - #50

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:cursor/fix-cost-undefined-67f4
Sep 12, 2026
Merged

royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:cursor/fix-cost-undefined-67f4

Conversation

@sharadvc

Copy link
Copy Markdown
Contributor

Summary

When costUsd is missing, the cost scorer now fails with score: 0 and a reason pointing at costPer1kTokens, instead of passing.

Test plan

  • npm test

Fixes #7

Fixes #7

Co-authored-by: Sharad. <sharadvc@users.noreply.github.com>
@royalpinto007
royalpinto007 merged commit 79f3bcd into AgentPostmortem:main Sep 12, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown

Merged. Thanks a lot, @sharadvc.

Good, focused change. Exactly the kind of thing Evalgate needs.

If Evalgate is useful to you, a star goes a long way.

Happy to see more from you whenever you have the time.

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.

cost scorer passes with a perfect score when the provider reports no cost

2 participants