Skip to content

OpenCode Go — API Proxy Returns cost: "0" and Dashboard Not Tracking Usage #26213

Closed as not planned

Description

@kodakwest

Description

Summary

External API calls to OpenCode Go (https://opencode.ai/zen/go/v1/chat/completions) return "cost": "0" in the response payload for all models tested. The usage dashboard at opencode.ai shows inconsistent or missing tracking for these calls, while the requests themselves complete successfully.


Environment

  • Provider: OpenCode Go (flat $10/mo subscription)
  • Endpoint: https://opencode.ai/zen/go/v1/chat/completions
  • Auth: Bearer API key (standard Go subscription key)
  • Models tested: deepseek-v4-flash, mimo-v2.5-pro, qwen3.6-plus
  • Client: (OpenAI-compatible HTTP client), also reproduced with bare curl
  • OS: WSL2 (Ubuntu) on Windows 11

Steps to Reproduce

  1. Send a POST request to https://opencode.ai/zen/go/v1/chat/completions with a valid Go API key and any Go model ID.
  2. Observe the "cost" field in the response.
  3. Check the Go usage dashboard at opencode.ai.

Example request:
curl -s -X POST "https://opencode.ai/zen/go/v1/chat/completions"
-H "Authorization: Bearer $OPENCODE_GO_API_KEY"
-H "Content-Type: application/json"
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"say OK"}],"max_tokens":50}'


Expected Behavior

  • Response "cost" field reflects the actual token cost for the request.
  • Dashboard updates to reflect usage against the rolling ($12/5hr), weekly ($30), and monthly ($60) limits.

Actual Behavior

  • Response always returns "cost": "0" across all models tested, regardless of token count.
  • Dashboard tracking is inconsistent:
    • Cron-job-style direct API calls appear with ~15–20 minute delay.
    • Interactive session calls via non-TUI clients show significantly longer delays or do not appear at all.
    • No OpenRouter or Gemini usage is leaking into Go — calls are correctly routed.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jul 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions