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
{{ message }}
Repository navigation
tui: optional catalog-price estimate for providers that report $0 session cost #59861
Since v2.2.0, provider-reported session costs override the catalog-price
estimate, and a reported zero is authoritative. OpenCode Go reports $0
(subscription-included usage), so the "$X spent" line no longer appears in the
sidebar Context section or the prompt footer for Go sessions. I'd like an
optional catalog-price-based estimate for providers that report $0.
Active plugins: ./herdr-opencode (local, via ~/.config/opencode/cli.json)
Reproduction
Update to opencode v2.2.0.
Run a session on an OpenCode Go model (e.g. opencode-go/glm-5.3-flash) and
exchange a few messages.
Check the sidebar Context section and prompt footer.
Expected Behavior
Show a catalog-price-based "$X spent" estimate (clearly marked as an estimate)
for providers that report $0 due to subscription billing, keeping parity with
pay-per-token providers.
Actual Behavior
Recorded cost stays 0, and both the sidebar Context section and prompt footer
hide the money figure entirely (they only render when cost > 0). Only token
counts and "% used" remain.
packages/core/src/session/usage.ts: "What an endpoint says it charged beats
the catalog... A reported zero is authoritative."
Local data confirms the change: a session started 2026-10-27 15:10 (just
after the brew update, while the pre-update background service was still
serving) recorded $0.009 in message costs; sessions after the v2.2.0 service
took over record exactly 0 on the same model, which has catalog pricing
($0.15 in / $0.50 out per M tokens).
/usage surfaces Go allowance limits, which partially covers this, but an
inline estimate would restore at-a-glance cost visibility.
Thanks for the clear write-up and the before/after data!
You'd like an optional, clearly-labelled "$X spent" estimate based on catalog prices, shown in the TUI sidebar and prompt footer when a provider reports a $0 charge, as it does for OpenCode Go subscription usage.
For context: the $0 is intentional in 2.2.0. Since #58562, OpenCode records the cost the endpoint reports and treats a reported zero as authoritative. Catalog pricing is now only a fallback for endpoints that don't report a cost. So this is a new option rather than a regression. Maintainers will consider it.
In the meantime, a TUI plugin could probably show a figure like this through the sidebar.content or prompt.footer.status slots, by pricing the session's tokens from the model catalog.
Reacted by Mittelwelt and Pierre Couy
Reacted by Mittelwelt, Ratouit Thomas and Pierre Couy
Please bring back the continuous cost display. I record the costs for each unit of work done by a model and now I have to jump through hoops to get it. I know it's not what I actually pay since I have Go but I want the data.
Adding another 2.2.5 data point for the same behavior.
Environment
opencode 2.2.5 (macOS arm64, TUI)
provider/model: opencode-go/deepseek-v4.1-flash, variant max
Before 2.2.0 the prompt footer and sidebar showed the catalog-price estimate. On 2.2.5 all 50 recent Go sessions I checked persist cost: 0 while tokens are recorded normally. The debug usage event from the gateway still contains the list price and the plan allowance:
So the catalog value is still reported, it is just no longer used for the session cost.
opencode stats --cost --days 30 still reports $14.01, but that comes from messages created before 2.2.0; new Go messages add 0.
This is not only cosmetic: after compaction the token count can stay flat while catalog spend keeps accumulating, so losing the cost line removes the easiest signal that a session is running away.
An opt-in ≈ $X estimate (as proposed here) and/or a per-session allowance figure would restore the visible signal without changing the authoritative $0 cost. This is the same case as #61712. Thanks.
Bring it back please. The estimate really helps you keep track how you spent(this is probably why they hide it). Having the estimate displayed in others providers but not in opencode go makes me want to use other providers instead of opencode go.
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the clear write-up and the before/after data!
You'd like an optional, clearly-labelled "$X spent" estimate based on catalog prices, shown in the TUI sidebar and prompt footer when a provider reports a $0 charge, as it does for OpenCode Go subscription usage.
For context: the $0 is intentional in 2.2.0. Since #58562, OpenCode records the cost the endpoint reports and treats a reported zero as authoritative. Catalog pricing is now only a fallback for endpoints that don't report a cost. So this is a new option rather than a regression. Maintainers will consider it.
Related issues:
In the meantime, a TUI plugin could probably show a figure like this through the
sidebar.contentorprompt.footer.statusslots, by pricing the session's tokens from the model catalog.Mittelwelt commentedon Oct 28, 2026
Yes. Frankly who literally freaking thought that hiding an estimate instead of clearly flagging as an "estimate" would be a better choice here?
Bring this back please. Thank you.
henryrt commentedon Oct 28, 2026
Please bring back the continuous cost display. I record the costs for each unit of work done by a model and now I have to jump through hoops to get it. I know it's not what I actually pay since I have Go but I want the data.
augustovicente commentedon Oct 30, 2026
up
dcarnicer commentedon Nov 5, 2026
Adding another 2.2.5 data point for the same behavior.
Environment
opencode-go/deepseek-v4.1-flash, variantmaxBefore 2.2.0 the prompt footer and sidebar showed the catalog-price estimate. On 2.2.5 all 50 recent Go sessions I checked persist
cost: 0while tokens are recorded normally. The debug usage event from the gateway still contains the list price and the plan allowance:{ "cost": 0, "billing_source": "go", "list_cost": 0.00236933, "allowance": 0.0014216 }So the catalog value is still reported, it is just no longer used for the session cost.
opencode stats --cost --days 30still reports $14.01, but that comes from messages created before 2.2.0; new Go messages add 0.This is not only cosmetic: after compaction the token count can stay flat while catalog spend keeps accumulating, so losing the cost line removes the easiest signal that a session is running away.
An opt-in
≈ $Xestimate (as proposed here) and/or a per-sessionallowancefigure would restore the visible signal without changing the authoritative $0 cost. This is the same case as #61712. Thanks.brunojustino commentedon Nov 9, 2026
Bring it back please. The estimate really helps you keep track how you spent(this is probably why they hide it). Having the estimate displayed in others providers but not in opencode go makes me want to use other providers instead of opencode go.