opencode icon indicating copy to clipboard operation
opencode copied to clipboard

The token cost generated by session titles, message summary titles, and body summaries has not been accounted for.

Open junmediatek opened this issue 2 weeks ago • 3 comments

Description

Session titles update code: https://github.com/anomalyco/opencode/blob/85ed32931873c764ea6a6ec59ba2ce2f73667bfc/packages/opencode/src/session/prompt.ts#L1635

Message summary title code: https://github.com/anomalyco/opencode/blob/85ed32931873c764ea6a6ec59ba2ce2f73667bfc/packages/opencode/src/session/summary.ts#L84

body summary code: https://github.com/anomalyco/opencode/blob/85ed32931873c764ea6a6ec59ba2ce2f73667bfc/packages/opencode/src/session/summary.ts#L127

None of the above LLM requests have had their costs accounted for.

Is this a bug, or is it a deliberate design?

Plugins

NA

OpenCode version

1.1.3

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

VSCode remoteSSH

junmediatek avatar Jan 07 '26 06:01 junmediatek

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

  • #5951: Token count is way off (major discrepancy between shown token count and actual API usage)
  • #6228: Configuration option to disable message summary generation (specifically mentions that summary generation creates additional LLM requests with costs)
  • #2891: Cost in storage/session is always 0 (cost tracking issues)
  • #4925: Display total cost for session (cost visibility concerns)

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

github-actions[bot] avatar Jan 07 '26 06:01 github-actions[bot]

@rekram1-node @thdxr

Could you help to check this issue?

junmediatek avatar Jan 07 '26 06:01 junmediatek

@rekram1-node Is there anything update for this issue?

junmediatek avatar Jan 12 '26 11:01 junmediatek