From acf835401e4da11b0374d7142666f1caa45b6ec3 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Wed, 29 Oct 2025 09:43:55 -0400 Subject: [PATCH] fix: Make ToolCall arguments fully recursive The previous definitions only allowed for a single level of nesting of lists/dicts and was not truly recursive. Tool call inputs with more complex inputs would fail validation and throw an exception. --- src/llama_stack/models/llama/datatypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama_stack/models/llama/datatypes.py b/src/llama_stack/models/llama/datatypes.py index 7cb7aa7bd..b5f0bbf0e 100644 --- a/src/llama_stack/models/llama/datatypes.py +++ b/src/llama_stack/models/llama/datatypes.py @@ -31,7 +31,7 @@ class BuiltinTool(Enum): Primitive = str | int | float | bool | None -RecursiveType = Primitive | list[Primitive] | dict[str, Primitive] +type RecursiveType = Primitive | list[RecursiveType] | dict[str, RecursiveType] class ToolCall(BaseModel):