Mismatch between token spent and billing against my account #6516

Open
opened 2026-02-16 18:04:27 -05:00 by yindo · 5 comments
Owner

Originally created by @dariuszparys on GitHub (Jan 16, 2026).

Originally assigned to: @fwang on GitHub.

Question

I enabled billing before I run this prompt. It was running for now 2,5 hours. I've set a spending limit of 14$ to avoid immediate charge of my card.

The opencode token estimation is giving me the amount of $4.70

Image

And now I get the message the I reached my spending limit.

Image

What is the top right estimation worth basically? It is off by $10?

Originally created by @dariuszparys on GitHub (Jan 16, 2026). Originally assigned to: @fwang on GitHub. ### Question I enabled billing before I run this prompt. It was running for now 2,5 hours. I've set a spending limit of 14$ to avoid immediate charge of my card. The opencode token estimation is giving me the amount of $4.70 <img width="2484" height="71" alt="Image" src="https://github.com/user-attachments/assets/6d1db15a-23bd-4b64-933d-2cf0962ed134" /> And now I get the message the I reached my spending limit. <img width="647" height="91" alt="Image" src="https://github.com/user-attachments/assets/cdbad7b8-9256-4835-923c-65a42dcad10f" /> What is the top right estimation worth basically? It is off by $10?
yindo added the zen label 2026-02-16 18:04:27 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6989: [TUI] $ spent in context decreases after request - Reports cost tracking mismatches where displayed spent value is inaccurate after model changes
  • #7387: Multi Model Cost Calculations are Bugged - Similar issue where cost calculation went down when switching models
  • #5951: Token count is way off - Reports massive discrepancies between OpenCode's token estimation and actual billing from the API provider
  • #7767: session-cost/spent-value under reported for sessions with 100+ messages - Shows cost tracking is underreported in certain scenarios

All of these involve mismatches between OpenCode's displayed token/cost estimation and actual billing. Your issue specifically mentions that the displayed $4.70 estimation was off by ~$10 against a $14 spending limit. This aligns with the pattern seen in these other reports.

Feel free to ignore if your specific case involves different providers or circumstances that aren't covered by these issues.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #6989: [TUI] $ spent in context decreases after request - Reports cost tracking mismatches where displayed spent value is inaccurate after model changes - #7387: Multi Model Cost Calculations are Bugged - Similar issue where cost calculation went down when switching models - #5951: Token count is way off - Reports massive discrepancies between OpenCode's token estimation and actual billing from the API provider - #7767: session-cost/spent-value under reported for sessions with 100+ messages - Shows cost tracking is underreported in certain scenarios All of these involve mismatches between OpenCode's displayed token/cost estimation and actual billing. Your issue specifically mentions that the displayed $4.70 estimation was off by ~$10 against a $14 spending limit. This aligns with the pattern seen in these other reports. Feel free to ignore if your specific case involves different providers or circumstances that aren't covered by these issues.
Author
Owner

@rekram1-node commented on GitHub (Jan 16, 2026):

Would need to see your session more to debug, is it correct that you only had this 1 session ever? Were u using any plugins?

How many subagents were called?

@rekram1-node commented on GitHub (Jan 16, 2026): Would need to see your session more to debug, is it correct that you only had this 1 session ever? Were u using any plugins? How many subagents were called?
Author
Owner

@dariuszparys commented on GitHub (Jan 16, 2026):

@rekram1-node No, I did not have 1 session ever. But I had 1 session ever since I enabled billing on Zen and configured the api key. So I just started opencode connected the api key and let the agent run.

A couple of days ago I used Z.AI GLM 4.7 model in opencode, but it shouldn't be related I think.

I have still my terminal in opencode open. Can you tell me how I share my session with you?

@dariuszparys commented on GitHub (Jan 16, 2026): @rekram1-node No, I did not have 1 session ever. But I had 1 session ever since I enabled billing on Zen and configured the api key. So I just started opencode connected the api key and let the agent run. A couple of days ago I used Z.AI GLM 4.7 model in opencode, but it shouldn't be related I think. I have still my terminal in opencode open. Can you tell me how I share my session with you?
Author
Owner

@rekram1-node commented on GitHub (Jan 16, 2026):

Can u dm me your workspace id and then I can have frank look into ur usage?

Also u can do opencode export > session.json and send that

@rekram1-node commented on GitHub (Jan 16, 2026): Can u dm me your workspace id and then I can have frank look into ur usage? Also u can do `opencode export > session.json` and send that
Author
Owner

@dariuszparys commented on GitHub (Jan 16, 2026):

I dm'ed you on X the workspace ID, but I can't send you the export, it is giving me an error

@dariuszparys commented on GitHub (Jan 16, 2026): I dm'ed you on X the workspace ID, but I can't send you the export, it is giving me an error
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6516