mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-06 00:23:19 +00:00
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:
co-authored by
tanvi thakur
parent
a6f740f28b
commit
bb79a75a89
@@ -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]:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user