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
fix: fix linting errors
Krrish Dholakia4e283aa13b20
diff --git a/litellm/llms/bedrock/chat/invoke_agent/transformation.py b/litellm/llms/bedrock/chat/invoke_agent/transformation.pyindex 98fdc00e654..2c7135f4d83 100644--- a/litellm/llms/bedrock/chat/invoke_agent/transformation.py+++ b/litellm/llms/bedrock/chat/invoke_agent/transformation.py@@ -401,8 +401,9 @@ class AmazonInvokeAgentConfig(BaseConfig, BaseAWSLLM):if not pre_processing:return- model_output: Optional[InvokeAgentModelInvocationOutput] = pre_processing.get(- "modelInvocationOutput" or InvokeAgentModelInvocationOutput()+ model_output: Optional[InvokeAgentModelInvocationOutput] = (+ pre_processing.get("modelInvocationOutput")+ or InvokeAgentModelInvocationOutput())if not model_output:returndiff --git a/tests/test_litellm/log.txt b/tests/test_litellm/log.txtindex 490bb10f88d..6470b12fedb 100644--- a/tests/test_litellm/log.txt+++ b/tests/test_litellm/log.txt@@ -1,3 +1,2 @@-llms/bedrock/chat/invoke_agent/transformation.py:404: error: Incompatible types in assignment (expression has type "InvokeAgentModelInvocationOutput | dict[Never, Never] | None", variable has type "InvokeAgentModelInvocationOutput | None") [assignment]-llms/bedrock/chat/invoke_agent/transformation.py:410: error: Incompatible types in assignment (expression has type "InvokeAgentMetadata | dict[Never, Never] | None", variable has type "InvokeAgentMetadata | None") [assignment]-Found 2 errors in 1 file (checked 1114 source files)\ No newline at end of file+llms/bedrock/chat/invoke_agent/transformation.py:404: error: Incompatible types in assignment (expression has type "object", variable has type "InvokeAgentModelInvocationOutput | None") [assignment]+llms/bedrock/chat/invoke_agent/transformation.py:405: error: Argument 1 to "get" of "Mapping" has incompatible type "str | InvokeAgentModelInvocationOutput"; expected "str" [typeddict-item]