anomalyco / anomalyco/opencode

OpenCode Go 5-hour limit shows ~50% consumed after only ~$1.80 of usage (DeepSeek V4 Pro, 13.9M cache reads)

Open
#43,387 2 comments 0 reactions 1 assignee View on GitHub

@fwang is already working on this.

Since Aug 19, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Bug Report

OpenCode Go 5-hour usage limit shows ~50% (≈$6 of the $12 window) consumed, but actual usage is only ~$1.80. Requests get rate-limited before the dollar limit is reached.

Actual behavior
  • 5-hour limit: ~50% consumed with < $2 real usage
  • Local opencode stats --days 1 --models output:
    • opencode-go/deepseek-v4-pro: 102 messages, 673.1K input, 143.6K output, 13.9M cache read, local cost $1.03
    • opencode-go/deepseek-v4-flash: 18 messages, 44.6K input, 4.6K output, 233.9K cache read, local cost $0.01
    • Total local cost: $1.83
  • Suspected cause: cache-read tokens billed at full input price instead of the discounted cache price ($0.022/M for DeepSeek V4 Pro), inflating usage ~30x (13.9M x $0.66 = ~$9.2)
Expected behavior

Usage should be counted at the documented Go rates (cache read = $0.022/M off-peak for V4 Pro).

Environment
  • OpenCode 1.18.18
  • Plan: OpenCode Go ($10/mo)
  • Model: opencode-go/deepseek-v4-pro, opencode-go/deepseek-v4-flash

Related: #38570, #24473, #38855, #26213

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.