litellm/tests/unit/llms/minimax
Jeevan Babu Gotru 9de20b6cf8
fix(minimax): forward reasoning_effort instead of dropping it (#49583)
* fix(minimax): forward reasoning_effort instead of dropping it

* fix(minimax): forward reasoning_effort instead of dropping it

* fix(minimax): gate reasoning_effort on the cost map and map MiniMax-M3.1-Flash

Forward reasoning_effort for every MiniMax model unless its cost map entry says it
does not reason, so a MiniMax model newer than the map keeps the caller's effort
instead of losing it.

Add a minimax/MiniMax-M3.1-Flash entry with MiniMax's published pay-as-you-go
pricing and its accepted effort levels (low, medium, high, xhigh, max), and a
minimax-reasoning-baseline fallback rule that marks unmapped minimax/MiniMax-M*
ids as reasoning-capable, so thinking is kept for them too.

* refactor(minimax): gate reasoning_effort on supports_reasoning like thinking

Forward reasoning_effort when the cost map, or the MiniMax M-series fallback rule, says the model supports reasoning, the same check thinking already uses. An unlisted MiniMax model outside the M series now drops it, with the existing drop warning.

* refactor(minimax): build supported params in one expression and type the new tests

Build the MiniMax supported params list without mutating it, give the new test helpers precise types, and assert invariants (both cost map files agree, prices are positive and ordered, every declared effort level is forwarded) instead of pinning MiniMax's prices and effort levels as literals.

* fix(minimax): treat every unlisted minimax/ model as reasoning-capable

Widen the MiniMax fallback rule from M-series ids to the whole minimax/ namespace, matching the W&B rule, so an unlisted MiniMax model keeps reasoning_effort and thinking. Exact cost map entries still win, so mapped speech, video and image models are unaffected.

---------

Co-authored-by: ryan-crabbe-berri <ryan@berri.ai>
2026-11-09 14:03:50 -08:00
..
chat fix(minimax): forward reasoning_effort instead of dropping it (#49583) 2026-11-09 14:03:50 -08:00
messages test: migrate phase 9 legacy llm provider tests to tests/unit 2026-09-20 08:13:11 +00:00
text_to_speech test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
videos feat(videos): add first-class OpenRouter video request fields (#50319) 2026-11-06 16:50:48 -08:00
__init__.py test: migrate phase 9 legacy llm provider tests to tests/unit 2026-09-20 08:13:11 +00:00