mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
fix(model_cost): add supports_reasoning: false to Gemini image generation models
vertex_ai/gemini-2.5-flash-image, vertex_ai/gemini-3-pro-image-preview, vertex_ai/gemini-3.1-flash-image-preview, gemini/gemini-3-pro-image-preview, and gemini/gemini-3.1-flash-image-preview were missing supports_reasoning entries; _supports_factory then fell through to the vertex_ai provider-level config which returns true, causing requests with reasoning_effort to be sent to an API that rejects them.
This commit is contained in:
parent
6d17f9e85c
commit
75dd70a678
2 changed files with 24 additions and 0 deletions
|
|
@ -18727,6 +18727,7 @@
|
|||
],
|
||||
"supports_function_calling": false,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_reasoning": false,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_vision": true,
|
||||
|
|
@ -18768,6 +18769,7 @@
|
|||
],
|
||||
"supports_function_calling": false,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_reasoning": false,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_vision": true,
|
||||
|
|
@ -36726,6 +36728,7 @@
|
|||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_reasoning": false,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true,
|
||||
|
|
@ -36748,6 +36751,7 @@
|
|||
"output_cost_per_image_token": 0.00012,
|
||||
"output_cost_per_token": 1.2e-05,
|
||||
"output_cost_per_token_batches": 6e-06,
|
||||
"supports_reasoning": false,
|
||||
"source": "https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-pro-image"
|
||||
},
|
||||
"vertex_ai/gemini-3.1-flash-image-preview": {
|
||||
|
|
@ -36761,6 +36765,7 @@
|
|||
"output_cost_per_image": 0.0672,
|
||||
"output_cost_per_image_token": 6e-05,
|
||||
"output_cost_per_token": 3e-06,
|
||||
"supports_reasoning": false,
|
||||
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing#gemini-models"
|
||||
},
|
||||
"vertex_ai/gemini-3.1-flash-lite-preview": {
|
||||
|
|
|
|||
|
|
@ -4709,3 +4709,22 @@ class TestValidateEnvironmentTencent:
|
|||
assert "TENCENT_API_KEY" in result["missing_keys"]
|
||||
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"model",
|
||||
[
|
||||
"vertex_ai/gemini-2.5-flash-image",
|
||||
"vertex_ai/gemini-3-pro-image-preview",
|
||||
"vertex_ai/gemini-3.1-flash-image-preview",
|
||||
"gemini/gemini-2.5-flash-image",
|
||||
"gemini/gemini-3-pro-image-preview",
|
||||
"gemini/gemini-3.1-flash-image-preview",
|
||||
],
|
||||
)
|
||||
def test_gemini_image_models_do_not_support_reasoning(
|
||||
model: str, local_model_cost_map: None
|
||||
) -> None:
|
||||
assert litellm.supports_reasoning(model) is False, (
|
||||
f"{model} incorrectly classified as reasoning-capable. "
|
||||
"Add 'supports_reasoning: false' to its model_cost entry."
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue