update-model-pricing
Skill66 starsChanged 2 months agoApache-2.0View on GitHub
Add or change model token rates in Decant. Use when a provider publishes new pricing, a new model needs a rate, a model ID pattern fails to match, or a retired model should stop inheriting a current tier's price.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-sourceSkill
- api-route-changeSkill
- decant-releaseSkill
- schema-migrationSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Verify every rate against the provider's first-party pricing page.
- Very specific: line 18
Update docs/pricing.md: the table row, the source link list, and the dated "verified on" sentence at the top.
- Very specific: line 20
Add cases to test/cost.test.ts for each new or changed pattern, including dated-suffix variants of the model ID.
- Very specific: line 22
If context-window sizes changed too, update the model window tests in test/context-window.test.ts.
- Distinctive: line 27
Every sync reprices stored session and activity costs with current rates, so a rate change needs no migration.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Update model pricing
Rates live in src/cost.ts and are documented in docs/pricing.md. AGENTS.md
invariant 4 explains why stored costs follow current rates.
Steps
- Verify every rate against the provider's first-party pricing page. Do not use third-party aggregators or memory.
- Edit the pricing table and model-ID patterns in
src/cost.ts. Retired models without a published rate stay unpriced rather than falling through to a newer tier. - Update
docs/pricing.md: the table row, the source link list, and the dated "verified on" sentence at the top. - Add cases to
test/cost.test.tsfor each new or changed pattern, including dated-suffix variants of the model ID. - If context-window sizes changed too, update the model window tests in
test/context-window.test.ts.
What happens to existing archives
Every sync reprices stored session and activity costs with current rates, so a
rate change needs no migration. Bump INGEST_PIPELINE_REVISION only when
unchanged sources must be re-derived, for example when session model selection
changes which model a session is attributed to.
Goldens
Golden outputs that include cost change when a fixture model's rate changes.
Review that diff line by line, then regenerate with
bun run scripts/regen-goldens.ts --i-reviewed-the-diff.
Prior art
git log --oneline -- src/cost.ts docs/pricing.md shows earlier pricing
changes and the tests that shipped with them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

