feat(providers): add MiniMax Global and CN OAuth - #209
Conversation
|
Overall implementation looks solid. Two test issues to address before merge, plus two optional items. Blocking 1. Suggest excluding 2. Non-blocking
|
Add coverage for _configure_existing_provider_model and the step-1 "Choose default model" branch (all branches: non-interactive no-op, no configured provider, happy path, verify failure, OAuth re-auth delegation, and the step-1 wiring). Exclude LazyProvider in _concrete_provider_subclasses so the backend class set is deterministic regardless of test collection order (it is a proxy, not a backend, and is not imported by the collector). Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
|
Thanks for this - the implementation is solid. To keep it moving, I'm pushing a small commit to your branch that addresses the two test items from my review: excluding The two non-blocking notes (declare |
## Summary Bump the package version from 0.1.9 to 0.1.10 (patch release). 22 PRs merged since v0.1.9, no breaking changes. Features: - #260 feat(tui): list the providers that work, and the rest one level down - #252 feat(*): offer every supported provider in the onboarding picker - #251 feat(tools): read images with read_file, and fix four silent type-check bugs - #239 feat: add shell command approval flow - #217 feat: rework the TUI transcript into collapsible episodes - #220 feat(cli): nudge raven upgrade in the tui status bar when behind - #209 feat(providers): add MiniMax Global and CN OAuth Refactors: - #259 refactor(*): one answer to which credentials a provider needs - #249 refactor(providers): unify provider management on litellm The remaining PRs are fixes (#255, #256, #258, #253, #238, #226), test work (#236, #230, #224), docs (#250, #215, #200), and benchmark tooling (#207). ## Type - [ ] Fix - [ ] Feature - [ ] Docs - [ ] CI / tooling - [ ] Refactor - [x] Other ## Verification - [x] Relevant tests pass locally - [x] Relevant lint / type checks pass locally - [ ] User-facing docs or screenshots are updated when needed Bump is limited to `pyproject.toml` and `uv.lock` (`uv lock` sync). Local preflight covers the branch CI checks (commit lint, PR title and body lint, ruff, large-file gate). ## Risk - [x] Security impact considered - [x] Backward compatibility considered - [x] Rollback path is clear for risky changes Version-only change; no code or behavior change. Rollback is a revert of this commit. ## Related Issues N/A Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
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