feat: add MiniMax token-plan provider - #34
Closed
lamchun1110 wants to merge 1 commit into
Closed
Conversation
Adds a MiniMax provider reporting Session (per-interval) and Weekly remaining quotas from GET https://www.minimax.io/v1/token_plan/remains using a Bearer API key. Modeled on providers/zai: client + mapper + auth, keychain-backed key (zeroized), success checked via base_resp.status_code, with a 'no token plan' -> permission error. Registered + contract/links covered, with unit tests.
Contributor
Author
|
Superseded by #38, which combines Kimi and MiniMax into a single PR. The two were split across branches that touch the same shared files (registry, contract test, icon map) and would conflict on merge, and #38 also includes the status-bar icon fix so the logos render in the menu bar. Closing in favor of #38. |
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.
Adds a MiniMax provider so OpenQuota can show MiniMax token-plan usage.
What
providers/minimax/(modeled onproviders/zai/):client,mapper,auth,mod.current_interval_remaining_percent)current_weekly_remaining_percent)generalmodel entry, falling back to the first model ifgeneralis absent.GET https://www.minimax.io/v1/token_plan/remains, Bearer API key.base_resp.status_code == 0; a "no token plan" message maps to aPermissionerror (like Z.ai'sNoCodingPlan).MINIMAX_API_KEY/~/.config/openquota/minimax.json), wrapped inZeroizing, never logged.lib.rs), declared inproviders/mod.rs, covered by the provider-registry contract and the provider-links test.Verification
Caveat
The `/v1/token_plan/remains` endpoint is undocumented (discovered against the live API). Field paths may need adjustment if MiniMax changes the response.
Contributed under the repo's MIT license. Built/tested on Linux and macOS.