Skip to content

feat: configure API pricing and report documentation run costs - #144

Merged
anhnh2002 merged 1 commit into
mainfrom
feat/api-pricing-cost-reports
Oct 28, 2026
Merged

anhnh2002 merged 1 commit into
mainfrom
feat/api-pricing-cost-reports

Conversation

@anhnh2002

Copy link
Copy Markdown
Collaborator

API documentation runs now support configured USD rates and report this run's token usage and estimated cost by model and phase after generation or updates. Add codewiki config pricing set/show/remove, persist pricing with existing settings, and retain provider-reported Claude Code/Codex costs. API calls without configured rates continue with clearly marked unknown or partial costs; native Google API calls now use configured rates instead of catalog estimates.

Record API responses individually so nested agents, retries, fallback models, and cached tokens are accounted for once. Save the same report in metadata and update history, preserve available usage on failures, and write a fresh zero-call/$0 report for unchanged updates.

Validation:

  • 491 tests passed across tracked regression tests and new pricing coverage.
  • Ruff lint and formatting checks passed, including pre-commit checks.
  • Live API smoke tests using local .env credentials passed initial generation, changed-code update, and unchanged update. Synthetic test rates verified arithmetic; terminal totals matched saved JSON. Credentials and temporary configuration are excluded from this PR.

@anhnh2002
anhnh2002 merged commit 364b67a into main Oct 28, 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.

1 participant