Skip to content

Bug Report: OpenCode Go Quota Calculation Incorrectly Sums Percentages Instead of Dollar Usage* #47491

Closed as not planned

Description

@brnme

Description

Dear OpenCode Team,

I am writing to report a critical bug in the OpenCode Go quota calculation logic that is causing premature service refusal and negatively impacting paying subscribers.

The Problem

According to your official documentation, OpenCode Go usage limits are defined in dollar amounts:

  • 5-hour limit — $12 usage allowance
  • Weekly limit — $30 usage allowance
  • Monthly limit — $60 usage allowance

The documentation explicitly states: "限制以美元价值定义" (Limits are defined in dollar value). This means that quota consumption should be calculated by summing the actual dollar cost of each API request across each time window, and blocking requests only when the cumulative dollar spend reaches the respective cap ($12, $30, or $60).

However, the current implementation appears to be calculating quota exhaustion by summing percentage-based usage across individual models instead. When the sum of these percentages reaches 100%, the system refuses further requests—regardless of the actual dollar amount spent.

Observed Impact

This is not an isolated issue. Multiple users have reported the same behavior:

  • One subscriber reported that after spending only $7.50 (out of a $30 weekly limit), their weekly quota showed 100% used and they were completely blocked from using Go models for 3 days.
  • Another user with the $60/month plan reported that their 5-hour limit was consumed way too fast despite very low actual spend, with monthly usage already at 37% in just 2 days while total spent was less than $5.
  • A separate issue documented the same symptom: "Go quota shows 100% exhausted but visible usage is only ~$20".

The common thread across all these reports is clear: the quota meter claims far more consumption than the actual dollar amount shown in the usage dashboard.

Why This Matters

This bug fundamentally contradicts the advertised pricing model. Subscribers are paying $10/month (or $5 for the first month) based on the understanding that they receive $12/5hr, $30/week, and $60/month of actual dollar-value usage. When the system blocks requests at a fraction of the promised dollar limit, it constitutes a material deviation from the service as described.

Paying customers are being locked out of a service they've prepaid for, often days before their quota should logically reset. This undermines trust in the platform and creates a poor user experience.

Requested Fix

I kindly request that you:

  1. Correct the quota calculation logic to track and enforce limits based on cumulative dollar spend across each time window, as documented—not by summing model-specific percentages.

  2. Ensure the usage dashboard displays consistent data—the dollar amount shown should match the quota consumption calculation.

  3. Consider providing retroactive quota adjustments for subscribers who were incorrectly blocked due to this bug.

I am happy to provide additional details, screenshots, or assist with testing if needed. Please let me know if you require any further information.

Thank you for your attention to this matter. I look forward to your response.

Sincerely,

Heal
hanlie_heal@qq.com

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 Sep 5, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The description reads as an AI-generated formal letter ("Dear OpenCode Team", "Sincerely, Heal") rather than a direct bug report. Long AI-generated walls of text are not acceptable.
    • Required fields are empty: OpenCode version, Steps to reproduce, Operating System, and Terminal are all left as _No response_. These are needed for a valid bug report.
    • No concrete reproduction steps are provided — the report cites other users' experiences rather than the author's own observed behavior.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Sep 5, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

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