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 Dholakiab854d2100c22
diff --cc litellm/__init__.pyindex 5a9b1dcb951,b6aacad1a56..6a8a2875766--- a/litellm/__init__.py+++ b/litellm/__init__.py@@@ -800,13 -830,10 +830,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 VertexAILlama3Configfrom .llms.sagemaker import SagemakerConfigfrom .llms.ollama import OllamaConfigfrom .llms.ollama_chat import OllamaChatConfigdiff --cc litellm/llms/vertex_httpx.pyindex ce59ffeb093,142cabbe961..26f3b814b89--- a/litellm/llms/vertex_httpx.py+++ b/litellm/llms/vertex_httpx.py@@@ -431,7 -330,7 +435,8 @@@ class VertexGeminiConfig"stop","frequency_penalty","presence_penalty",+ "extra_headers",+ "seed",]def map_tool_choice_values(diff --cc litellm/main.pyindex 76dd33dd6e3,134617ba00f..95c0c3b3b7e--- a/litellm/main.py+++ b/litellm/main.py@@@ -2079,29 -2065,29 +2065,51 @@@ def completionacompletion=acompletion,headers=headers,custom_prompt_dict=custom_prompt_dict,+ timeout=timeout,+ client=client,+ )+ elif model.startswith("meta/"):+ model_response = vertex_llama_chat_completion.completion(+ model=model,+ messages=messages,+ model_response=model_response,+ print_verbose=print_verbose,+ optional_params=new_params,+ litellm_params=litellm_params,+ logger_fn=logger_fn,+ encoding=encoding,+ vertex_location=vertex_ai_location,+ vertex_project=vertex_ai_project,+ vertex_credentials=vertex_credentials,+ logging_obj=logging,+ acompletion=acompletion,+ headers=headers,+ custom_prompt_dict=custom_prompt_dict,+ timeout=timeout,+ client=client,)+ elif "gemini" in model:+ model_response = vertex_chat_completion.completion( # type: ignore+ model=model,+ messages=messages,+ model_response=model_response,+ print_verbose=print_verbose,+ optional_params=new_params,+ litellm_params=litellm_params,+ logger_fn=logger_fn,+ encoding=encoding,+ vertex_location=vertex_ai_location,+ vertex_project=vertex_ai_project,+ vertex_credentials=vertex_credentials,+ gemini_api_key=None,+ logging_obj=logging,+ acompletion=acompletion,+ timeout=timeout,+ custom_llm_provider=custom_llm_provider,+ client=client,+ api_base=api_base,+ extra_headers=extra_headers,+ )else:model_response = vertex_ai.completion(model=model,