Skip to content

feat(usage): expose pricing metadata in /usage (Task #16)#32

Open
lubobill1990 wants to merge 2 commits into
feat/15-pricing-sync-subcommandfrom
feat/16-dashboard-upgrade
Open

feat(usage): expose pricing metadata in /usage (Task #16)#32
lubobill1990 wants to merge 2 commits into
feat/15-pricing-sync-subcommandfrom
feat/16-dashboard-upgrade

Conversation

@lubobill1990
Copy link
Copy Markdown
Collaborator

Summary

  • Add pricing.models array (current per-model rates from model_pricing table) to /usage response
  • Add pricing.lastSync object (latest pricing_sync_log entry) for sync health visibility
  • Dashboard consumers can now display cost configuration and sync status

Test plan

  • Existing usage-stats tests pass (4/4)
  • TypeScript compiles cleanly
  • Lint passes

🤖 Generated with Claude Code

lubobill1990 and others added 2 commits April 25, 2026 16:43
)

Add pricing.models (current per-model rates) and pricing.lastSync
(latest sync log entry) to the /usage endpoint response, enabling
dashboard consumers to display cost configuration and sync health.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove response_format (not supported by all Copilot models)
- Pre-filter Azure rows to only model-relevant entries (reduces payload)
- Trim Anthropic HTML to pricing section (~10KB cap)
- Strip markdown fences from LLM response
- Log response body on error for easier debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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