From 9b5b3012c929cd9f2c313c4f732b9f0d552618b8 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 6 Nov 2026 18:24:14 +0000 Subject: [PATCH] fix: preserve provider sampling and deployment isolation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/llms/azure/responses/transformation.py | 2 ++ litellm/types/utils.py | 1 + 2 files changed, 3 insertions(+) diff --git a/litellm/llms/azure/responses/transformation.py b/litellm/llms/azure/responses/transformation.py index 73187c456bb..a5d3608d98c 100644 --- a/litellm/llms/azure/responses/transformation.py +++ b/litellm/llms/azure/responses/transformation.py @@ -98,6 +98,8 @@ class AzureOpenAIResponsesAPIConfig(OpenAIResponsesAPIConfig): return LlmProviders.AZURE def _sampling_params_allowed(self, model: str, effort: str | None) -> bool: + if self.custom_llm_provider != LlmProviders.AZURE: + return super()._sampling_params_allowed(model, effort) return AzureOpenAIGPT5Config.sampling_params_allowed( model, effort, fallback_allowed=not self._is_gpt_5_model(model) ) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index 5a14dc95e7c..4314b1724e9 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -4302,6 +4302,7 @@ DEPLOYMENT_SCOPED_CAPABILITY_FIELDS: Final[frozenset[str]] = frozenset( { "supports_regex_lookaround", "supports_assistant_prefill", + "supports_sampling_params", "supports_bedrock_native_structured_output", "supports_per_turn_control", "supports_pdf_input",