Read OpenAI knowledge cutoffs and GPT-6.2 pricing #739 (GitHub #738)
main fromfix/openai-gpt-6-2-price-cutoff·merged by tombeckenham View on GitHubRoot cause#
- Pricing.
parseModelPricingrefuses a card on any bullet it cannot read that quotes$,Nxor%. The GPT-6.2 Astra and Sol pages word two bullets in a new way. The cache-write note ("The cache write price is for 30 minutes of retention. A 12-hour cache write costs $20 per million tokens …") quotes a$amount, so the whole card was refused. The long-context tier ("For requests with more than 272K input tokens, input and cache rates double and output costs 1.5 times …") matched no rule and quotes no$/x/%, so it would have been dropped silently. - Knowledge cutoff.
parseModelPagenever read the- May 18, 2026 knowledge cutoffline. Every OpenAI row servedknowledgeCutoff: null, not only GPT-6.2.
Fix (in the parser every OpenAI page goes through)#
- The new tier wording becomes a tier: 2x on input and cache levers, 1.5x on output, above 272K.
- The new cache-write note counts as prose only when the table has a Cache writes rate. The 12-hour TTL is not modelled, the same as the existing 30-minute/12-hour rule.
ultrafastcounts as prose. Like fast mode, it is a non-default tier.- Fail-closed is tighter: an unread bullet that states a multiplier in words (
times,double,twice,half) now refuses the card. Before, it passed silently. knowledgeCutoffis read from Model details asYYYY-MM-DD. Like the price, it goes only to the page's Model ID and default snapshot (older dated snapshots can differ). A cutoff line the parser cannot read throws. Docs provenance ispath: 'Knowledge Cutoff', and a failed page marks itunavailable.DOCS_CACHE_VERSIONgoes to v48 (main took v47 in #744).
What the rows will serve#
| Row | Pricing (per 1M tokens) | >272K tier | knowledgeCutoff |
|---|---|---|---|
gpt-6.2-astra | $8 in / $0.4 cached / $10 cache write / $40 out | 2x in+cache, 1.5x out | 2026-05-18 |
gpt-6.2-sol | $2 in / $0.1 cached / $2.5 cache write / $10 out | 2x in+cache, 1.5x out | 2026-06-01 |
Sources: https://developers.openai.com/api/docs/models/gpt-6.2-astra.md and https://developers.openai.com/api/docs/models/gpt-6.2-sol.md, also in fixtures/native-reasoning-docs.json from #712. I checked them against a fresh capture taken today.
Other rows#
I ran the parser over all 109 pages in the current models/all.md index, before and after the change:
- Pricing changes only for the two GPT-6.2 pages. The stricter refusal does not refuse any page that parsed before.
- 87 pages state a cutoff, and all of them now parse. Their Model ID and default-snapshot rows gain
knowledgeCutoff. - Not covered:
gpt-6-cyberstill refuses. Its long-context bullet prices input, cached input and output but not cache writes, so building the tier would mean guessing one lever. - Not covered:
o3,o3-proandgpt-realtime-2.1-minikeepreasoning: null. Their pages say "Reasoning token support" but state no effort list and no off value, so the page does not state the fact.
Tests#
model-facts.test.ts: the GPT-6.2 fixture pages give the rates, the tier and the cutoff. A worded multiplier refuses. An unreadable cutoff throws.openai-aliases.test.ts: the alias and default snapshot get the cutoff, an older snapshot gets null, and a failed page marks the cutoff unavailable.
Known limits#
The card does not model OpenAI's optional 12-hour cache write. A request that opts into ttl: "12h" pays twice the 30-minute cache-write rate: $20 instead of $10 per 1M tokens on Astra, and $5 instead of $2.5 on Sol. The pages state it as "A 12-hour cache write costs $20 per million tokens for short-context requests at Standard pricing". The rate-card format (packages/rate-card/src/card.ts, the RateCard type) has no field for a note or caveat, so this PR records it nowhere on the card and does not invent a rate structure for it.