Skip to content

feat: load model prices from JSON files#6

Open
1cbyc wants to merge 2 commits into
jmweb-org:mainfrom
1cbyc:feat/external-price-file
Open

feat: load model prices from JSON files#6
1cbyc wants to merge 2 commits into
jmweb-org:mainfrom
1cbyc:feat/external-price-file

Conversation

@1cbyc

@1cbyc 1cbyc commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • Add --prices-file support for count, budget, and models
  • Load JSON price tables that add or override model pricing
  • Add TOKENMETER_PRICES_FILE for reusable default price-file configuration
  • Keep explicit --prices-file values higher priority than the environment variable
  • Validate price-file schema and surface bad files as CLI input errors
  • Document the custom price-file format and environment variable

Test Plan

  • uv run pytest
  • uv run ruff check .

Fixes #2

1cbyc added 2 commits June 29, 2026 22:02
Signed-off-by: 1cbyc <isaacnsisong@gmail.com>
Signed-off-by: 1cbyc <isaacnsisong@gmail.com>
@1cbyc 1cbyc force-pushed the feat/external-price-file branch from b9b4f41 to b4f965b Compare July 1, 2026 09:58
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.

Load prices from an external file

1 participant