feat(pricing): refresh bundled prices and consider an explicit user update API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 176
- Forks
- 28
- Avg merge
- 18h 42m
- Merged PRs (30d)
- 16
Description
Why this matters
Chatlas packages a snapshot of ellmer pricing data for cost estimates. The current snapshot is older than ellmer's source: chatlas has 1,286 entries dated 2026-08-10, while ellmer has 1,306 entries dated 2026-08-17. This omits pricing for newer models and tiers, including Claude Mythos, Gemini 3.7, GPT-5.6 Bedrock large-context tiers, and newer Groq/Mistral models.
Ellmer added an explicit models_update_prices() cache-refresh API in tidyverse/ellmer#968 (57e3d72d) after deciding against automatic background refreshes.
Scope
- Refresh the bundled
chatlas/data/prices.jsonfrom ellmer as a maintenance update. - Evaluate whether chatlas should expose a user-invoked pricing refresh API backed by a local cache, rather than requiring a package release for new model pricing.
- If adding the API, define its network behavior, cache location, schema/version validation, failure behavior, and whether cached data replaces or merges with bundled data. Keep it explicit: no automatic network request during normal imports or chats.
- Add tests that do not require live network access.
Starting points
chatlas/_tokens.py: loads the packaged pricing snapshot at import time and performs lookups.Makefiletargetupdate-pricing: downloads the source artifact from ellmer..github/workflows/check-update-types.yml: keeps generated pricing current in CI.- Ellmer reference:
git -C ../ellmer show 57e3d72d.
Non-goals
- Do not change cost calculation semantics or make pricing lookup network-dependent.
- Do not silently alter prices during import, tests, or a normal chat request.
Open design question
The bundled-data refresh is independently actionable. The runtime API is optional and should be split into a follow-up if its design adds more than a small, well-tested cache layer.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with chatlas/_tokens.py and the Makefile update-pricing target, then inspect .github/workflows/check-update-types.yml and ellmer commit 57e3d72d. The bundled-data portion is done when chatlas/data/prices.json matches the current ellmer source; any refresh API should have offline tests and must not make normal imports or chats access the network.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100