mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
\fix(lint): narrow reasoning to dict before copy to satisfy basedpyright budget"
This commit is contained in:
parent
a855df7b33
commit
dce9f6f276
1 changed files with 7 additions and 6 deletions
|
|
@ -256,12 +256,13 @@ class OpenAIResponsesAPIConfig(BaseResponsesAPIConfig):
|
|||
|
||||
if unsupported_effort:
|
||||
if should_drop_effort:
|
||||
updated_reasoning: Final = dict(reasoning) # mutable-ok: local copy
|
||||
updated_reasoning.pop("effort", None)
|
||||
if updated_reasoning:
|
||||
params["reasoning"] = updated_reasoning
|
||||
else:
|
||||
params.pop("reasoning", None)
|
||||
if isinstance(reasoning, dict):
|
||||
updated_reasoning: Final = reasoning.copy() # mutable-ok: local copy
|
||||
updated_reasoning.pop("effort", None)
|
||||
if updated_reasoning:
|
||||
params["reasoning"] = updated_reasoning
|
||||
else:
|
||||
params.pop("reasoning", None)
|
||||
else:
|
||||
raise litellm.UnsupportedParamsError(
|
||||
message=f"reasoning.effort={effort} is not supported for this model.",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue