Conversation
…ls the max price - model_cost/model_profiles.yaml is now the source of truth for prices: one profile per model with aliases; model_cost.json is generated from it by scripts/pricing/build_model_cost.py (--check verifies it is in sync). - Duplicate spellings are folded into aliases where that moves no score. Three models stay double-profiled with a conflict note (qwen3-235b, claude-haiku-4.5, qwen3-30b) because different board entries are charged different prices for them today. - Evaluator: price lookup is exact id/alias only (the substring fallback is removed). Spellings that relied on it are added as explicit aliases. - A model with no price profile is charged the highest input/output price in the table instead of $0, and an unknown model name is graded and charged rather than dropped. The submission check warns instead of failing. - Re-pricing all 265,568 rows in router_inference/predictions gives identical costs before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runs scripts/pricing/build_model_cost.py --check whenever model_cost/ or scripts/pricing/ changes, locally and in the Pre-commit CI job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces model price profiles as the single source of truth for prices, makes price lookup exact, and charges models with no price profile the highest price in the table instead of $0. No score on the leaderboard changes.
What changes
model_cost/model_profiles.yaml(new): one profile per model — price (USD per 1M input/output tokens), aliases (other spellings of the same model),as_of,source,note. 86 profiles, 19 aliases. Prices are seeded from today'smodel_cost.jsonunchanged; a market sync can update them later.scripts/pricing/build_model_cost.py(new): generatesmodel_cost.jsonfrom the profiles (each id and alias becomes an entry at the profile's price), so the evaluator,/evaluatebot, and other tools keep reading the same file.--checkfails if the JSON was edited by hand; wired in as a pre-commit hook, so it runs in CI.evaluate_models.py): price lookup is exact id/alias only. The substring fallback — which let a name pick up whichever key happened to be a substring of it — is removed. A model with no price profile is charged the table's highest input and output price (currently $15/$75), warned once per name, and summarized at the end of the run.run.py: a row whose model name is not inuniversal_model_names.pyis now graded and charged the maximum price instead of being dropped from the results./evaluateruns and applies the rule above.Keeping it score-neutral
openai/gpt-oss-120b,glm-4-air, andmodel_usedspellings likegoogle/gemini-3-flash-preview).deepseek-v3.2,openai_gpt-oss-120b,qwen_qwen3-235b-a22b-2507).Testing
tests/test_pricing.py, 7)router_inference/predictions/with old vs new code (same path asrun.py, incl.model_used)run.py lynkr full --forceon old vs new codemodel_cost.json)Notes for reviewers
model_cost.jsondirectly will need their rows moved intomodel_profiles.yamlwhen they are merged.sys.stdinhas no.buffer, so solutions readingsys.stdin.bufferare marked wrong.🤖 Generated with Claude Code