refactor(deepseek): hold the sent tools in a tuple

This commit is contained in:
mateo-berri 2026-10-28 17:46:33 -07:00
parent aeb2a26f35
commit ae8e31a6e8

View file

@ -256,7 +256,7 @@ class DeepSeekChatConfig(OpenAIGPTConfig):
tools: Final = optional_params.get("tools")
if not isinstance(tools, list) or not tools:
return optional_params
sent_tools: Final[list[object]] = tools
sent_tools: Final[tuple[object, ...]] = tuple(tools)
def _is_function_tool(tool: object) -> bool:
return isinstance(tool, dict) and tool.get("type") == "function"