fix(provider): add MiniMax-M3 and missing M2.7 variants to minimax provider - #10431
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7160f9187
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "models": [ | ||
| { | ||
| "name": "MiniMax-M3", | ||
| "context_limit": 200000 |
There was a problem hiding this comment.
Use MiniMax-M3's full context limit
The static catalog value is copied into ModelConfig by crates/goose/src/providers/provider_registry.rs:65-72 and then used by context_mgmt::should_compact (crates/goose/src/context_mgmt/mod.rs:210-237) to decide when to compact. MiniMax's Anthropic-compatible docs list MiniMax-M3 with a 1,000,000-token context window, so this 200,000 value makes goose auto-compact at about 160k tokens (default 80%) instead of about 800k for M3 sessions.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
My read is the Anthropic-compatible endpoint caps at 200k in practice (anthropics/claude-code#46416, MiniMax-AI/MiniMax-M2.7#46) – the 1M looks like the model spec, not what that endpoint serves. Bumping the JSON higher would just push compaction past the API reject point. Open to revisiting if MiniMax raises the Anthropic-endpoint cap, or if I'm reading the cap wrong.
There was a problem hiding this comment.
I think Codex is right @sheikhlimon! Those issues you linked are reporting that MiniMax does have a 1 million token context window but Claude Code isn't respecting it either.
d7160f9 to
e323fb4
Compare
|
@The-Best-Codes Thanks for the catch. You're right that I misread those issues. They're about Claude Code's detection falling back to 200K, not an actual API cap. Still not sure 1M is the right value though. Edit: Updated to 1M |
e323fb4 to
0d6f243
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d6f243f6c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "models": [ | ||
| { | ||
| "name": "MiniMax-M3", | ||
| "context_limit": 524000 |
There was a problem hiding this comment.
Don't cap M3 context at its output-token ceiling
Fresh evidence since the earlier comment: this revision now sets M3 to 524000, which matches MiniMax's documented Anthropic max_tokens ceiling (524288) rather than the model context. The static context_limit is copied into ModelConfig and context_mgmt::should_compact uses it for auto-compaction, while MiniMax's Anthropic SDK docs list MiniMax-M3 with a 1,000,000-token context window, so M3 sessions will be summarized at ~419k tokens with the default 80% threshold instead of ~800k. See https://platform.minimax.io/docs/api-reference/text-anthropic-api.
Useful? React with 👍 / 👎.
0d6f243 to
2dc718c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dc718c2a1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "description": "MiniMax AI models with long context support via Anthropic-compatible API", | ||
| "api_key_env": "MINIMAX_API_KEY", | ||
| "base_url": "https://api.minimax.io/anthropic", | ||
| "dynamic_models": true, |
There was a problem hiding this comment.
Don't refresh away MiniMax highspeed models
When MINIMAX_API_KEY is configured, this flips MiniMax inventory refresh on (register_declarative_provider passes config.dynamic_models.unwrap_or(false) as supports_refresh). A successful refresh stores only the IDs returned by GET /anthropic/v1/models and inventory_models_from_snapshot then uses that snapshot instead of these static entries; MiniMax's documented List Models response (https://platform.minimax.io/docs/api-reference/models/anthropic/list-models) contains MiniMax-M3, MiniMax-M2.7, and MiniMax-M2.5 but not either *-highspeed ID, while the supported-models page says the highspeed IDs are valid. After such a refresh, ACP defaults validation checks only entry.models, so selecting MiniMax-M2.7-highspeed is rejected even though this patch adds it; keep dynamic refresh off or merge the static highspeed IDs into refreshed inventories.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Structural concern's fair, but the live /anthropic/v1/models response does include both highspeed IDs – so no immediate regression. Filed the merge gap as a follow-up. Keeping dynamic_models: true for the auto-discovery benefit.
…ider Signed-off-by: sheikhlimon <sheikhlimon404@gmail.com>
2dc718c to
e5b8d1c
Compare
Problem
The
minimaxprovider only listed the twoMiniMax-M2.5variants in its model array. Anything else from MiniMax's catalog (including M3, the current flagship) gets rejected with:Fix
Added the missing entries to
crates/goose-providers/src/declarative/definitions/minimax.json:MiniMax-M3(200k context)MiniMax-M2.7,MiniMax-M2.7-highspeedThe existing
MiniMax-M2.5entries are untouched. SkippedMiniMax-M2.1since it's two generations old and unlikely to be in active use, andMiniMax-M2since it's been retired upstream.Verification
cargo fmt --check→ cleancargo build -p goose-providers→ builds clean