.agents/skills/add-model-price/references/workflow-and-validation.md
Open the provider's official pricing page and collect input, output, cache write, and cache read prices.
Read provider-usage-key-matrix.md, then compare the official provider usage object, Langfuse ingestion normalization, and a mature sibling pricing entry. Record every supported semantic bucket and all aliases Langfuse may persist before editing.
uuidgen
Convert the output to lowercase before using it.
Use nearby models in worker/src/constants/default-model-prices.json as the
template, then:
updatedAt when editing an existing entryExample for a model with $5 input, $25 output, $6.25 cache write, and
$0.50 cache read per million tokens:
{
"id": "13458bc0-1c20-44c2-8753-172f54b67647",
"modelName": "claude-opus-4-6",
"matchPattern": "(?i)^(anthropic\/)?(claude-opus-4-6|(eu\\.|us\\.|apac\\.)?anthropic\\.claude-opus-4-6-v1(:0)?)$",
"createdAt": "2026-03-09T00:00:00.000Z",
"updatedAt": "2026-03-09T00:00:00.000Z",
"tokenizerConfig": null,
"tokenizerId": "claude",
"pricingTiers": [
{
"id": "13458bc0-1c20-44c2-8753-172f54b67647_tier_default",
"name": "Standard",
"isDefault": true,
"priority": 0,
"conditions": [],
"prices": {
"input": 5e-6,
"input_tokens": 5e-6,
"output": 25e-6,
"output_tokens": 25e-6,
"cache_creation_input_tokens": 6.25e-6,
"input_cache_creation": 6.25e-6,
"cache_read_input_tokens": 0.5e-6,
"input_cache_read": 0.5e-6
}
}
]
}
If the model should be available in playground or LLM-as-judge flows, add it to
the correct array in packages/shared/src/server/llm/types.ts.
Common arrays include:
anthropicModelsopenAIModelsvertexAIModelsgoogleAIStudioModelsDo not add a new model as the first entry in one of these arrays. The first entry is used as a default model in some test or evaluation paths, and newer models may not be available to all users yet.
Run the bundled validator:
node .agents/skills/add-model-price/scripts/validate-pricing-file.mjs
For every changed or new entry, also validate usage-key coverage against the pre-change pricing file:
node .agents/skills/add-model-price/scripts/validate-pricing-file.mjs \
--base /path/to/default-model-prices-before.json
For quick manual inspection, use jq:
jq '.[] | select(.modelName == "claude-opus-4-6")' worker/src/constants/default-model-prices.json
isDefault: truepriority: 0conditions: []priority > 0Use the bundled tester before finishing any matchPattern change:
node .agents/skills/add-model-price/scripts/test-match-pattern.mjs --model <modelName> --accept <sample...> --reject <sample...>
Use representative accepted and rejected model IDs for every provider format the regex is intended to cover.
_tier_default suffix on the default tier ID.updatedAtUse nearby entries as templates:
claude-opus-4-5-20251101 for Anthropic multi-provider patternsgpt-4o for a simple OpenAI patterngemini-2.5-pro for a multi-tier Gemini entry