mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-26 06:03:19 +00:00
fix(friendliai): set supports_reasoning from probed model behaviour
supports_reasoning was guesswork on my part, so I probed each model against the serverless endpoint instead and set the flag from what came back. gemma-4-31B-it and DeepSeek-V3.2 return no reasoning_content by default but do return it under chat_template_kwargs.enable_thinking, so both are reasoning capable. K-EXAONE-236B-A23B, GLM-5.1, GLM-5.2 and MiniMax-M2.5 return it without being asked. Qwen3-235B-A22B-Instruct-2507 returns byte-identical output with thinking on and off and ships no thinking markers in its published chat template, so it does not get the flag; it is the non-thinking half of the Qwen3-235B pair. gemma-4-31B-it also keeps supports_vision: it answers a base64 image prompt correctly, whereas the non-vision models on this endpoint reject the same payload with "This model does not support image/video inputs" The metadata test now pins the reasoning flag per model
This commit is contained in:
parent
daa43de167
commit
ddcc2ccf93
3 changed files with 18 additions and 7 deletions
|
|
@ -17210,6 +17210,7 @@
|
|||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true
|
||||
|
|
@ -17273,6 +17274,7 @@
|
|||
"output_cost_per_token": 4e-07,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true,
|
||||
|
|
|
|||
|
|
@ -17210,6 +17210,7 @@
|
|||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true
|
||||
|
|
@ -17273,6 +17274,7 @@
|
|||
"output_cost_per_token": 4e-07,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true,
|
||||
|
|
|
|||
|
|
@ -21,29 +21,30 @@ class FriendliModel(NamedTuple):
|
|||
cache_read_input_token_cost: float | None
|
||||
max_input_tokens: int
|
||||
max_output_tokens: int
|
||||
supports_reasoning: bool
|
||||
|
||||
|
||||
EXPECTED_MODELS: Final[tuple[FriendliModel, ...]] = (
|
||||
FriendliModel(
|
||||
"friendliai/LGAI-EXAONE/K-EXAONE-236B-A23B", 2e-07, 8e-07, 1e-07, 262144, 262144
|
||||
"friendliai/LGAI-EXAONE/K-EXAONE-236B-A23B", 2e-07, 8e-07, 1e-07, 262144, 262144, True
|
||||
),
|
||||
FriendliModel(
|
||||
"friendliai/MiniMaxAI/MiniMax-M2.5", 3e-07, 1.2e-06, 6e-08, 196608, 196608
|
||||
"friendliai/MiniMaxAI/MiniMax-M2.5", 3e-07, 1.2e-06, 6e-08, 196608, 196608, True
|
||||
),
|
||||
FriendliModel(
|
||||
"friendliai/Qwen/Qwen3-235B-A22B-Instruct-2507", 2e-07, 8e-07, None, 262144, 262144
|
||||
"friendliai/Qwen/Qwen3-235B-A22B-Instruct-2507", 2e-07, 8e-07, None, 262144, 262144, False
|
||||
),
|
||||
FriendliModel(
|
||||
"friendliai/deepseek-ai/DeepSeek-V3.2", 5e-07, 1.5e-06, 2.5e-07, 163840, 163840
|
||||
"friendliai/deepseek-ai/DeepSeek-V3.2", 5e-07, 1.5e-06, 2.5e-07, 163840, 163840, True
|
||||
),
|
||||
FriendliModel(
|
||||
"friendliai/google/gemma-4-31B-it", 1.4e-07, 4e-07, None, 262144, 262144
|
||||
"friendliai/google/gemma-4-31B-it", 1.4e-07, 4e-07, None, 262144, 262144, True
|
||||
),
|
||||
FriendliModel(
|
||||
"friendliai/zai-org/GLM-5.1", 1.4e-06, 4.4e-06, 2.6e-07, 202752, 202752
|
||||
"friendliai/zai-org/GLM-5.1", 1.4e-06, 4.4e-06, 2.6e-07, 202752, 202752, True
|
||||
),
|
||||
FriendliModel(
|
||||
"friendliai/zai-org/GLM-5.2", 1.4e-06, 4.4e-06, 2.6e-07, 1048576, 1048576
|
||||
"friendliai/zai-org/GLM-5.2", 1.4e-06, 4.4e-06, 2.6e-07, 1048576, 1048576, True
|
||||
),
|
||||
)
|
||||
|
||||
|
|
@ -106,6 +107,12 @@ def test_prompt_caching_flag_tracks_cache_read_cost() -> None:
|
|||
), f"{expected.key} prompt-caching flag disagrees with cache_read cost"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("expected", EXPECTED_MODELS, ids=lambda m: m.key)
|
||||
def test_reasoning_flag_matches_verified_behaviour(expected: FriendliModel) -> None:
|
||||
entry = _load(ROOT_PATH)[expected.key]
|
||||
assert entry.get("supports_reasoning", False) is expected.supports_reasoning
|
||||
|
||||
|
||||
def test_deprecating_model_carries_iso_date() -> None:
|
||||
entry = _load(ROOT_PATH)["friendliai/Qwen/Qwen3-235B-A22B-Instruct-2507"]
|
||||
assert entry["deprecation_date"] == "2026-08-05"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue