fix: route minimax m3 reasoning controls through profile

Follow up PR #46609's api.minimax.io reasoning report by moving the behavior out of the broad run_agent host gate and into the MiniMax provider profile. Only MiniMax-M3 on the documented OpenAI-compatible /v1 route gets reasoning_split/thinking/reasoning_effort; Anthropic-format MiniMax and non-M3 models keep their existing wire shapes.

Co-authored-by: goku94123 <gooku94123@gmail.com>
This commit is contained in:
Teknium
2026-06-15 07:08:43 -07:00
co-authored by goku94123
parent ba3883cd18
commit 49e743985a
5 changed files with 171 additions and 14 deletions
-9
View File
@@ -4792,15 +4792,6 @@ class AIAgent:
return bool(github_model_reasoning_efforts(self.model))
except Exception:
return False
if base_url_host_matches(self._base_url_lower, "api.minimax.io"):
# MiniMax (api.minimax.io): enable reasoning extra_body
# (reasoning_split, thinking, reasoning_effort) for both the
# Anthropic-format and OpenAI-format endpoints. Without this the
# safety gate strips those fields before they reach the API, so M3
# leaks thinking into response content and burns output tokens. M3
# specifically benefits from the OpenAI-compatible endpoint
# (/v1/chat/completions) for prompt caching.
return True
if (self.provider or "").strip().lower() == "lmstudio":
opts = self._lmstudio_reasoning_options_cached()
# "off-only" (or absent) means no real reasoning capability.