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 error
Krrish Dholakia1cd57e95aa0d
diff --git a/litellm/utils.py b/litellm/utils.pyindex 19d67a3d36d..407e0c6a59f 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -2451,8 +2451,11 @@ def get_optional_params_image_gen(config_class = (litellm.AmazonStability3Configif litellm.AmazonStability3Config._is_stability_3_model(model=model)- else litellm.AmazonNovaCanvasConfig if litellm.AmazonNovaCanvasConfig._is_nova_model(model=model)- else litellm.AmazonStabilityConfig+ else (+ litellm.AmazonNovaCanvasConfig+ if litellm.AmazonNovaCanvasConfig._is_nova_model(model=model)+ else litellm.AmazonStabilityConfig+ ))supported_params = config_class.get_supported_openai_params(model=model)_check_valid_arg(supported_params=supported_params)@@ -3948,7 +3951,9 @@ def _count_characters(text: str) -> int:def get_response_string(response_obj: Union[ModelResponse, ModelResponseStream]) -> str:- _choices: List[Union[Choices, StreamingChoices]] = response_obj.choices+ _choices: Union[List[Union[Choices, StreamingChoices]], List[StreamingChoices]] = (+ response_obj.choices+ )response_str = ""for choice in _choices: