mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
fix(vertex-ai): document request payload normalization
This commit is contained in:
parent
f6f86f04bf
commit
944e54d947
1 changed files with 4 additions and 2 deletions
|
|
@ -406,7 +406,9 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
]
|
||||
|
||||
@staticmethod
|
||||
def _deduplicate_tools(optional_params: dict) -> None:
|
||||
def _deduplicate_tools(
|
||||
optional_params: dict, # mutable-ok: optional parameters use the existing request shape
|
||||
) -> None:
|
||||
tools: Final = optional_params.get("tools")
|
||||
if not isinstance(tools, list):
|
||||
return
|
||||
|
|
@ -415,7 +417,7 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
for tool in tools:
|
||||
if tool not in deduplicated:
|
||||
deduplicated.append(tool)
|
||||
optional_params["tools"] = deduplicated
|
||||
optional_params["tools"] = deduplicated # rebind-ok: normalize request payload before serialization
|
||||
|
||||
def _map_service_tier_param(self, value: str, optional_params: dict) -> None:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue