fix(usage): treat MiniMax current_interval_usage_count as remaining

Fixes #50372
This commit is contained in:
Julian Streibel 2026-03-19 13:51:56 +01:00
parent 4443cc771a
commit 2f280f6f2b
2 changed files with 5 additions and 3 deletions

View File

@ -67,8 +67,6 @@ const USED_KEYS = [
"usedPrompt",
"prompts_used",
"promptsUsed",
"current_interval_usage_count",
"currentIntervalUsageCount",
"consumed",
] as const;
@ -132,6 +130,10 @@ const REMAINING_KEYS = [
"promptLeft",
"prompts_left",
"promptsLeft",
"current_interval_usage_count",
"currentIntervalUsageCount",
"current_interval_remaining_count",
"currentIntervalRemainingCount",
"left",
] as const;

View File

@ -219,7 +219,7 @@ describe("provider usage loading", () => {
},
],
},
expected: { usedPercent: 25 },
expected: { usedPercent: 75 },
},
{
name: "keeps payload-level MiniMax plan metadata when the usage candidate is nested",