Skip to content

feat: estimate cost for usage updates - #415

Open
gilgm12 wants to merge 1 commit into
agentclientprotocol:mainfrom
gilgm12:feat/usage-cost
Open

feat: estimate cost for usage updates#415
gilgm12 wants to merge 1 commit into
agentclientprotocol:mainfrom
gilgm12:feat/usage-cost

Conversation

@gilgm12

@gilgm12 gilgm12 commented Aug 19, 2026

Copy link
Copy Markdown

Summary

  • fetch OpenAI model pricing and attach estimated USD cost to ACP usage_update events
  • support both new and resumed/loaded sessions, baselining resumed cumulative token totals so Superlite can add persisted prior cost without double-counting
  • add focused tracker coverage for cumulative deltas and resume baselining

Verification

  • npm exec vitest run src/tests/SessionCostTracker.test.ts src/tests/CodexACPAgent/token-usage-events.test.ts
  • npm run typecheck
  • npm run build

@gilgm12

gilgm12 commented Aug 21, 2026

Copy link
Copy Markdown
Author

@benbrandt let me know if there's anything else you need from me on this.

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.

1 participant