opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[TUI] $ spent in context decreases after request

Open artemkalugin01 opened this issue 1 week ago • 3 comments

Description

I experienced 2 issues with unreliable $ spent in Context block.

Issue №1: Without model(Sonnet 4.5) change new value in $ spent sometimes decreases by a small amount after message processed(~$0.10), can provide no steps on how to reproduce, seemingly random requests.

Issue №2: After changing model from Sonnet 4.5 to Haiku 4.5 and running first message $ spent in context decreased by ~$2, while billing in Zen seems correct (screenshot attached)

Models: Claude Opus 4.5, Claude Sonnet 4.5, Claude Haiku 4.5. Provider: Zen

Plugins

OpenCode version

1.0.220

Steps to reproduce

  1. Have open session with Claude Sonnet 4.5 selected.
  2. Change model to Claude Haiku 4.5

Expected behavior: Amount in $ spent increased by correct amount

Actual behavior: Amount in $ spent decreased by ~$2

Screenshot and/or share link

Image

Operating System

macOS Sonoma 14.1

Terminal

iTerm2

artemkalugin01 avatar Jan 05 '26 20:01 artemkalugin01