Skip to content

feat(minimax): add MiniMax M3 model with 1M context window#1470

Merged
kevincodex1 merged 5 commits into
Gitlawb:mainfrom
kevincodex1:feat/minimax-m3-model
Jun 1, 2026
Merged

feat(minimax): add MiniMax M3 model with 1M context window#1470
kevincodex1 merged 5 commits into
Gitlawb:mainfrom
kevincodex1:feat/minimax-m3-model

Conversation

@kevincodex1

Copy link
Copy Markdown
Contributor

M3 is MiniMax's next-gen flagship with coding/agentic capabilities, 1M token context (1,048,576), and benchmark performance on par with Opus 4.7 on SWE-bench.

M3 is MiniMax's next-gen flagship with coding/agentic capabilities,
1M token context (1,048,576), and benchmark performance on par with
Opus 4.7 on SWE-bench.

Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
@kevincodex1 kevincodex1 requested a review from jatmn June 1, 2026 11:21
The integrations/models/minimax.ts was missing the minimax-m3
model definition that was added to the vendor config. This
caused the model picker to not show MiniMax M3 as a selectable
option despite it being present in the picker list.

Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
@bitsnaps

bitsnaps commented Jun 1, 2026

Copy link
Copy Markdown

The free model id minimax-m3-free is also provided by OpenCode/Zen gateway, I've just sent PR #1471 .

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I do not see any code-level issues in the changed MiniMax model registration, but this is not merge-ready yet because the branch is currently blocked from merging.

Please rebase/update the branch onto the latest main and rerun the required checks so the PR can merge cleanly.

When a MiniMax provider profile was active, the /model picker collapsed
to the single model pinned in the profile (e.g. MiniMax-M2.7), hiding the
rest of the catalog — including M3. mergeActiveProfileModelOptions now
surfaces the complete catalog for native vendor routes (which ship a
curated static catalog), while gateways keep the profile model list as a
whitelist. Added isNativeVendorCatalogRoute() to draw that distinction.

Also harden isMiniMaxProvider() to detect the MiniMax host on
ANTHROPIC_BASE_URL (anthropic-proxy transport), not just OPENAI_BASE_URL,
and switch the vendor defaultModel to MiniMax-M3.

Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
@jatmn

jatmn commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

@kevincodex1 still failing smoke.

These tests passed individually but failed under `bun test` because bun does
not unregister mock.module() overrides on mock.restore(), so stubs leaked
into later files. Root-caused and fixed each leak at the source:

- providerFallback: inject settings/profiles into getProviderFallbackChain
  and resolveNextFallbackProviderFromState; the test now uses DI instead of
  mock.module on settings.js/providerProfiles.js (fixed 7 attribution fails).
- apiPreconnect: accept an injected apiProvider (defaults to getAPIProvider);
  the test passes it explicitly so a leaked providers.js mock can't force
  'firstParty' (fixed 3 preconnect fails).
- preflightChecks: build a COMPLETE axios stub (defaults + interceptors) and
  re-register the real module in afterEach, so the partial stub no longer
  breaks proxy.ts's axios.defaults usage in tests/sdk/query-lifecycle (fixed
  2 query-resume fails).
- flagSettings: realpath the temp dir so the macOS /tmp -> /private/tmp
  symlink doesn't mismatch the canonicalised --settings path (fixed 1 fail).

Full suite now green: 3343 pass / 0 fail under both `bun test` and
`bun test --max-concurrency=1`.

Co-Authored-By: OpenClaude <openclaude@gitlawb.com>

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found an issue that needs to be addressed before this is ready.

Findings

  • [P2] Keep env-only MiniMax defaults on M3
    src/utils/model/model.ts:395
    This PR changes the MiniMax descriptor/default profile path to MiniMax-M3, but the runtime fallback used when a user only has MINIMAX_API_KEY/MiniMax base-url env configured still returns MiniMax-M2.7 when no explicit model env is present. That means the same provider can default to M3 when selected through --provider minimax or a saved profile, but silently stay on M2.7 for env-only MiniMax sessions, so part of the advertised default-model update is not actually applied. Please update the MiniMax fallback defaults in the model helpers, and the adjacent regression test that still asserts the old M2.7 default, so all MiniMax entry points agree on M3 unless the user pins another model.

@kevincodex1 kevincodex1 requested a review from jatmn June 1, 2026 16:08
The descriptor/profile path and --provider minimax already default to
MiniMax-M3, but getDefaultMainLoopModelSetting() still fell back to
MiniMax-M2.7 for env-only sessions (only MINIMAX_API_KEY / a MiniMax base
URL set, no explicit model env). That left part of the default-model
update unapplied. Align the env-only fallback (and the dead applyProviderFlag
fallback) on M3, and update the regression test accordingly. Users who pin
a model via env/profile are unaffected.

Co-Authored-By: OpenClaude <openclaude@gitlawb.com>

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I rechecked the previously discussed paths and do not see any remaining actionable issues from my side.

@kevincodex1 kevincodex1 merged commit e2fa248 into Gitlawb:main Jun 1, 2026
2 checks passed
hotmanxp added a commit to hotmanxp/openclaude that referenced this pull request Jun 2, 2026
Align vendor profile default with upstream M3 release (Gitlawb#1470).
- defaultModel: 'MiniMax-M2.7' → 'MiniMax-M3'
- M3 model definition in integrations/models/minimax.ts already 1:1 with upstream

Users with explicit OPENAI_MODEL env or pinned profile are unaffected.
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.

3 participants