fix(quota): correct reversed used/remaining values in quiet mode#56
Open
BLUE-coconut wants to merge 1 commit intoMiniMax-AI:mainfrom
Open
fix(quota): correct reversed used/remaining values in quiet mode#56BLUE-coconut wants to merge 1 commit intoMiniMax-AI:mainfrom
BLUE-coconut wants to merge 1 commit intoMiniMax-AI:mainfrom
Conversation
The quiet mode (--quiet) in `quota show` was treating `current_interval_usage_count` as "used" and subtracting it from total to get "remaining". However, the API actually returns remaining/available counts in this field (consistent with the `model_remains` wrapper name). This caused the TSV output columns to be reversed: what was labeled as "remaining" was actually "used", and vice versa. The rich text table (quota-table.ts) already handled this correctly. Fixes MiniMax-AI#53 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mmx quota show --quietoutputting reversed used/remaining valuescurrent_interval_usage_countreturns remaining counts (not used), consistent with themodel_remainswrapper nameremaining = total - usage_count, treatingusage_countas "used" when it's actually "remaining"quota-table.ts) already handled this correctly; only the quiet TSV path had the bugBefore (usage_count=1497, total=1500):
After:
Fixes #53
Test plan
mmx quota show --quietand verify used/remaining columns are correctmmx quota show --output textand confirm rich table is unchangedmmx quota show --output jsonand cross-check raw values🤖 Generated with Claude Code