mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
Merge 141582c3d3 into 5028f9ec59
This commit is contained in:
commit
4059c8ecc8
1 changed files with 14 additions and 0 deletions
|
|
@ -311,6 +311,20 @@ class OpenAIGPT5Config(OpenAIGPTConfig):
|
|||
message=(f"reasoning_effort={effective_effort} is not supported for this model."),
|
||||
status_code=400,
|
||||
)
|
||||
elif effective_effort == "none":
|
||||
# none is opt-out: unknown models pass through; only block when
|
||||
# the model map explicitly sets supports_none_reasoning_effort=false.
|
||||
# gpt-5 and gpt-5-mini are both marked supports_none_reasoning_effort=false
|
||||
# and OpenAI returns 400 for none on those models.
|
||||
if self._is_reasoning_effort_level_explicitly_disabled(model, effective_effort):
|
||||
if litellm.drop_params or drop_params:
|
||||
non_default_params.pop("reasoning_effort", None)
|
||||
optional_params.pop("reasoning_effort", None)
|
||||
else:
|
||||
raise litellm.utils.UnsupportedParamsError(
|
||||
message=(f"reasoning_effort={effective_effort} is not supported for this model."),
|
||||
status_code=400,
|
||||
)
|
||||
|
||||
################################################################
|
||||
# max_tokens is not supported for gpt-5 models on OpenAI API
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue