about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2026-04-09 18:56:22 +0100
committerArun Isaac2026-04-09 18:56:22 +0100
commitd14afa811cd0f4b1c191f90695017db74de382e9 (patch)
treed6efb2142203144b25c64080e36f1347b9b06daa
parent361956056d5b918c41b35f30b763bf401cc5cc7a (diff)
downloadkaagum-d14afa811cd0f4b1c191f90695017db74de382e9.tar.gz
kaagum-d14afa811cd0f4b1c191f90695017db74de382e9.tar.lz
kaagum-d14afa811cd0f4b1c191f90695017db74de382e9.zip
Send tool call results to the client as a vector of content.
In a tool_call_update, the content field must be a vector of
association lists, not just an association list.
-rw-r--r--kaakaa/tea.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/kaakaa/tea.scm b/kaakaa/tea.scm
index 61b00f3..46b2e31 100644
--- a/kaakaa/tea.scm
+++ b/kaakaa/tea.scm
@@ -496,12 +496,13 @@ state and a list of effects."
                                     ,(if (tool-call-result-success? result)
                                          "completed"
                                          "failed"))
-                                   ("content"
-                                    ("type" . "content")
-                                    ("content"
-                                     ("type" . "text")
-                                     ("text" . ,(focus (key-ref "content")
-                                                       (tool-call-result-json result)))))))))
+                                   ("content" .
+                                    ,(vector `(("type" . "content")
+                                               ("content"
+                                                ("type" . "text")
+                                                ("text" .
+                                                 ,(focus (key-ref "content")
+                                                         (tool-call-result-json result)))))))))))
                   (state->llm-requests session-id state)))))
 
 (define (next-state state message tools)