Skip to content

feat: upgrade MiniMax model references to M3#571

Merged
raahulrahl merged 1 commit into
GetBindu:mainfrom
octo-patch:feature/upgrade-minimax-m3
Jun 1, 2026
Merged

feat: upgrade MiniMax model references to M3#571
raahulrahl merged 1 commit into
GetBindu:mainfrom
octo-patch:feature/upgrade-minimax-m3

Conversation

@octo-patch

@octo-patch octo-patch commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Problem: The MiniMax example agent and the gateway's OpenRouter fallback samples still pointed at MiniMax-M2.7 by default. MiniMax-M3 has been released, so the default reference should track the latest generation.
  • Why it matters: Users copy-pasting examples/beginner/minimax_example.py or the OpenRouter fallback snippets get the older model unless they edit by hand. Documentation and tests were also out of sync.
  • What changed: Switch the example default to MiniMax-M3, refresh the OpenRouter fallback snippet to minimax/minimax-m3, update related fixtures and the model-allowlist test. Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed as still-supported options for backward compatibility.
  • What did NOT change (scope boundary): TTS / speech configuration, API base URL, env variable names (MINIMAX_API_KEY), Anthropic / OpenAI providers, anything outside MiniMax model identifiers.

Change Type

  • Documentation
  • Tests
  • Chore/infra

Scope

  • Tests
  • Documentation
  • CLI / utilities (example agent)

User-Visible / Behavior Changes

  • Running examples/beginner/minimax_example.py now talks to MiniMax-M3 by default (previously MiniMax-M2.7). Users on M2.7 can still pass id="MiniMax-M2.7" explicitly.
  • The documented OpenRouter fallback example references minimax/minimax-m3.

Security Impact

  • New permissions/capabilities? No
  • Secrets/credentials handling changed? No
  • New/changed network calls? No (same https://api.minimax.io/v1 endpoint, same MINIMAX_API_KEY)
  • Database schema/migration changes? No
  • Authentication/authorization changes? No

Verification

Steps to Test

  1. rg -n "MiniMax-M" examples/beginner/minimax_example.py tests/unit/test_minimax_example.py — confirms MiniMax-M3 is the default and MiniMax-M2.7(-highspeed) is still allow-listed.
  2. uv run pytest tests/unit/test_minimax_example.py — static checks on the example pass against the new model id.
  3. rg -n "minimax/minimax-m" gateway/.env.example gateway/src/config/loader.ts gateway/tests/provider/openrouter-body-injection.test.ts — fallback fixture aligned.

Expected Behavior

  • test_example_uses_minimax_m3 and the OpenRouter fallback unit test pass.
  • test_valid_minimax_models accepts the refreshed allow-list.

Compatibility / Migration

  • Backward compatible? Yes — M2.7 / M2.7-highspeed still work; only the default identifier changed.
  • Config/env changes? No
  • Database migration needed? No

Risks and Mitigations

  • Risk: Users with hard pinning in their own scripts to MiniMax-M2.7 won't be affected (we kept it allow-listed); only the example default changed.
    • Mitigation: M2.7 / M2.7-highspeed remain documented and asserted in the test allow-list.

Checklist

  • Tests updated alongside code
  • Documentation updated (in-file comments / docstrings)
  • Backward compatibility considered

Summary by CodeRabbit

  • Documentation

    • Updated beginner examples and configuration documentation to reference MiniMax M3 model
  • Tests

    • Updated test suite to validate MiniMax M3 model integration

Update the MiniMax example agent and related fallback samples to use the new MiniMax-M3 model as the default, while keeping M2.7 (including M2.7-highspeed) as supported options for backward compatibility.

- examples/beginner/minimax_example.py: switch default id to MiniMax-M3
- tests/unit/test_minimax_example.py: assert M3 usage and refresh the known-models set
- gateway/.env.example, gateway/src/config/loader.ts: update OpenRouter fallback example to minimax/minimax-m3
- gateway/tests/provider/openrouter-body-injection.test.ts: refresh test fixture to use the new model id
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 199a14e4-8a07-4c7a-a5c9-549eab79b6ce

📥 Commits

Reviewing files that changed from the base of the PR and between 682a19c and 142c756.

📒 Files selected for processing (5)
  • examples/beginner/minimax_example.py
  • gateway/.env.example
  • gateway/src/config/loader.ts
  • gateway/tests/provider/openrouter-body-injection.test.ts
  • tests/unit/test_minimax_example.py

📝 Walkthrough

Walkthrough

This PR updates the MiniMax model reference from M2.7 to M3 across the beginner example, configuration documentation, and all test fixtures. The agent example now uses MiniMax-M3 by default, with matching updates to environment examples, loader documentation, and test assertions to validate consistent usage.

Changes

MiniMax Model Version Upgrade

Layer / File(s) Summary
Beginner Example Model Update
examples/beginner/minimax_example.py
Module docstring and OpenAILike model identifier updated from MiniMax-M2.7 to MiniMax-M3.
Configuration Documentation Updates
gateway/.env.example, gateway/src/config/loader.ts
Example comments for OPENROUTER_FALLBACK_MODELS updated to show minimax-m3 instead of minimax-m2.7.
Test Fixtures and Assertions
gateway/tests/provider/openrouter-body-injection.test.ts, tests/unit/test_minimax_example.py
OpenRouter fallback test expects minimax-m3 in the models chain; unit tests now assert M3 usage and integration test payloads send MiniMax-M3 (except the separate highspeed variant which keeps MiniMax-M2.7-highspeed).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hop and a skip, M2.7 must go,
M3 arrives with a bright model glow,
Examples updated, tests sing in tune,
Config docs gleaming like a summer noon,
Consistency blooms across every file! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: upgrading MiniMax model references from M2.7 to M3 across examples, documentation, and tests.
Description check ✅ Passed The description comprehensively covers all required template sections: clear problem statement, why it matters, what changed, scope boundaries, change types, affected areas, user-visible changes, security impact, verification steps, backward compatibility, and risks with mitigations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@raahulrahl raahulrahl merged commit 6ef5699 into GetBindu:main Jun 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants