mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
docs(openai): trim tool-flattening docstrings to upstream facts
This commit is contained in:
parent
855f56fa94
commit
1c4674441c
2 changed files with 2 additions and 13 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue