feat: add MiniMax Coding Plan quota provider#33
Merged
slkiser merged 3 commits intoslkiser:mainfrom Apr 1, 2026
Merged
Conversation
Add minimax-coding-plan provider that fetches rolling 5-hour and weekly quota windows from the MiniMax API for MiniMax-M* text models. Credentials are resolved from OpenCode auth.json. - src/lib/minimax-auth.ts: credential resolution - src/providers/minimax-coding-plan.ts: quota fetch + entries - src/providers/registry.ts: provider registration - tests/lib.minimax-auth.test.ts: 15 auth tests - tests/providers.minimax-coding-plan.test.ts: 26 provider tests - Updated README with MiniMax setup and provider notes
b2577e4 to
6e06e34
Compare
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.
Refs #32
Summary
src/lib/minimax-auth.ts: credential resolution from OpenCodeauth.jsonwith validation and cachingsrc/providers/minimax-coding-plan.ts: fetches rolling 5-hour and weekly quota fromGET https://api.minimax.io/v1/api/openplatform/coding_plan/remains, normalizes intoQuotaToastEntryfor both classic and grouped toast stylessrc/lib/types.ts:MiniMaxAuthData,MiniMaxResult,MiniMaxResultEntrytypessrc/providers/registry.ts: registersminimaxCodingPlanProvidertests/quota-provider-boundary.test.ts: addsminimax-coding-planto the registry snapshottests/lib.minimax-auth.test.ts: 15 tests covering credential resolution (none, configured, invalid type, empty key, cached)tests/providers.minimax-coding-plan.test.ts: 26 tests covering classic/grouped entries, worst-window selection, error mapping,matchesCurrentModel,isAvailable, API success/failure/401/network error/bad JSON/unexpected shapeREADME.md: adds MiniMax Coding Plan to provider list, setup table, and provider-specific notesBehaviour
minimax-coding-planminimax-coding-planproviderauth.jsonminimax-coding-plansection (API key)MiniMax Coding Plan 5handMiniMax Coding Plan WeeklyentriesChecks
npm run typecheckOKnpm testOK (MiniMax tests: 41 pass; 26 pre-existing Windows-only failures unrelated to this change)npm run buildOK