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(azure): wrap v1 image route litellm_params in MappingProxyType
Devin AIa6e68b1b0ea9
diff --git a/litellm/llms/azure/azure.py b/litellm/llms/azure/azure.pyindex 3a30444f06d..c23a4dd04fa 100644--- a/litellm/llms/azure/azure.py+++ b/litellm/llms/azure/azure.py@@ -2,6 +2,7 @@ import asyncioimport jsonimport timefrom collections.abc import Callable, Coroutine+from types import MappingProxyTypefrom typing import Any, Finalimport httpx@@ -1116,7 +1117,7 @@ class AzureChatCompletion(BaseAzureLLM, BaseLLM):if BaseAzureLLM._is_azure_v1_api_version(api_version):return BaseAzureLLM._get_base_azure_url(api_base=api_base,- litellm_params={"api_version": api_version},+ litellm_params=MappingProxyType({"api_version": api_version}),route="/openai/images/generations",)diff --git a/litellm/llms/azure/image_edit/transformation.py b/litellm/llms/azure/image_edit/transformation.pyindex eb1a51ca3e8..274bb49f400 100644--- a/litellm/llms/azure/image_edit/transformation.py+++ b/litellm/llms/azure/image_edit/transformation.py@@ -1,3 +1,4 @@+from types import MappingProxyTypefrom typing import Final, castimport httpx@@ -106,7 +107,7 @@ class AzureImageEditConfig(OpenAIImageEditConfig):if BaseAzureLLM._is_azure_v1_api_version(api_version):return BaseAzureLLM._get_base_azure_url(api_base=api_base,- litellm_params={"api_version": api_version},+ litellm_params=MappingProxyType({"api_version": api_version}),route="/openai/images/edits",)