Merge pull request #1916 from RenaLu/main

Add support for Vertex AI custom models deployed on private endpoint
This commit is contained in:
Krish Dholakia 2024-02-15 22:47:36 -08:00 committed by GitHub
commit 9b60ef9a3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 128 additions and 42 deletions

View file

@ -4256,7 +4256,14 @@ def get_optional_params(
optional_params["stop_sequences"] = stop
if max_tokens is not None:
optional_params["max_output_tokens"] = max_tokens
elif custom_llm_provider == "vertex_ai":
elif custom_llm_provider == "vertex_ai" and model in (
litellm.vertex_chat_models
or model in litellm.vertex_code_chat_models
or model in litellm.vertex_text_models
or model in litellm.vertex_code_text_models
or model in litellm.vertex_language_models
or model in litellm.vertex_embedding_models
):
## check if unsupported param passed in
supported_params = [
"temperature",