refactor(mistral): keep map_openai_params under the complexity ceiling

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-09-14 09:56:08 +00:00
parent cd8887d72c
commit a8305129a7

View file

@ -171,12 +171,9 @@ class MistralConfig(OpenAIGPTConfig):
optional_params["extra_body"] = {"random_seed": value}
if param == "response_format":
optional_params["response_format"] = value
if param == "reasoning_effort":
if "magistral" in model.lower():
optional_params["_add_reasoning_prompt"] = True
else:
optional_params["reasoning_effort"] = value
if param == "thinking" and "magistral" in model.lower():
if param == "reasoning_effort" and "magistral" not in model.lower():
optional_params["reasoning_effort"] = value
if param in ("reasoning_effort", "thinking") and "magistral" in model.lower():
# Flag that we need to add reasoning system prompt
optional_params["_add_reasoning_prompt"] = True
if param == "parallel_tool_calls":