mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
Merge 3bde35d0e0 into a2c814654e
This commit is contained in:
commit
4f352b0ea6
2 changed files with 21 additions and 2 deletions
|
|
@ -309,8 +309,6 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
"stop",
|
||||
"extra_headers",
|
||||
"seed",
|
||||
"logprobs",
|
||||
"top_logprobs",
|
||||
"modalities",
|
||||
"audio",
|
||||
"parallel_tool_calls",
|
||||
|
|
@ -323,6 +321,10 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
if self._supports_penalty_parameters(model):
|
||||
supported_params.extend(["frequency_penalty", "presence_penalty"])
|
||||
|
||||
# Gemini 3+ models do not support logprobs on Vertex AI
|
||||
if not VertexGeminiConfig._is_gemini_3_or_newer(model):
|
||||
supported_params.extend(["logprobs", "top_logprobs"])
|
||||
|
||||
if supports_reasoning(model):
|
||||
supported_params.append("reasoning_effort")
|
||||
supported_params.append("thinking")
|
||||
|
|
|
|||
|
|
@ -5568,6 +5568,23 @@ class TestModelResponseIteratorCleanup:
|
|||
mock_response.aclose.assert_awaited_once()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"model, expect_logprobs",
|
||||
[
|
||||
("gemini-2.5-flash", True),
|
||||
("gemini-2.5-pro", True),
|
||||
("gemini-3.5-flash", False),
|
||||
("gemini-3-pro-preview", False),
|
||||
("gemini-3.1-flash", False),
|
||||
],
|
||||
)
|
||||
def test_logprobs_not_advertised_for_gemini_3(model, expect_logprobs):
|
||||
"""Gemini 3+ does not support logprobs on Vertex AI (#31600)."""
|
||||
params = VertexGeminiConfig().get_supported_openai_params(model)
|
||||
assert ("logprobs" in params) is expect_logprobs
|
||||
assert ("top_logprobs" in params) is expect_logprobs
|
||||
|
||||
|
||||
def test_process_candidates_merges_thought_signatures_and_server_side_tools():
|
||||
"""
|
||||
thought_signatures and server_side_tool_invocations must both survive in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue