fix: correct quota quiet output calculation for misleading API field naming (#70)#87
Closed
raylanlin wants to merge 1 commit intoMiniMax-AI:mainfrom
Closed
fix: correct quota quiet output calculation for misleading API field naming (#70)#87raylanlin wants to merge 1 commit intoMiniMax-AI:mainfrom
raylanlin wants to merge 1 commit intoMiniMax-AI:mainfrom
Conversation
…naming (MiniMax-AI#70) The API returns current_interval_usage_count as the REMAINING count, not the used count. The table rendering (quota-table.ts) already handled this correctly, but the quiet output (--quiet flag) was computing it backwards. - src/commands/quota/show.ts: fix quiet output to correctly compute used = total - remaining - src/output/quota-table.ts: add clarifying comment - src/types/api.ts: add JSDoc deprecation notes on misleading fields
Contributor
Author
|
Closing — API field naming issue is already being addressed by the team (元鹤). Once the API returns correctly named fields (e.g. |
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
Fixes #70 — the API returns
current_interval_usage_countas the remaining count, not the used count. The table rendering (quota-table.ts) already handles this correctly, but the--quietoutput was computing it backwards.Changes
used = total - remaininginstead ofremaining = total - usage_count@deprecatedJSDoc notes on the two misleading field namesImpact
Users relying on
mmx quota show --quiettab-separated output were getting the used count in the 'remaining' position. This is now corrected.The text table rendering (
mmx quota show) was already correct — this change only affects the machine-parseable quiet mode output.