Skip to content

Bug: quota --output json field current_interval_usage_count shows remaining quota, not usage #68

Closed

Description

@xandersbell

Bug Description

When running `mmx quota show --output json`, the field `current_interval_usage_count` does not represent what its name implies.

Actual behavior: The value is the number of remaining calls available in the current interval.

Expected behavior: `current_interval_usage_count` should represent calls already used.

Steps to Reproduce

```bash
mmx quota show --output json --quiet
```

Sample output:

```json
{
"model_name": "MiniMax-M*",
"current_interval_total_count": 1500,
"current_interval_usage_count": 1417
}
```

If `usage_count = 1417` with `total_count = 1500`, the remaining should be `1500 - 1417 = 83`. However, the quota actually expires after ~83 more calls — suggesting `1417` represents the remaining quota, not used amount.

Suggested Fix

Rename `current_interval_usage_count` → `current_interval_remaining_count` to match the actual meaning, or add a separate field for actual usage.

Activity

  1. xandersbell commented on Apr 9, 2026

    @xandersbell
    Author

    Fixed in PR #69 — --output json now adds current_interval_remaining_count and current_weekly_remaining_count fields (semantically correct), while preserving original usage_count fields for backward compatibility. --quiet mode also corrected.

  2. xandersbell commented on Apr 9, 2026

    @xandersbell
    Author

    Updated: PR #69 now fixes the existing current_interval_usage_count / current_weekly_usage_count field values directly (no new fields, no schema change). Values are corrected to actual usage, resolving the semantic mismatch.

  3. xandersbell commented on Apr 9, 2026

    @xandersbell
    Author

    PR #69 update: initial commit added new fields (current_interval_remaining_count) for the correct semantics. After review, we reverted to fix only the existing field values in-place — no new fields, no schema change — to respect the original API contract.

  4. RyanLee-Dev commented on Apr 17, 2026

    @RyanLee-Dev
    Collaborator

    Fixd

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

Metadata

Metadata

Assignees

No one assigned

    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