Skip to content

(fix):issue 28 - #32

Merged
sahiljagtap08 merged 3 commits into
AgentBudget:mainfrom
Shradhasuman7:main
Oct 1, 2026
Merged

sahiljagtap08 merged 3 commits into
AgentBudget:mainfrom
Shradhasuman7:main

Conversation

@Shradhasuman7

Copy link
Copy Markdown
Contributor

Related issue

Closes #28

What changed

BudgetSession.wrap() used to skip recording silently when it couldn't extract the model or token usage from a response. The call went through untracked and nothing told you.

It now logs a warning when that happens, with the response type and the reason:

  • the model couldn't be extracted
  • token usage couldn't be extracted
  • no pricing was found for the model

The response is still returned unchanged, so existing integrations don't break. You just find out when tracking isn't working for your response shape.

Which SDK(s) does this touch?

  • Python (agentbudget)
  • Go (sdks/go)
  • TypeScript (@agentbudget/agentbudget)
  • Website / docs
  • CI / tooling

@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the sahiljagtap08's projects Team on Vercel.

A member of the Team first needs to authorize it.

@sahiljagtap08
sahiljagtap08 merged commit 4a61a23 into AgentBudget:main Oct 1, 2026
9 of 10 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.

wrap() silently records zero cost when the response object's model/usage fields aren't recognized — no warning, no error

2 participants