Repository navigation
feat(minimax): add M3.1 Flash defaults and request compatibility - #270
Open
octo-patch wants to merge 1 commit into
Open
octo-patch wants to merge 1 commit into
octo-patch wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: