You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I am about to request has not been suggested before.
Describe the enhancement you want to request
ChatGPT and Codex OAuth sessions intentionally report zero cost because subscription usage does not expose billed API charges.
Add an opt-in providers.openai.oauth_cost_estimates configuration field so users can retain the catalog price calculation when they want a local API-equivalent estimate.
The default and explicit false must keep the current zero-cost behavior.
The estimate must not be represented as a ChatGPT subscription charge or invoice.
+1 — would love to see this prioritized, especially for OpenAI Enterprise credit accounts.
While flat personal subscriptions don't have per-token charges, OpenAI Enterprise accounts consume from a shared enterprise credits pool when using Codex/OpenAI OAuth. In the Codex CLI/app, an estimated cost of the credits used is displayed for each session, whereas OpenCode currently zeroes out draft.cost = [] in packages/core/src/plugin/provider/openai.ts and always displays $0.00.
Having estimated costs (either opt-in or enabled for Enterprise/credit-backed accounts) makes it much easier to track and manage credit consumption in OpenCode.
You'd like an opt-in providers.openai.oauth_cost_estimates setting. When it's enabled, ChatGPT/Codex OAuth sessions would show a local, API-equivalent cost estimate based on catalog prices. By default (or with false) the cost would stay at zero, and the estimate would never be presented as a ChatGPT subscription charge.
For context: the zero cost is deliberate right now. The OpenAI provider clears the catalog cost for Codex models when you're signed in with a ChatGPT account, because the subscription covers that usage. So this would be a new option rather than a bug fix. Maintainers will consider it.
Activity
gh-ppathi commentedon Oct 14, 2026
+1 — would love to see this prioritized, especially for OpenAI Enterprise credit accounts.
While flat personal subscriptions don't have per-token charges, OpenAI Enterprise accounts consume from a shared enterprise credits pool when using Codex/OpenAI OAuth. In the Codex CLI/app, an estimated cost of the credits used is displayed for each session, whereas OpenCode currently zeroes out
draft.cost = []inpackages/core/src/plugin/provider/openai.tsand always displays$0.00.Having estimated costs (either opt-in or enabled for Enterprise/credit-backed accounts) makes it much easier to track and manage credit consumption in OpenCode.
opencodejr commentedon Oct 28, 2026
Thanks for the request, and for the earlier PR!
You'd like an opt-in
providers.openai.oauth_cost_estimatessetting. When it's enabled, ChatGPT/Codex OAuth sessions would show a local, API-equivalent cost estimate based on catalog prices. By default (or withfalse) the cost would stay at zero, and the estimate would never be presented as a ChatGPT subscription charge.For context: the zero cost is deliberate right now. The OpenAI provider clears the catalog cost for Codex models when you're signed in with a ChatGPT account, because the subscription covers that usage. So this would be a new option rather than a bug fix. Maintainers will consider it.
Related issues: