feat(minimax): auto-detect CN/global endpoint and region label#1
feat(minimax): auto-detect CN/global endpoint and region label#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba1c2be45a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const line = { | ||
| label: "Session", | ||
| label: resolvedEndpoint ? "Session (" + resolvedEndpoint + ")" : "Session", |
There was a problem hiding this comment.
Keep MiniMax progress label stable across regions
Changing the emitted label to Session (CN)/Session (GLOBAL) breaks downstream matching because the manifest still declares Session as the primary overview line (plugins/minimax/plugin.json:10), and both overview filtering and tray primary selection use exact label equality (src/components/provider-card.tsx:174-184, src/lib/tray-primary-progress.ts:65-71). In those contexts, MiniMax usage data is produced but not recognized, so users can see missing overview progress and --% tray output.
Useful? React with 👍 / 👎.
| } | ||
| lastError = "Could not parse usage data." | ||
| } catch (e) { | ||
| lastError = String(e) |
There was a problem hiding this comment.
Preserve non-auth errors across AUTO endpoint retries
This assignment unconditionally replaces prior attempt failures with the last endpoint’s error, so AUTO mode can misreport outages as credential problems. For example, if GLOBAL returns a real server failure (Request failed (HTTP 500) from line 319) and the CN retry returns auth, the final error becomes Session expired, which sends users to rotate keys instead of treating it as service unavailability. Keep the higher-signal non-auth failure when later retries only add auth noise.
Useful? React with 👍 / 👎.
|
Closing this fork PR in favor of upstream PR: robinebers#230 |
Description
Adds MiniMax region auto-detection and improves CN usability without manual endpoint config.
MINIMAX_CN_API_KEY: triesCN -> GLOBALMINIMAX_CN_API_KEY: triesGLOBAL -> CNMINIMAX_CN_API_KEYfirst).Session (CN)/Session (GLOBAL).Related Issue
N/A
Type of Change
Testing
bun run buildand it succeededbun run testand all tests passbun tauri devAdditional validation:
bun run test -- plugins/minimax/plugin.test.js(pass)bun run test:coveragewas executed; suite passed, but repo-level coverage thresholds currently fail in pre-existing unrelated files.Screenshots
Verified locally with screenshot showing MiniMax
Session (CN)and live usage values.Checklist
mainbranch