fix(utils): add reason to pyright ignore for allowed_tools guard

This commit is contained in:
ege-arhan 2026-10-22 17:31:01 +00:00
parent 25d675330c
commit 8f3a0894c2

View file

@ -9056,7 +9056,7 @@ def validate_chat_completion_tool_choice(
# {"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"), # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType]
tool_choice.get("allowed_tools"), # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # raw dict payload
dict,
):
return tool_choice