You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Public model references remain under minimax-global/ and minimax-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.
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_stream channel 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 minimax API-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
Live OAuth smoke test: MiniMax Global MiniMax-M3 returned "MiniMax OAuth works" successfully after normalizing the Anthropic-compatible resource URL.
Overall implementation looks solid. Two test issues to address before merge, plus two optional items.
Blocking
1. test_exactly_six_concrete_backend_classes fails under full-suite collection _concrete_provider_subclasses() relies on __subclasses__() but only imports the 4 backend modules explicitly, not lazy.py. So LazyProvider (a proxy, not a real backend) only shows up when another test imports it, pushing the set to 7 and failing the assertion when collected in the same process:
uv run pytest tests/test_provider_catalog.py tests/test_lazy_provider.py -q -k "concrete or lazy"
# FAILED: Extra items in the left set: LazyProvider
Suggest excluding LazyProvider in _concrete_provider_subclasses() so the result is independent of import order.
2. _configure_existing_provider_model() has no test coverage
This function and the "Choose default model" branch added in onboard step 1 (68dabc8d) are untested; tests/test_cli_onboard_commands.py does not touch them. A CLI command change should update the matching test file (AGENTS.md 5.4).
Non-blocking
minimax_oauth.py imports platformdirs at module level, but it is not declared in pyproject.toml (it arrives transitively via oauth-cli-kit). Suggest declaring it explicitly with uv add platformdirs, following the repo's existing tiktoken/numpy pins.
minimax_oauth.py:279 treats the device-flow interval as milliseconds; RFC 8628 defines it in seconds. Please confirm the unit MiniMax returns.
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
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