Repository navigation
fix(models): stop false long-context fee warnings for GPT-6.1 Sol on ChatGPT plans - #329
Merged
Merged
Conversation
…ChatGPT plans OpenAI raised GPT-6.1 Sol's Codex default window to 500K and charges ChatGPT subscriptions no long-context fee for it. API keys still pay 2x input and 1.5x output above 272K, and no other model changed. clodex still attached the API-key 272K band to the ChatGPT-plan row, so a session that grew past 272K input tokens got a higher-rate notice, and choosing any --context stop above 272K (including the new 500K default when named explicitly) warned about a fee the user does not pay. Drop the band for gpt-6.1-sol on the OAuth path only. Derive the band when the catalog is read instead of trusting the cached copy, so existing installs and named accounts stop warning without a refresh. Seed the 500K window for when discovery is unavailable, and say so in README and `models --help`.
…K default The announcement waives long-context fees for GPT-6.1 Sol's new 500K default on ChatGPT plans and says nothing about larger windows. Move the ChatGPT-plan band from none to 500K so a stop past the default (such as max) still warns.
Owner
Author
|
Merged after the pre-PR gate. Verification record:
|
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.
If you use GPT-6.1 Sol through a ChatGPT/Codex sign-in, clodex was warning you about long-context fees you don't pay. OpenAI now gives GPT-6.1 Sol a 500K default window on ChatGPT plans with no long-context fees, but clodex still applied the API-key rule: "above 272,000 tokens, the whole request costs 2x input and 1.5x output." For that one model on a ChatGPT sign-in, clodex now warns only when you choose a window larger than 500K. GPT-6.1 Sol through an API key, and every other model, still warn exactly as before.
The user-visible failure
On 2026-10-13 OpenAI raised GPT-6.1 Sol's default context in Codex and ChatGPT from 272K to 500K, with no long-context fees for usage that comes from a ChatGPT subscription. API prompts over 272K input tokens still bill at 2x input and 1.5x output. After
clodex providers refresh-models, the live Codex catalog reportscontext_window: 500000forgpt-6.1-sol, but clodex kept attaching its 272K pricing band to the row. So:clodex models --context sol=standard(now 500K) andsol=max(872K) both printed "can grow past the 272,000-token pricing boundary … 2x input and 1.5x output".Reproduced against a copy of a real
~/.clodex(refreshed today), using the released 2.21.0 compared with this branch'sdist/cli.js:Root cause
openAiPricingMetadata()derives the band from the model family (GPT ≥ 5.5,gpt-daybreak*). It served both API keys and ChatGPT OAuth. On OAuth it ran in three places: the seed list, the catalog parser for unseeded models, and the read-time overlayapplyOAuthSeedContextMetadata. Refresh persists the band intoproviders.json, and the overlay preferred the cached value (model.pricingBoundary ?? …). Changing the derivation alone would therefore have left every refreshed install warning until it refreshed again.The change
openAiOAuthPricingMetadata()wraps the API rule and gives the exact idgpt-6.1-sola ChatGPT-plan band at 500K. The announcement waives fees for the new 500K default and says nothing about larger windows, so the band moves rather than disappearing. The OAuth seed builder, the OAuth catalog parser, and the OAuth overlay all use it. The API-key paths (fetch-template-models.ts, the non-OAuth branch ofprojectProviderCachedModels) are untouched.gpt-6.1-solseed window goes from 272K to 500K, matching the live catalog. The seed is only consulted when discovery fails or a row omits the field. A cached 272K window is still respected, because a cached window is a provider answer.clodex models --helpdescribe the exception.Deliberately left out: other models, other providers, and the API-key band. Pricing is not part of the patch-config hash (
computePatchConfigHashhashes alias, context, display and effort), so existing patches stay valid and no re-patch is needed.Tests and mutations
New or changed tests stage state through production producers: the real OAuth refresh with only
fetchstubbed, real projection and materialization, the realmain(['models', '--context', …])CLI, and on-disk registry plusloadRegistryProvidersSyncfor account slots. The stale-cache fixtures copy the exact row shape found in a real refreshedproviders.json.Each mutation below was run against the full test files (no
-t) and turned at least one test red:standard/maxcases, seed, account-slot testsgpt-6.1-sol-unreleasednegatives (overlay and refresh)openai-api-pricing-boundarysuitegpt-6.1-sol-unreleased,gpt-6.1-luna)oauth-pricing-account-slots(persisted and env selection)Gate:
pnpm typecheck && pnpm test && pnpm buildall pass (Node 24.14.1,CLODEX_HOMEset to a temp dir,CLAUDE_CODE_ENTRYPOINT=cli): 3464 passed, 20 skipped.What was not verified
Failure and rollback
Pure metadata change; no request or transport behaviour changes. Reverting restores the warnings. No persisted data is migrated or rewritten.