Changes to fix frequency_penalty and presence_penalty issue for gemini-2.5-pro model (#16041)

* Update vertex_and_google_ai_studio_gemini.py

* Fix logic

* Fix mypy error

* Fix lgic

---------

Co-authored-by: tanvi thakur <tanvi_thakur@intuit.com>
This commit is contained in:
tanvithakur
2025-10-30 20:02:58 -07:00
committed by GitHub
co-authored by tanvi thakur
parent a6f740f28b
commit bb79a75a89
2 changed files with 3 additions and 6 deletions
@@ -220,11 +220,8 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
def _supports_penalty_parameters(self, model: str) -> bool:
unsupported_models = ["gemini-2.5-pro-preview-06-05"]
for pattern in unsupported_models:
if model in pattern:
return False
if model in unsupported_models:
return False
return True
def get_supported_openai_params(self, model: str) -> List[str]:
+1 -1
View File
@@ -985,7 +985,7 @@ class ProxyLogging:
)
else:
_callback = callback # type: ignore
if _callback is not None and isinstance(_callback, CustomGuardrail):
if _callback is not None and isinstance(_callback, CustomGuardrail) and data is not None:
result = await self._process_guardrail_callback(
callback=_callback,
data=data,