Skip to content

chore: refresh AI model price book - #28224

Closed
cdrci wants to merge 21 commits into
mainfrom
bot/aigateway-prices-refresh
Closed

chore: refresh AI model price book#28224
cdrci wants to merge 21 commits into
mainfrom
bot/aigateway-prices-refresh

Conversation

@cdrci

@cdrci cdrci commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Price book changes

36 models added, 11 models removed, 47 models changed.

Added

  • azure/claude-mythos-5
  • azure/kimi-k2.7-code
  • bedrock/global.openai.gpt-5.6-luna
  • bedrock/global.openai.gpt-5.6-sol
  • bedrock/global.openai.gpt-5.6-terra
  • copilot/gemini-3.7-flash
  • copilot/grok-4.6
  • copilot/kimi-k3
  • copilot/mai-code-1.1-flash
  • google/gemini-3.7-flash
  • openrouter/bytedance-seed/seed-2-1-turbo
  • openrouter/bytedance-seed/seed-2.0-code
  • openrouter/deepseek/deepseek-v4-pro-0813
  • openrouter/dots-studio/dots-3-note-preview:free
  • openrouter/google/gemini-3.7-flash
  • openrouter/inclusionai/ling-3.0-flash
  • openrouter/liquid/lfm-2.5-2.6b:free
  • openrouter/meta/muse-glimmer-30b
  • openrouter/meta/muse-spark-1.2
  • openrouter/nvidia/nemotron-3.5-lightning
  • openrouter/nvidia/nemotron-3.5-lightning:free
  • openrouter/qwen/qwen3.8-2.4t-a95b
  • openrouter/qwen/qwen3.8-27b
  • openrouter/sakana/sakana-namazu
  • openrouter/upstage/solar-pro4
  • openrouter/x-ai/grok-4.6
  • openrouter/z-ai/glm-5.2:free
  • vercel/alibaba/qwen3.8-2.4t-a95b
  • vercel/deepseek/deepseek-v4-pro-0813
  • vercel/google/gemini-3.7-flash
  • vercel/inclusionai/ling-3.0-flash
  • vercel/meta/muse-glimmer-30b
  • vercel/meta/muse-spark-1.2
  • vercel/meta/muse-spark-1.2-contributor
  • vercel/sakana/namazu
  • vercel/xai/grok-4.6

Removed

  • anthropic/claude-opus-4-1
  • anthropic/claude-opus-4-1-20250805
  • google/gemini-2.0-flash
  • google/gemini-2.0-flash-lite
  • google/gemini-3-pro-preview
  • openrouter/inclusionai/ling-3.0-flash:free
  • openrouter/openai/gpt-5.3-chat
  • vercel/anthropic/claude-opus-4.1
  • vercel/inclusionai/ling-3.0-flash-free
  • vercel/openai/gpt-5.1-instant
  • vercel/openai/gpt-5.3-chat

Changed

  • azure/gpt-5.6-luna
  • azure/gpt-5.6-sol
  • azure/gpt-5.6-terra
  • bedrock/openai.gpt-5.6-sol
  • openrouter/deepseek/deepseek-v3.1-terminus
  • openrouter/deepseek/deepseek-v4-flash
  • openrouter/deepseek/deepseek-v4-flash-0731
  • openrouter/deepseek/deepseek-v4-pro
  • openrouter/google/gemini-3.6-flash
  • openrouter/gryphe/mythomax-l2-13b
  • openrouter/minimax/minimax-m2.5
  • openrouter/minimax/minimax-m2.7
  • openrouter/mistralai/mistral-small-3.2-24b-instruct
  • openrouter/moonshotai/kimi-k2.6
  • openrouter/moonshotai/kimi-k2.7-code
  • openrouter/openai/gpt-5.6-luna
  • openrouter/openai/gpt-5.6-luna-pro
  • openrouter/openai/gpt-5.6-sol
  • openrouter/openai/gpt-5.6-sol-pro
  • openrouter/openai/gpt-5.6-terra
  • openrouter/openai/gpt-5.6-terra-pro
  • openrouter/openai/gpt-oss-120b
  • openrouter/qwen/qwen-plus-2025-07-28:thinking
  • openrouter/qwen/qwen2.5-vl-72b-instruct
  • openrouter/qwen/qwen3-14b
  • openrouter/qwen/qwen3-235b-a22b-2507
  • openrouter/qwen/qwen3-30b-a3b
  • openrouter/qwen/qwen3-coder-30b-a3b-instruct
  • openrouter/qwen/qwen3-next-80b-a3b-instruct
  • openrouter/qwen/qwen3-vl-235b-a22b-thinking
  • openrouter/qwen/qwen3-vl-30b-a3b-instruct
  • openrouter/qwen/qwen3.5-122b-a10b
  • openrouter/qwen/qwen3.5-35b-a3b
  • openrouter/qwen/qwen3.6-35b-a3b
  • openrouter/tencent/hy3-preview
  • openrouter/thinkingmachines/inkling
  • openrouter/thinkingmachines/inkling-small
  • openrouter/z-ai/glm-5
  • openrouter/z-ai/glm-5.2
  • openrouter/~deepseek/deepseek-v4-flash-latest
  • openrouter/~google/gemini-flash-latest
  • openrouter/~moonshotai/kimi-latest
  • openrouter/~openai/gpt-latest
  • openrouter/~x-ai/grok-latest
  • vercel/deepseek/deepseek-v4-flash
  • vercel/deepseek/deepseek-v4-pro
  • vercel/openai/gpt-5.6-sol

Review notes

Regenerated by make gen/aibridge-prices from the live
models.dev catalog. Both artifacts come from one
snapshot, so they ship together:

  • coderd/aibridge/prices/data/prices.json
  • site/src/pages/AgentsPage/components/ChatModelAdminPanel/knownModels/knownModelsGenerated.json

These are customer-visible cost numbers taken from upstream data, so this
PR is never merged automatically. The summary above lists what moved; check
the diff for exact figures before approving.

Opened automatically by the aigateway-prices-refresh workflow.

The price book is regenerated by hand with `make gen/aibridge-prices`, so
newly launched models stay unpriced and changed prices stay stale until
someone remembers to run it.

Add a weekly workflow that regenerates both artifacts from live models.dev
data and opens a pull request when the output changes. The refresh is never
merged automatically: prices are customer-visible cost numbers, so every
change goes through human review. A generator failure, which happens by
design when upstream drops a pinned or curated model, is announced in Slack.

The pull request body carries a generated summary of models added, models
removed, and prices changed, rendered by a new deterministic
scripts/aibridgepricesdiff tool.

Add CODEOWNERS entries for the price book, the frontend catalog, and both
generators so the right reviewer is requested on every refresh.
The pull request diff already shows exact prices for every added, removed,
and changed row, so repeating them in the body duplicated what a reviewer
can read directly. Keep the counts and the model lists, which answer what
moved without restating the diff.
… fields

The per-field count did not match the model list below it and needed a
qualifier to reconcile. Counting models keeps every figure on the same
unit.
… fields

The summary lists models per category, so tracking which individual price
field moved produced detail nothing rendered. Compare rows as a unit and
carry model keys through, which removes the per-field change type, the
field accessor table, and the two name-mapping helpers.

Every category now holds at most one entry per model, so a single key
comparator gives a total order and the stable-sort requirement disappears.

Verified byte-identical output against the previous implementation on a
live upstream snapshot.
…ir own lines

Cases with more than one model packed both rows onto a single line, which
made the difference between the old and new snapshot hard to spot when
reviewing.
…ixtures

Struct literals packed two fields onto a line, and cases mixed an inline
old snapshot with a multiline new one, so the two sides did not line up
when read side by side. Inline both only when each snapshot holds a single
row.
…ror messages

Substring assertions left section order, spacing, and stray content
unverified: reordering the Removed and Changed sections passed the suite.
Compare the whole rendered summary for both the empty and populated cases.

Assert on error contents rather than mere failure, and cover a missing
input file, which the workflow hits if the snapshot step is ever skipped.
The identity was a plausible-looking address that is not verified on any
GitHub account, so refresh commits would show an unlinked author. Use the
bot identity that backport.yaml and cherry-pick.yaml already use, whose
numeric noreply address associates the commit with a real profile.
The style guide's word-choice table lists AI Bridge as a form to avoid.
Identifiers stay as they are, since they name the paths and make targets
this workflow drives: coderd/aibridge/prices, make gen/aibridge-prices,
and scripts/aibridgepricesgen.
The refresh PR touches exactly these two files, so directory-level entries
on the generators never fired on it. The knownModels directory also holds
hand-written TypeScript, which would have requested review on unrelated
frontend work.
New artifacts follow the aigateway naming; a file named aibridge would be
invisible to anyone grepping the current name. The branch and concurrency
group move with it, since neither exists yet. Paths, make targets, and the
scripts keep their aibridge names, which match what they refer to.
…RICES_SLACK_WEBHOOK

Matches the workflow name and the <SCOPE>_SLACK_WEBHOOK convention. The
secret does not exist yet, so renaming now costs nothing.
DO NOT MERGE. Drop this commit after verifying the run.
The alert built its text in double quotes, so bash kept \n as two
characters and jq --arg escaped the backslash. Slack printed a literal \n
mid-sentence instead of breaking the line; build the text with printf.
The step only runs after the refresh has already failed, so exiting 0 hid
the more serious problem: nobody was told. Mark the step red and name the
secret, now that it exists and an empty value means a misconfiguration.
@cdrci
cdrci force-pushed the bot/aigateway-prices-refresh branch from 5529c51 to e94d687 Compare August 17, 2026 19:11
@cdrci
cdrci force-pushed the bot/aigateway-prices-refresh branch from e94d687 to 113d659 Compare August 17, 2026 19:14
evgeniy-scherbina added a commit that referenced this pull request Aug 17, 2026
gh pr list/create/edit go through GraphQL, whose queries resolve reviewer
and team fields that require the read:org scope. cdrci's token carries only
repo and workflow, so the calls succeed while no pull request exists and
fail once CODEOWNERS attaches a reviewer: the first refresh would open a PR
and every run after it would fail.

Observed on this branch: run 32058047624 created #28224, then 32058781222
and 32059086614 both failed on gh pr list with a read:org scope error. The
equivalent REST endpoints need only repo.
@cdrci
cdrci force-pushed the bot/aigateway-prices-refresh branch from 113d659 to e62f776 Compare August 17, 2026 19:28
evgeniy-scherbina added a commit that referenced this pull request Aug 17, 2026
gh pr list/create/edit go through GraphQL, whose queries resolve reviewer
and team fields that require the read:org scope. cdrci's token carries only
repo and workflow, so the calls succeed while no pull request exists and
fail once CODEOWNERS attaches a reviewer: the first refresh would open a PR
and every run after it would fail.

Observed on this branch: run 32058047624 created #28224, then 32058781222
and 32059086614 both failed on gh pr list with a read:org scope error. The
equivalent REST endpoints need only repo.
@cdrci
cdrci force-pushed the bot/aigateway-prices-refresh branch 3 times, most recently from 4922e80 to 05eeab4 Compare August 17, 2026 20:07
evgeniy-scherbina and others added 2 commits August 17, 2026 20:14
gh pr list/create/edit go through GraphQL, whose queries resolve reviewer
and team fields that require the read:org scope. cdrci's token carries only
repo and workflow, so the calls succeed while no pull request exists and
fail once CODEOWNERS attaches a reviewer: the first refresh would open a PR
and every run after it would fail.

Observed on this branch: run 32058047624 created #28224, then 32058781222
and 32059086614 both failed on gh pr list with a read:org scope error. The
equivalent REST endpoints need only repo.
@cdrci
cdrci force-pushed the bot/aigateway-prices-refresh branch from 05eeab4 to 6aa0cac Compare August 17, 2026 20:16
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants