price(models): add gpt-5.6-sol at $5/$30 per MTok (#1360) - #1362
Merged
Conversation
The 2026-08-07 daily (run 31163810520) spent 2,304 tokens over 3 calls on `gpt-5.6-sol` from agent-structured-output.spec.ts and agent-context-id-continuity.spec.ts, and the model has no row here — so the platform's Cost tab reported the whole run as `>= $0.04757965` instead of a figure. Flat entry, no `since`: buildPricePayload applies FLAT_SINCE = 2026-08-01, earlier than the first run carrying tokens for this model (2026-08-03), so no run can fall before the band. The key is the full id, not a `gpt-5.6` family key. resolvePriceKey short- circuits on an exact match, so the producer resolves and records the string `gpt-5.6-sol` — which is what the platform's backfill for today's three rows targets. A shorter family key would make future runs resolve a different identity and orphan those rows, a case the migration's EXISTS guard does not catch. Also corrects the file's own header, which described the resolver as matching "by substring" in both directions. The code is a PREFIX match (`longer.startsWith(shorter)`, token-cost.mjs:259). Every conclusion the comment drew still holds — the suffixes it targets are appended, never inserted — but the mechanism it named is not the one that runs. Adding the row prices FUTURE runs only: the platform freezes `price_key` at ingest, so today's three fact rows keep a NULL key until quality-platform's migration 20260807030000 backfills them. Co-Authored-By: Claude Opus 5 (1M context) <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.
Closes #1360.
What
Adds one row to
scripts/lib/model-prices.json:The 2026-08-07 daily (run 31163810520) spent 2,304 tokens over 3 calls on this
model, from
agent-structured-output.spec.tsandagent-context-id-continuity.spec.ts. With no row, the platform's Cost tabreported the whole run as
≥ $0.04757965— a floor, not a figure.Rate verified 2026-08-07 against OpenAI's published pricing
($5.00 / $30.00 per MTok) and cross-checked against an independent aggregator.
The full caveat lives in the entry's
_comment(which syncs as the row'snote): this file holds one pair per key, so the batch ($2.50/$15.00) and fast($10.00/$60.00) tiers cannot be expressed, and the absent cached-input concept
($0.50/MTok) means a cache-heavy run is over-priced here — the opposite
direction from every other approximation downstream, which fails toward a floor.
An aggregator's claimed >272K-input tier at $10/$45 is not encoded, because
OpenAI's own page did not show it.
Two decisions worth reviewing
Flat, no
since.buildPricePayloadappliesFLAT_SINCE = 2026-08-01,which is earlier than the first run carrying tokens for this model (2026-08-03),
so no recorded run falls before the band. A flat entry carrying
sinceis ahard error there by design, so the field is absent.
The key is the full id, not a
gpt-5.6family key.resolvePriceKeyshort-circuits on an exact match, so the producer resolves and records the
string
gpt-5.6-sol— which is exactly what quality-platform's backfill fortoday's three rows targets. A shorter family key would make future runs resolve
a different identity and leave those rows orphaned; the migration's
EXISTSguard does not catch that case.
Drive-by: the header comment named the wrong mechanism
The file's top-level
_commentsaid ids absent exactly are matched bysubstring in both directions. The code is a prefix match —
longer.startsWith(shorter),scripts/lib/token-cost.mjs:259, whose owncomment says so explicitly. Every conclusion the header drew still holds (the
suffixes it targets are appended, never inserted), but the mechanism it
described is not the one that runs, and a reader reasoning from "substring"
would predict matches that never happen. Corrected in the same commit, with the
old claim noted so the change reads as a correction rather than a rewrite. The
same error exists in quality-platform's migration
20260804220000header and isrecorded there.
Verification
npm run test:scripts— 794 pass / 0 fail / 1 skipped (795 tests), whichcovers
scripts/sync-model-prices.test.mjsandscripts/lib/token-cost.test.mjs.resolvePriceKey("gpt-5.6-sol", prices)→"gpt-5.6-sol"(exact). Neighboursunchanged:
gpt-5-mini→gpt-5-mini,gpt-4o-2024-08-06→gpt-4o,gpt-5.6→null,gpt-5.6-solar→null;gpt-5.6-sol-preview→gpt-5.6-sol(allowed suffix).buildPricePayloademits{price_key: "gpt-5.6-sol", since: "2026-08-01", provider: "openai", input_per_million: 5, output_per_million: 30, note: "<the _comment>"}.(price_key, since)pairs — the platform table's PK.since.After merge
sync-model-prices.ymlfires on push tomainunder this path, so the sync isautomatic — dispatch it manually only if the push-triggered run does not appear.
Confirm the band landed:
Only then does quality-platform's migration
20260807030000stop being a no-op.This PR prices FUTURE runs only — the platform freezes
price_keyat ingest, sotoday's three fact rows keep a NULL key until that migration backfills them. No
database change is made from this repo.
🤖 Generated with Claude Code