mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
fix: avoid rebinding Final candidate in thinking type mapping
This commit is contained in:
parent
0e1147806a
commit
92ad75a12c
1 changed files with 2 additions and 2 deletions
|
|
@ -52,9 +52,9 @@ def _thinking_enabled(thinking: object) -> bool:
|
|||
|
||||
def _thinking_type_value(thinking: object, allowed: Sequence[str]) -> str | None:
|
||||
if isinstance(thinking, str):
|
||||
candidate: Final = thinking
|
||||
candidate = thinking
|
||||
elif isinstance(thinking, Mapping):
|
||||
raw: Final = thinking.get("type")
|
||||
raw = thinking.get("type")
|
||||
candidate = raw if isinstance(raw, str) else None
|
||||
elif isinstance(thinking, bool):
|
||||
candidate = "enabled" if thinking else "disabled"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue