Multi Model Cost Calculations are Bugged #4462

Open
opened 2026-02-16 17:43:50 -05:00 by yindo · 3 comments
Owner

Originally created by @maharshi365 on GitHub (Jan 8, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I think i found a bug with cost calculation. Occasionally i will use multiple models (generally claude to do an plan and initial implementation, and gemini to cleanup). I noticed today the cost calculation actually went down after i started using gemini. I think maybe its not taking into account what model each message was sent to ?

Plugins

No response

OpenCode version

1.1.6

Steps to reproduce

  1. Do some work using a model (im using Claude Opus 4.5 from Amazon Bedrock)
  2. Switch while in the session to a different model (im using Gemini 3 Pro Preview from Google)

See the costs not working right.

Screenshot and/or share link

https://opncd.ai/share/Un4b1u0T

Operating System

Windows 11

Terminal

Powershell 7

Originally created by @maharshi365 on GitHub (Jan 8, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I think i found a bug with cost calculation. Occasionally i will use multiple models (generally claude to do an plan and initial implementation, and gemini to cleanup). I noticed today the cost calculation actually went down after i started using gemini. I think maybe its not taking into account what model each message was sent to ? ### Plugins _No response_ ### OpenCode version 1.1.6 ### Steps to reproduce 1. Do some work using a model (im using Claude Opus 4.5 from Amazon Bedrock) 2. Switch while in the session to a different model (im using Gemini 3 Pro Preview from Google) See the costs not working right. ### Screenshot and/or share link https://opncd.ai/share/Un4b1u0T ### Operating System Windows 11 ### Terminal Powershell 7
yindo added the windowsbugzen labels 2026-02-16 17:43:51 -05:00
Author
Owner

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

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

  • #2891: Cost in storage/session is always 0
  • #2020: bug: token cost seems inaccurate
  • #485: Cost is dropping dramatically when opencode is finishing up
  • #5440: Incorrect token usage

These issues all relate to cost calculation inaccuracies. Your case specifically mentions costs decreasing after switching models, which shares similarities with the cost tracking problems described in these issues.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 8, 2026): This issue might be a duplicate of existing issues. Please check: - #2891: Cost in storage/session is always 0 - #2020: bug: token cost seems inaccurate - #485: Cost is dropping dramatically when opencode is finishing up - #5440: Incorrect token usage These issues all relate to cost calculation inaccuracies. Your case specifically mentions costs decreasing after switching models, which shares similarities with the cost tracking problems described in these issues. Feel free to ignore if none of these address your specific case.
Author
Owner

@maharshi365 commented on GitHub (Jan 8, 2026):

Got claude to do an analysis. It seems like a bug with TUI showing information for the last 100 messages, when the session is longer.
https://opncd.ai/share/zM46uSja

@maharshi365 commented on GitHub (Jan 8, 2026): Got claude to do an analysis. It seems like a bug with TUI showing information for the last 100 messages, when the session is longer. https://opncd.ai/share/zM46uSja
Author
Owner

@bluet commented on GitHub (Feb 5, 2026):

I'm looking at this issue too. It seems that https://github.com/anomalyco/opencode/pull/7763 needs to be merged first before we can work on anything else.

@bluet commented on GitHub (Feb 5, 2026): I'm looking at this issue too. It seems that https://github.com/anomalyco/opencode/pull/7763 needs to be merged first before we can work on anything else.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4462