fix(minimax): route M3 defaults through split reasoning - #59487
Conversation
MiniMax-M3 leaks provider-specific thinking tags on the Anthropic-compatible endpoint, while the MiniMax profile already knows how to request split reasoning on the OpenAI-compatible endpoint. Route only the uncustomized built-in minimax M3 default to /v1 so explicit user endpoints and non-M3 routes keep their transport. Constraint: Maintainer guidance rejected chasing model-specific raw reasoning delimiters in the generic scrubbers. Rejected: Add mm:think handling to common think scrubbers | It widens generic filtering for a provider-specific transport issue and repeats previously closed approaches. Confidence: high Scope-risk: narrow Directive: Keep explicit MiniMax base_url overrides user-owned; do not force custom /anthropic routes onto /v1. Tested: pytest tests/hermes_cli/test_runtime_provider_resolution.py -q Tested: pytest tests/plugins/model_providers/test_minimax_profile.py -q Tested: runtime/profile probe resolves MiniMax-M3 to https://api.minimax.io/v1 with reasoning_split=True Not-tested: Full pytest tests/ -q suite was not run.
Related: #59461 (the issue this fixes) and merged #46648 (same MiniMax-M3 reasoning-routing family, different code site). Not a duplicate — this reroutes the default M3 runtime transport in |
|
Thanks for this — genuinely careful work: the scope is right (env/ The The provider should be returning reasoning in a separate field. If a given deployment/endpoint isn't doing that, that's the endpoint's format problem — and these leaks tend to be subtle and unpredictable enough (partial markers, mid-stream splits, format drift between model versions) that we can't reliably special-case them without accumulating an open-ended maintenance surface keyed on each model's quirks. Users who want the split-reasoning behavior can already point MiniMax-M3 at Not a knock on the implementation. Closing. |
What does this PR do?
Routes the uncustomized built-in
minimax+MiniMax-M3default runtime from the Anthropic-compatible/anthropictransport to MiniMax's OpenAI-compatiblehttps://api.minimax.io/v1transport. That lets the existing MiniMax provider profile sendreasoning_split=True, so provider-specific<mm:think>reasoning does not arrive as visible chat content in Telegram, desktop, or other clients.This intentionally does not add
<mm:think>to the generic think scrubbers. Previous maintainer feedback on related attempts pointed this class of bug at MiniMax reasoning routing instead of chasing provider-specific raw delimiters in shared output filters.Explicit user endpoints remain user-owned:
MINIMAX_BASE_URL,model.base_url, and non-M3 MiniMax routes keep their selected transport.Related Issue
Fixes #59461
Type of Change
Changes Made
hermes_cli/runtime_provider.py: route only default built-inminimaxMiniMax-M3 to/v1+chat_completions; preserve explicit MiniMax base URL overrides and non-M3 defaults.plugins/model-providers/minimax/__init__.py: update the profile note to reflect that runtime routing now reaches the existingreasoning_splitpath.tests/hermes_cli/test_runtime_provider_resolution.py: add coverage for default M3 routing, staleapi_mode, credential-pool routing, env override preservation, non-M3 defaults, and local pool isolation in MiniMax resolver tests.How to Test
pytest tests/hermes_cli/test_runtime_provider_resolution.py -qpytest tests/plugins/model_providers/test_minimax_profile.py -qminimax chat_completions https://api.minimax.io/v1and the profile emits{'reasoning_split': True}.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — docstring onlycli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
Targeted validation: