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
Token counter broken in Desktop App with Synthetic provider (cost stuck at $0, usage at 0%, tokens frozen) #39092
All three issues share the same context: a state reset performed to recover from the WSL crash (#39071). The token counter bug appeared alongside the provider regression in #39072.
Problem
The token counter at the bottom of the session shows inconsistent values:
Cost : stays at $0 regardless of conversation length
Usage : stays at 0%
Tokens : displays 28690 (value does not appear to evolve as expected, need to verify whether tokens decrease over the session)
Steps to reproduce
Launch the OpenCode Desktop App
Start a session with the Synthetic provider (built-in or custom)
Exchange several messages
Observe the counter at the bottom: cost at $0, usage at 0%, tokens frozen
Environment
OpenCode Desktop v1.18.4
Windows 10
Provider: Synthetic (built-in) and Synthetic Custom (OpenAI-compatible, baseURL https://api.synthetic.new/openai/v1)
The bug reproduces with both provider configurations
Hypotheses
The Synthetic / custom provider may not return token usage metadata in its response, or OpenCode does not parse it correctly for this type of provider.
The $0 cost may stem from a missing price/token entry in the models.dev catalog for Synthetic models.
Suggestions
Verify that token usage metadata parsing works for custom OpenAI-compatible providers.
Allow users to manually set the price/token for custom providers so cost can be computed.
When usage data is unavailable, display n/a instead of 0 to distinguish "no data" from "zero consumption".
Update: after a longer observation, the token counter does increase correctly over the conversation. It is not frozen. What remains broken: the cost ($) stays at $0 and the usage percentage stays at 0%. Only the token count works among the three values.
Activity
drfrangipane commentedon Jul 27, 2026
Update: after a longer observation, the token counter does increase correctly over the conversation. It is not frozen. What remains broken: the cost ($) stays at $0 and the usage percentage stays at 0%. Only the token count works among the three values.
github-actions commentedon Sep 26, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.