Skip to content

Hide dollar cost estimates for Codex ChatGPT subscription sessions - #737

Merged
TheGreatAxios merged 8 commits into
mainfrom
cl-7095-do-not-show-token-priced-costs-for-codex-chatgpt
Sep 1, 2026
Merged

Hide dollar cost estimates for Codex ChatGPT subscription sessions#737
TheGreatAxios merged 8 commits into
mainfrom
cl-7095-do-not-show-token-priced-costs-for-codex-chatgpt

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Codex ChatGPT sessions no longer show a public-rate dollar cost estimate.
  • Hide is keyed off live codex/* provider identity, not launch baseURL, so /model switches update $ immediately (including the prompt meter).
  • /cost says the session is covered by ChatGPT subscription, not billed per token. Context usage stays visible.
  • Metered OpenAI API endpoints keep dollar estimates.

Verification

  • Focused tests cover Codex identity vs stale URL, /cost copy, and prompt $ refresh on model select
  • bun run check passes (lint, typecheck, build, full test suite)

Fixes CL-7095
Fixes #477

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.
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

CL-7095

/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.
@TheGreatAxios
TheGreatAxios merged commit 6b68b94 into main Sep 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cost display appears incorrect for GPT-5.6 Luna

1 participant