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: footer cost marker missing for providers that do not report cost (2.2.0) #59923
Since OpenCode 2.2.0 the TUI footer no longer shows the session cost ($X.XX) for providers that do not report cost. 2.2.0 switched session cost to provider-reported values (#58562); with subscription-style providers (e.g. OpenCode Go models) the reported cost is always 0, and the footer hides the cost segment when it is not greater than 0. So the marker is gone entirely, even though everything needed to estimate it client-side is still available.
Active plugins: @miguelmartens/opencode-caveman (server), plus local TUI plugins (go-account-label, session-cost-estimate)
Reproduction
Use a subscription-based provider whose models do not report per-token cost (OpenCode Go models in my case).
Run a session and generate a few responses.
Watch the footer: context usage (180.7K (18%)) renders, but no $ cost marker ever appears.
GET /api/session shows "cost": 0 for every session despite non-zero token usage.
Expected Behavior
The footer should keep showing session cost, falling back to a local estimate (session tokens × model catalog pricing) when the provider does not report one — the same calculation OpenCode performed locally before 2.2.0. Or, at minimum, the fallback should be configurable.
Actual Behavior
No cost marker in the footer at all. The session cost stored/returned by the server is 0 for every session on 2.2.0.
Additional Context
The regression started exactly at v2.2.0. Local history (same provider, same machines): every session up to v2.1.4 recorded non-zero cost; all 20 sessions created after updating to 2.2.0 recorded exactly 0.0, including long ones with millions of cache-read tokens.
The data needed for the old estimate is still exposed to the TUI: data.session.get(id).tokens (cumulative input/output/cache read/write) and the model catalog prices. I shipped a small TUI plugin that recomputes tokens × catalog pricing in the prompt.footer.status slot and the numbers match the pre-2.2.0 behavior closely, so the information is available client-side.
Thanks for the clear report and for checking the before/after data.
I think this is a duplicate of #59861. That issue asks for the same thing: an optional estimate from catalog prices in the TUI footer and sidebar when a provider reports a $0 cost, as OpenCode Go does for usage covered by the subscription.
Some context: the $0 is intended in 2.2.0. Since #58562, OpenCode records the cost the endpoint reports, and a reported zero counts as the real cost. Catalog pricing is only used when an endpoint doesn't report a cost. The non-zero figures before 2.2.0 were estimates at list prices, not amounts you were charged. You can see how much of your Go allowance you've used with /usage.
Possible duplicates and related issues, ordered by likelihood:
Your local plugin is a good stopgap until then. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Closing this as a duplicate of #59861. It asks for the same thing: an optional estimate from catalog prices in the footer and sidebar when the provider reports a $0 cost. Please follow #59861 and the open PR #59864, which adds it as an opt-in experimental.cost-estimate. I left this open for a day in case it was different, and there was no reply. If it is different, comment here and we can reopen it. Thanks again for the detailed report and the plugin workaround!
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the clear report and for checking the before/after data.
I think this is a duplicate of #59861. That issue asks for the same thing: an optional estimate from catalog prices in the TUI footer and sidebar when a provider reports a $0 cost, as OpenCode Go does for usage covered by the subscription.
Some context: the $0 is intended in 2.2.0. Since #58562, OpenCode records the cost the endpoint reports, and a reported zero counts as the real cost. Catalog pricing is only used when an endpoint doesn't report a cost. The non-zero figures before 2.2.0 were estimates at list prices, not amounts you were charged. You can see how much of your Go allowance you've used with
/usage.Possible duplicates and related issues, ordered by likelihood:
experimental.cost-estimate)Your local plugin is a good stopgap until then. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencodejr commentedon Oct 29, 2026
Closing this as a duplicate of #59861. It asks for the same thing: an optional estimate from catalog prices in the footer and sidebar when the provider reports a $0 cost. Please follow #59861 and the open PR #59864, which adds it as an opt-in
experimental.cost-estimate. I left this open for a day in case it was different, and there was no reply. If it is different, comment here and we can reopen it. Thanks again for the detailed report and the plugin workaround!