mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix for supports_reasoning check added in 68f4847659
This commit is contained in:
parent
de6b08e76e
commit
dc6161535a
2 changed files with 7 additions and 3 deletions
|
|
@ -465,7 +465,6 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
params["includeThoughts"] = True
|
||||
if thinking_budget is not None and isinstance(thinking_budget, int):
|
||||
params["thinkingBudget"] = thinking_budget
|
||||
|
||||
return params
|
||||
|
||||
def map_response_modalities(self, value: list) -> list:
|
||||
|
|
@ -618,7 +617,12 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
optional_params = self._add_tools_to_optional_params(
|
||||
optional_params, [_tools]
|
||||
)
|
||||
if supports_reasoning(model):
|
||||
|
||||
######################################################################################
|
||||
# If the model supports reasoning and `thinkingConfig` is not set as yet
|
||||
# we should set it to includeThoughts
|
||||
######################################################################################
|
||||
if supports_reasoning(model) and "thinkingConfig" not in optional_params:
|
||||
optional_params["thinkingConfig"] = (
|
||||
VertexGeminiConfig._map_reasoning_effort_to_thinking_budget(
|
||||
non_default_params.get("reasoning_effort")
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ def test_gemini_thinking_budget_0():
|
|||
"thinking": {"type": "enabled", "budget_tokens": 0},
|
||||
},
|
||||
)
|
||||
print(raw_request)
|
||||
print(json.dumps(raw_request, indent=4, default=str))
|
||||
assert "0" in json.dumps(raw_request["raw_request_body"])
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue