Skip to content

feat(minimax): add M3.1 Flash defaults and request compatibility - #270

Open
octo-patch wants to merge 1 commit into
autogluon:mainfrom
octo-patch:octo/20261019-minimax-m31-flash
Open

octo-patch wants to merge 1 commit into
autogluon:mainfrom
octo-patch:octo/20261019-minimax-m31-flash

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Reason: The MiniMax preset and discovery fallback still prefer M3 and expose older text models, while Flash requires adaptive thinking and protocol-specific effort parameters. The factory also rejects saved/custom MiniMax IDs when they are absent from discovery.

Set the direct text choices to MiniMax-M3.1-Flash (default) and MiniMax-M3. Keep explicit saved/custom/legacy model IDs accepted by the MiniMax factory. Normalize Flash at the LangChain payload boundary so configuration and invoke-time overrides produce adaptive thinking with low/medium/high/xhigh/max effort (default max), without service_tier or reasoning_split. Both global/China and OpenAI/Anthropic routes are covered, including synchronous/asynchronous streaming. M3 keeps its protocol defaults, supports adaptive/disabled thinking and Priority, and ignores effort. Other providers' validation is unchanged.

Validation: 245 focused tests passed, including 240 actual LangChain + OpenAI/Anthropic SDK request captures using httpx.MockTransport, with no live inference or credentials. The matrix covers both regions, both protocols, invoke/stream/ainvoke/astream, all supported/default/invalid efforts, nested override precedence, M3, and saved legacy/custom models. Black/isort checks, Ruff on all changed Python files, git diff --check, and the configured secret scan passed. One upstream LangGraph pending-deprecation warning remains.

Pinned test environment: Python 3.12; langchain-openai 0.3.28, langchain-anthropic 0.3.18, langchain-aws 0.2.29, langchain 0.3.27, langgraph 0.6.5, langchain-core 0.3.86, openai 1.109.1, anthropic 0.125.0, httpx 0.28.1. The focused environment installs the package without unrelated ML/web dependencies; the full cloud/ML integration suite was not run.

The preset documents the current models' 1,000,000 context and 524,288 maximum output; its existing 65,535 request budget remains unchanged. This repository has no MiniMax price-card or context-limit registry, so this change does not add a pricing subsystem or claim runtime enforcement of those limits. Unsupported Flash efforts normalize to max. No third-party route is added or inferred.

Sources:

This branch has not been deployed

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

1 participant