feat(providers): add MiniMax Global and CN OAuth#209
Open
jellyjelly814 wants to merge 4 commits into
Open
Conversation
0xKT
self-requested a review
July 24, 2026 07:45
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.
Summary
Add first-class MiniMax Token Plan OAuth support for both Global and CN regions.
This change adds:
minimax_globalandminimax_cnprovider entries with curated MiniMax-M3 and M2.7 models.coding-plan-cliwith theopenid profile coding_planscope.Public model references remain under
minimax-global/andminimax-cn/. The runtime translates them to the Anthropic-compatible LiteLLM route only when sending a request, so provider selection continues to use the correct MiniMax OAuth credential.The implementation accepts MiniMax expiry values expressed as relative seconds, Unix epoch seconds, or Unix epoch milliseconds. OAuth-returned verification and resource URLs are restricted to the expected HTTPS hosts before use.
Type
Verification
uv run pytest tests/test_minimax_oauth.py tests/test_cli_provider_commands.py tests/test_provider_catalog.py tests/test_config_update_providers.py tests/test_tui_rpc_model.py tests/test_tui_rpc_setup.py tests/test_cli_status_commands.py -q -x- 143 passed.Focused MiniMax onboarding tests - 3 passed.
uv run ruff check raven tests- passed.uv run ruff format --check raven tests- 761 files already formatted.make check-large-files- passed.make check-commits- passed.Two independent read-only reviews completed; the final review found no blocking issues.
The full test collection was not run because the local environment does not include the optional
dingtalk_streamchannel dependency. All provider, OAuth, onboarding, TUI setup, status, and configuration tests relevant to this change passed.Relevant tests pass locally
Relevant lint / type checks pass locally
User-facing docs or screenshots are updated when needed
Risk
OAuth credentials are stored in region-specific files with restrictive permissions and atomic replacement.
Refresh operations use a cross-process lock and persist rotated refresh tokens before exposing them to the runtime.
OAuth verification and API resource URLs are validated against region-specific host allowlists.
Existing
minimaxAPI-key configuration remains unchanged; the new OAuth providers use separate slugs and storage.Rollback consists of reverting this change. Existing API-key provider configuration and credentials are not migrated or modified.
Security impact considered
Backward compatibility considered
Rollback path is clear for risky changes
Related Issues
N/A