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
add fine tuned vertex model support
Ishaan Jaff3d11b2172681
diff --git a/litellm/llms/vertex_httpx.py b/litellm/llms/vertex_httpx.pyindex faecdd79026..5042d0f77e0 100644--- a/litellm/llms/vertex_httpx.py+++ b/litellm/llms/vertex_httpx.py@@ -1161,6 +1161,15 @@ class VertexLLM(BaseLLM):else:url = f"https://{vertex_location}-aiplatform.googleapis.com/{version}/projects/{vertex_project}/locations/{vertex_location}/publishers/google/models/{model}:{endpoint}"+ # if model is only numeric chars then it's a fine tuned gemini model+ # model = 4965075652664360960+ # send to this url: url = f"https://{vertex_location}-aiplatform.googleapis.com/{version}/projects/{vertex_project}/locations/{vertex_location}/endpoints/{model}:{endpoint}"+ if model.isdigit():+ # It's a fine-tuned Gemini model+ url = f"https://{vertex_location}-aiplatform.googleapis.com/{version}/projects/{vertex_project}/locations/{vertex_location}/endpoints/{model}:{endpoint}"+ if stream is True:+ url += "?alt=sse"+if (api_base is not None): # for cloudflare ai gateway - https://github.com/BerriAI/litellm/issues/4317