The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Merge branch 'main' into litellm_vertex_migration
Krish Dholakiaf27abe046213
diff --cc litellm/__init__.pyindex 6a8a2875766,e5333211e39..bda12e5ddd6--- a/litellm/__init__.py+++ b/litellm/__init__.py@@@ -830,14 -848,10 +848,14 @@@ from .llms.gemini import GeminiConfifrom .llms.nlp_cloud import NLPCloudConfigfrom .llms.aleph_alpha import AlephAlphaConfigfrom .llms.petals import PetalsConfig-from .llms.vertex_httpx import VertexGeminiConfig, GoogleAIStudioGeminiConfig-from .llms.vertex_ai import VertexAIConfig, VertexAITextEmbeddingConfig+from .llms.vertex_httpx import (+ VertexGeminiConfig,+ GoogleAIStudioGeminiConfig,+ VertexAIConfig,+)+from .llms.vertex_ai import VertexAITextEmbeddingConfigfrom .llms.vertex_ai_anthropic import VertexAIAnthropicConfig- from .llms.vertex_ai_llama import VertexAILlama3Config+ from .llms.vertex_ai_partner import VertexAILlama3Configfrom .llms.sagemaker import SagemakerConfigfrom .llms.ollama import OllamaConfigfrom .llms.ollama_chat import OllamaChatConfigdiff --cc litellm/utils.pyindex 0f52df63c81,af602584556..61beabe9551--- a/litellm/utils.py+++ b/litellm/utils.py@@@ -3041,29 -3180,22 +3180,27 @@@ def get_optional_paramsor model in litellm.vertex_text_modelsor model in litellm.vertex_code_text_modelsor model in litellm.vertex_language_models- or model in litellm.vertex_embedding_modelsor model in litellm.vertex_vision_models):- print_verbose(f"(start) INSIDE THE VERTEX AI OPTIONAL PARAM BLOCK")## check if unsupported param passed insupported_params = get_supported_openai_params(model=model, custom_llm_provider=custom_llm_provider)_check_valid_arg(supported_params=supported_params)- optional_params = litellm.VertexAIConfig().map_openai_params(+ optional_params = litellm.VertexGeminiConfig().map_openai_params(non_default_params=non_default_params,optional_params=optional_params,+ model=model,+ drop_params=(+ drop_params+ if drop_params is not None and isinstance(drop_params, bool)+ else False+ ),)- print_verbose(- f"(end) INSIDE THE VERTEX AI OPTIONAL PARAM BLOCK - optional_params: {optional_params}"- )+ if litellm.vertex_ai_safety_settings is not None:+ optional_params["safety_settings"] = litellm.vertex_ai_safety_settingselif custom_llm_provider == "gemini":supported_params = get_supported_openai_params(model=model, custom_llm_provider=custom_llm_provider