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: add stop param as supported for openai and azure
Sameer Kankute44a68cf1c6bf
diff --git a/litellm/constants.py b/litellm/constants.pyindex 17ad742e419..abba8cc163b 100644--- a/litellm/constants.py+++ b/litellm/constants.py@@ -578,7 +578,6 @@ OPENAI_CHAT_COMPLETION_PARAMS = ["thinking","web_search_options","service_tier",- "store","prompt_cache_key","prompt_cache_retention","safety_identifier",diff --git a/litellm/llms/azure/chat/gpt_transformation.py b/litellm/llms/azure/chat/gpt_transformation.pyindex 18dad503a59..69eda95be1b 100644--- a/litellm/llms/azure/chat/gpt_transformation.py+++ b/litellm/llms/azure/chat/gpt_transformation.py@@ -106,6 +106,7 @@ class AzureOpenAIConfig(BaseConfig):"audio","web_search_options","prompt_cache_key",+ "store",]def _is_response_format_supported_model(self, model: str) -> bool:@@ -158,7 +159,6 @@ class AzureOpenAIConfig(BaseConfig):api_version: str = "",) -> dict:supported_openai_params = self.get_supported_openai_params(model)-api_version_times = api_version.split("-")if len(api_version_times) >= 3:@@ -245,7 +245,6 @@ class AzureOpenAIConfig(BaseConfig):optional_params["tools"].extend(value)elif param in supported_openai_params:optional_params[param] = value-return optional_paramsdef transform_request(diff --git a/litellm/llms/openai/chat/gpt_transformation.py b/litellm/llms/openai/chat/gpt_transformation.pyindex 59f52e2b81c..aa8471a5973 100644--- a/litellm/llms/openai/chat/gpt_transformation.py+++ b/litellm/llms/openai/chat/gpt_transformation.py@@ -162,6 +162,7 @@ class OpenAIGPTConfig(BaseLLMModelInfo, BaseConfig):"service_tier","safety_identifier","prompt_cache_key",+ "store",] # works across all modelsmodel_specific_params = []diff --git a/tests/llm_translation/test_optional_params.py b/tests/llm_translation/test_optional_params.pyindex 6ecac7b36a2..a521e8e43f8 100644--- a/tests/llm_translation/test_optional_params.py+++ b/tests/llm_translation/test_optional_params.py@@ -2045,3 +2045,42 @@ def test_store_in_openai_chat_completion_params():result = get_standard_openai_params({"store": True, "temperature": 0.7})assert "store" in resultassert result["store"] is True+++def test_store_param_passed_through_openai_azure():+ """+ Test that the `store` parameter is correctly passed through to OpenAI+ and Azure OpenAI providers when using get_optional_params().++ This verifies the fix for the regression where `store` was being filtered+ out by get_non_default_completion_params() due to architectural issues+ in parameter processing pipeline.++ Ref: https://github.com/BerriAI/litellm/issues/19700+ """+ # Test OpenAI provider+ optional_params_openai = get_optional_params(+ model="gpt-4o",+ custom_llm_provider="openai",+ store=True,+ )+ assert "store" in optional_params_openai+ assert optional_params_openai["store"] is True++ # Test Azure OpenAI provider+ optional_params_azure = get_optional_params(+ model="gpt-4.1-2025-04-14",+ custom_llm_provider="azure",+ store=True,+ )+ assert "store" in optional_params_azure+ assert optional_params_azure["store"] is True++ # Test with store=False+ optional_params_false = get_optional_params(+ model="gpt-4o",+ custom_llm_provider="openai",+ store=False,+ )+ assert "store" in optional_params_false+ assert optional_params_false["store"] is False