fix: Minimax always shows two bars, remove conditional skipping#623
Merged
Conversation
…skipping The Minimax provider had conditional fallback logic that skipped the burst card when remaining_percent was 0 (exhausted quota). The API returns remaining_percent: 0 for exhausted windows, which was treated as no data. BuildRemainsUsages now always returns exactly 2 cards using remaining_percent directly as the data source with total=100. No conditionals, no fallbacks. Tests rewritten to match real API response format (remaining_percent fields).
Sanitized snapshot from live /v1/token_plan/remains call capturing the actual response structure with all fields present including status codes, timestamps, remains_time, and percent-based remaining values.
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.
Fixes the Minimax provider conditional bar-skipping bug. BuildRemainsUsages now always returns exactly 2 cards (5h burst + Weekly) using remaining_percent directly. No conditionals, no fallbacks. Includes real API response fixture test. All other 13 provider test fixtures verified correct.