Skip to content

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]

allow load testing sagemaker url

Ishaan Jaffed2d3f4bf868
diff --git a/litellm/llms/sagemaker.py b/litellm/llms/sagemaker.py
index 32146b9caed..76c3460f132 100644
--- a/litellm/llms/sagemaker.py
+++ b/litellm/llms/sagemaker.py
@@ -182,6 +182,10 @@ class SagemakerLLM(BaseAWSLLM):
else:
api_base = f"https://runtime.sagemaker.{aws_region_name}.amazonaws.com/endpoints/{model}/invocations"
+ sagemaker_base_url = optional_params.get("sagemaker_base_url", None)
+ if sagemaker_base_url is not None:
+ api_base = sagemaker_base_url
+
encoded_data = json.dumps(data).encode("utf-8")
headers = {"Content-Type": "application/json"}
if extra_headers is not None: