Skip to content

fix: Minimax always shows two bars, remove conditional skipping#623

Merged
rygel merged 2 commits into
developfrom
fix/minimax-always-two-bars
Jun 6, 2026
Merged

fix: Minimax always shows two bars, remove conditional skipping#623
rygel merged 2 commits into
developfrom
fix/minimax-always-two-bars

Conversation

@rygel

@rygel rygel commented Jun 6, 2026

Copy link
Copy Markdown
Owner

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.

…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.
@rygel
rygel merged commit 493b644 into develop Jun 6, 2026
17 checks passed
@rygel
rygel deleted the fix/minimax-always-two-bars branch June 6, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants