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]

Fix: aws creds getting passed in req

Sameer Kankute2a4dc8e04196
diff --git a/litellm/llms/bedrock/chat/invoke_transformations/amazon_moonshot_transformation.py b/litellm/llms/bedrock/chat/invoke_transformations/amazon_moonshot_transformation.py
index fc8ec8ae74f..272ab685b64 100644
--- a/litellm/llms/bedrock/chat/invoke_transformations/amazon_moonshot_transformation.py
+++ b/litellm/llms/bedrock/chat/invoke_transformations/amazon_moonshot_transformation.py
@@ -143,11 +143,11 @@ class AmazonMoonshotConfig(AmazonInvokeConfig, MoonshotChatConfig):
- Converting content lists to strings (Moonshot doesn't support list format)
- Adding tool_choice="required" message if needed
- Temperature and parameter validation
-
- Important: Strips routing prefixes (bedrock/, invoke/) from model name
- before passing to parent class to ensure the request body contains only
- the actual model ID (e.g., moonshot.kimi-k2-thinking).
+
"""
+ # Filter out AWS credentials using the existing method from BaseAWSLLM
+ self._get_boto_credentials_from_optional_params(optional_params, model)
+
# Strip routing prefixes to get the actual model ID
clean_model_id = self._get_model_id(model)