mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
fix(mistral): send adaptive thinking to magistral as a reasoning level
This commit is contained in:
parent
19cfe569fc
commit
d87b507cd3
2 changed files with 5 additions and 0 deletions
|
|
@ -74,6 +74,8 @@ def _thinking_as_reasoning_effort(thinking: object, *, model: str, drop_params:
|
|||
match thinking:
|
||||
case {"type": "disabled"}:
|
||||
return "none"
|
||||
case {"type": "adaptive"}:
|
||||
return "medium"
|
||||
case _:
|
||||
return reasoning_effort_from_thinking(thinking, model=model, drop_params=drop_params)
|
||||
|
||||
|
|
|
|||
|
|
@ -184,6 +184,8 @@ class TestMistralReasoningSupport:
|
|||
({"type": "enabled", "budget_tokens": 1024}, "high"),
|
||||
({"type": "enabled", "budget_tokens": 100}, "high"),
|
||||
({"type": "disabled"}, "none"),
|
||||
({"type": "adaptive"}, "high"),
|
||||
({"type": "adaptive", "display": "summarized"}, "high"),
|
||||
],
|
||||
)
|
||||
def test_magistral_sends_thinking_as_a_reasoning_effort_the_model_accepts(
|
||||
|
|
@ -1493,6 +1495,7 @@ def _warnings_naming(caplog: pytest.LogCaptureFixture, param: str) -> tuple[str,
|
|||
("reasoning_effort", "xhigh", "high"),
|
||||
("thinking", {"type": "disabled"}, "none"),
|
||||
("thinking", {"type": "enabled", "budget_tokens": 1024}, "high"),
|
||||
("thinking", {"type": "adaptive"}, "high"),
|
||||
),
|
||||
)
|
||||
def test_magistral_reasoning_request_is_sent_as_a_level_without_a_drop_warning(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue