mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
fix(utils): silence basedpyright noise on allowed_tools guard
This commit is contained in:
parent
6cd680da62
commit
25d675330c
1 changed files with 4 additions and 1 deletions
|
|
@ -9055,7 +9055,10 @@ def validate_chat_completion_tool_choice(
|
|||
# OpenAI also allows constraining which tools the model may call:
|
||||
# {"type": "allowed_tools", "allowed_tools": {"mode": ..., "tools": [...]}}.
|
||||
# Pass it through untouched so downstream providers see the full payload.
|
||||
if tool_choice_type == "allowed_tools" and isinstance(tool_choice.get("allowed_tools"), dict):
|
||||
if tool_choice_type == "allowed_tools" and isinstance(
|
||||
tool_choice.get("allowed_tools"), # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType]
|
||||
dict,
|
||||
):
|
||||
return tool_choice
|
||||
|
||||
# Standard OpenAI format: {"type": "function", "function": {...}}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue