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
chore(bedrock): document mutable signing params
daleselaji-devb11d342022e1
diff --git a/litellm/llms/bedrock/batches/transformation.py b/litellm/llms/bedrock/batches/transformation.pyindex 8b437af8581..e92a2e7a00a 100644--- a/litellm/llms/bedrock/batches/transformation.py+++ b/litellm/llms/bedrock/batches/transformation.py@@ -130,7 +130,10 @@ class BedrockBatchesConfig(BaseAWSLLM, BaseBatchesConfig):Get the complete URL for Bedrock batch creation.Bedrock batch jobs are created via the model invocation job API."""- request_params: Final = {**litellm_params, **optional_params}+ request_params: Final = {+ **litellm_params,+ **optional_params,+ } # mutable-ok: merged params are read by AWS helpersaws_region_name: Final = self._get_aws_region_name(request_params, model)# Bedrock model invocation job endpoint@@ -233,7 +236,10 @@ class BedrockBatchesConfig(BaseAWSLLM, BaseBatchesConfig):# For Bedrock, we need to return a pre-signed request with AWS auth headers# Use common utility for AWS signing- request_params: Final = {**litellm_params, **optional_params}+ request_params: Final = {+ **litellm_params,+ **optional_params,+ } # mutable-ok: merged params are read by AWS helpersendpoint_url: Final = (f"https://bedrock.{self._get_aws_region_name(request_params, model)}.amazonaws.com/model-invocation-job")@@ -389,7 +395,10 @@ class BedrockBatchesConfig(BaseAWSLLM, BaseBatchesConfig):endpoint_url: Final = f"https://bedrock.{region}.amazonaws.com/model-invocation-job/{encoded_arn}"# Use common utility for AWS signing- request_params: Final = {**litellm_params, **optional_params}+ request_params: Final = {+ **litellm_params,+ **optional_params,+ } # mutable-ok: merged params are read by AWS helperssigned_headers, _ = self.common_utils.sign_aws_request(service_name="bedrock",data={}, # GET request has no bodydiff --git a/litellm/llms/bedrock/files/transformation.py b/litellm/llms/bedrock/files/transformation.pyindex 072343ae936..cd4f52ddbfe 100644--- a/litellm/llms/bedrock/files/transformation.py+++ b/litellm/llms/bedrock/files/transformation.py@@ -257,7 +257,10 @@ class BedrockFilesConfig(BaseAWSLLM, BaseFilesConfig):"""Get the complete S3 URL for the file upload request"""- request_params: Final = {**litellm_params, **optional_params}+ request_params: Final = {+ **litellm_params,+ **optional_params,+ } # mutable-ok: merged params are read by AWS helpersbucket_name = litellm_params.get("s3_bucket_name") or os.getenv("AWS_S3_BUCKET_NAME")if not bucket_name:raise ValueError(@@ -729,7 +732,10 @@ class BedrockFilesConfig(BaseAWSLLM, BaseFilesConfig):if s3_region_name:optional_params = {**optional_params, "aws_region_name": s3_region_name}- request_params: Final = {**litellm_params, **optional_params}+ request_params: Final = {+ **litellm_params,+ **optional_params,+ } # mutable-ok: merged params are read by AWS helpers# Sign the request and return a pre-signed request objectsigned_headers, signed_body = self._sign_s3_request(