Hide dollar cost estimates for Codex ChatGPT subscription sessions - #737
Merged
TheGreatAxios merged 8 commits intoSep 1, 2026
Merged
Conversation
Codex OAuth bills against ChatGPT Plus/Pro, not public per-token rates. Showing those rates as a dollar charge was misleading. Match the coding-plan hide path: suppress $ on the Codex base URL, keep context usage, and let /cost name the reason.
…oken-priced-costs-for-codex-chatgpt
/model updates providerName without rewriting baseURL, so a URL-only hide was stale after API to Codex switches. Live Codex identity hides; a present non-Codex identity shows; URL match remains the no-name fallback.
/model updates providerName without rewriting baseURL, so a URL-only coding-plan hide was stale after switches onto or off Z.AI. Live zai identity hides; a present non-zai identity shows; URL match remains the no-name fallback. Also pin the Codex-to-metered prompt $ refresh.
First-class connect writes kind/slug (zai/default, zai/work). Matching only the bare catalog id skipped those names, so a coding-plan session kept showing dollars when identity was present.
A later model switch recast the whole token sink at the live public rate, or claimed ChatGPT subscription coverage for metered turns. Price each turn at the identity in force when those tokens arrived.
The headless renderer still recast the token sink at the live model. Reuse the session accumulator so hidden turns stay unbilled and mixed copy names the metered portion only.
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.
Summary
codex/*provider identity, not launchbaseURL, so/modelswitches update$immediately (including the prompt meter)./costsays the session is covered by ChatGPT subscription, not billed per token. Context usage stays visible.Verification
/costcopy, and prompt$refresh on model selectbun run checkpasses (lint, typecheck, build, full test suite)Fixes CL-7095
Fixes #477