Repository navigation
Pricing: sync model prices with OpenRouter (manual), applied with the 2026-10-31 list - #250
Merged
Merged
Conversation
scripts/pricing/sync_openrouter.py sets each price profile that resolves to an OpenRouter model (through openrouter_id, or an exact id/alias match) to OpenRouter's current list price, updating as_of and source in place and regenerating model_cost.json. Profiles with sync: false keep their price. When a price changes, the run also writes model_cost/price_snapshots/<date>.json. The Price sync workflow runs it daily and proposes the result as one pull request (branch price-sync/auto, updated in place). It changes the price table only; leaderboard costs change when the routers are re-priced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The manual path comes first: a maintainer runs sync_openrouter.py and re-prices the leaderboard as separate steps. The scheduled workflow will be added once that path is settled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ran scripts/pricing/sync_openrouter.py against OpenRouter's model list of 2026-10-31. 30 profiles keyed by an OpenRouter id take its list price; the prices used are recorded in model_cost/price_snapshots/2026-10-31.json. Eight profiles are pinned with sync: false and keep their price: models retired from OpenRouter (grok-4-1-fast-reasoning, claude-sonnet-4, claude-3-haiku), DeepSeek's API name deepseek-reasoner, and models never listed there (agnes-2.0-flash, GLM-4-9B-0414, DeepSeek-R1-0528-Qwen3-8B, glm-4-air). 23 older profiles that no leaderboard router uses match no OpenRouter model; the sync lists them and leaves their price. The leaderboard is not re-priced here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yl231
marked this pull request as ready for review
October 31, 2026 22:07
This was referenced Oct 31, 2026
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.
Adds the manual price sync with OpenRouter, and applies it once with OpenRouter's list prices of 2026-10-31. Based on #218, which needs to merge first; then this PR is retargeted to
main.How the manual path works
python scripts/pricing/sync_openrouter.pydownloads OpenRouter's model list. Every profile inmodel_cost/model_profiles.yamlkeyed by an OpenRouter id, or with anopenrouter_id, takes OpenRouter's list price (never the:batchor:freetiers). The prices used are recorded inmodel_cost/price_snapshots/<date>.json, andmodel_cost.jsonis regenerated.--dry-runand--reportprint the changes without writing them.Pinned prices: a profile with
sync: falsekeeps its price. That applies to models retired from OpenRouter and to models it never listed.This run (2026-10-31)
30 prices change. These move the leaderboard most:
anthropic/claude-opus-4.7deepseek/deepseek-v4-proqwen/qwen3-235b-a22b-2507deepseek/deepseek-v4-flashgoogle/gemma-4-31b-itThe full list is in the commit and the snapshot file.
Pinned (
sync: false):grok-4-1-fast-reasoning,claude-sonnet-4andclaude-3-haikuare retired from OpenRouter and kept at their last listed price.deepseek-reasoneris DeepSeek's API name, and the model behind it changed over time.agnes-2.0-flash,GLM-4-9B-0414,DeepSeek-R1-0528-Qwen3-8Bandglm-4-airwere never listed on OpenRouter.Unmatched: 23 older profiles that no leaderboard router uses match no OpenRouter model. The sync lists them each run and leaves their price.
Effect on the leaderboard once re-priced: Arena score, now → re-priced at these prices.
Not in this PR
Testing
tests/test_price_sync.py(6) andtests/test_pricing.py(7) pass.model_cost.jsonmatches the profiles.🤖 Generated with Claude Code