Skip to content

fix(provider): add MiniMax-M3 and missing M2.7 variants to minimax provider - #10431

Merged
alexhancock merged 1 commit into
aaif-goose:mainfrom
sheikhlimon:provider/minimax-add-m3
Jul 15, 2026
Merged

fix(provider): add MiniMax-M3 and missing M2.7 variants to minimax provider#10431
alexhancock merged 1 commit into
aaif-goose:mainfrom
sheikhlimon:provider/minimax-add-m3

Conversation

@sheikhlimon

Copy link
Copy Markdown
Contributor

Problem

The minimax provider only listed the two MiniMax-M2.5 variants in its model array. Anything else from MiniMax's catalog (including M3, the current flagship) gets rejected with:

Model 'MiniMax-M3' is not available for provider 'minimax'

Fix

Added the missing entries to crates/goose-providers/src/declarative/definitions/minimax.json:

  • MiniMax-M3 (200k context)
  • MiniMax-M2.7, MiniMax-M2.7-highspeed

The existing MiniMax-M2.5 entries are untouched. Skipped MiniMax-M2.1 since it's two generations old and unlikely to be in active use, and MiniMax-M2 since it's been retired upstream.

Verification

  • cargo fmt --check → clean
  • cargo build -p goose-providers → builds clean

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

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 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.

@sheikhlimon
sheikhlimon force-pushed the provider/minimax-add-m3 branch from d7160f9 to e323fb4 Compare July 13, 2026 21:31
@The-Best-Codes The-Best-Codes self-assigned this Jul 14, 2026
@The-Best-Codes
The-Best-Codes self-requested a review July 14, 2026 16:34
@sheikhlimon

sheikhlimon commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@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. fireworks.json and empiriolabs.json both already configure M3 at 512K / 524K, so that feels like the more consistent precedent. Thoughts on aligning with one of those?

Edit: Updated to 1M

@sheikhlimon
sheikhlimon force-pushed the provider/minimax-add-m3 branch from e323fb4 to 0d6f243 Compare July 14, 2026 17:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@sheikhlimon
sheikhlimon force-pushed the provider/minimax-add-m3 branch from 0d6f243 to 2dc718c Compare July 14, 2026 17:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>
@sheikhlimon
sheikhlimon force-pushed the provider/minimax-add-m3 branch from 2dc718c to e5b8d1c Compare July 14, 2026 18:51
@alexhancock
alexhancock merged commit 3d893a3 into aaif-goose:main Jul 15, 2026
24 checks passed
@sheikhlimon
sheikhlimon deleted the provider/minimax-add-m3 branch July 15, 2026 15:39
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