Skip to content

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]

docs(openai): trim tool-flattening docstrings to upstream facts

mateo-berri1c4674441c52
diff --git a/litellm/llms/openai/chat/gpt_transformation.py b/litellm/llms/openai/chat/gpt_transformation.py
index 89062f60fc7..a81884702e9 100644
--- a/litellm/llms/openai/chat/gpt_transformation.py
+++ b/litellm/llms/openai/chat/gpt_transformation.py
@@ -416,11 +416,6 @@ class OpenAIGPTConfig(BaseLLMModelInfo, BaseConfig):
custom_llm_provider: str | None,
api_base: str | None,
) -> bool:
- """
- True only for the generic `openai` provider actually pointed at
- api.openai.com (no custom api_base, or an openai.com host): the one
- backend enforcing OpenAI-only request strictness.
- """
if custom_llm_provider != "openai":
return False
resolved_api_base = api_base or litellm.api_base or os.getenv("OPENAI_BASE_URL") or os.getenv("OPENAI_API_BASE")
@@ -454,10 +449,7 @@ class OpenAIGPTConfig(BaseLLMModelInfo, BaseConfig):
"""
OpenAI's chat completions validator rejects tool `parameters` carrying
'oneOf'/'anyOf'/'allOf'/'enum'/'const'/'not' at the top level for every
- model family (unlike the Responses API, where GPT-5+ accepts them), so
- tool schemas bound for api.openai.com get their top-level combinators
- flattened; OpenAI-compatible backends on a custom api_base accept the
- caller's schema as-is and keep it.
+ model family, unlike the Responses API, where GPT-5+ accepts them.
"""
tools: Final = optional_params.get("tools")
if not isinstance(tools, list):
diff --git a/tests/test_litellm/llms/openai/chat/test_openai_gpt_transformation.py b/tests/test_litellm/llms/openai/chat/test_openai_gpt_transformation.py
index e65ef239068..19b245449a3 100644
--- a/tests/test_litellm/llms/openai/chat/test_openai_gpt_transformation.py
+++ b/tests/test_litellm/llms/openai/chat/test_openai_gpt_transformation.py
@@ -981,10 +981,7 @@ class TestToolSchemaCombinatorFlatteningForOpenAI:
"""
Regression tests for LIT-6488: OpenAI's chat completions validator rejects
tool parameters carrying a top-level anyOf/oneOf/allOf for every model
- family (GPT-5 included, unlike the Responses API), so requests bound for
- api.openai.com get those combinators flattened into one object schema,
- while OpenAI-compatible backends on a custom api_base and other providers
- keep the caller's schema untouched.
+ family, GPT-5 included, unlike the Responses API.
"""
def setup_method(self):