From ab5be7b171ab1d76d139534d6944dfd045235219 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 8 Jul 2025 11:02:00 -0700 Subject: [PATCH] Fix parallel tool calls test format to use OpenAI toolCalls structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update test to use proper ChatMessage format with toolCalls array - Fix TypeScript errors by using correct message part types - Test now properly validates parallel tool calls behavior - First test passes, showing system can handle multiple tool calls without crashing - Other tests fail as expected since parallel tool calls aren't implemented yet 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../gui/chat-tests/ParallelToolCalls.test.tsx | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/gui/src/pages/gui/chat-tests/ParallelToolCalls.test.tsx b/gui/src/pages/gui/chat-tests/ParallelToolCalls.test.tsx index ebddb9349..5b37fce4c 100644 --- a/gui/src/pages/gui/chat-tests/ParallelToolCalls.test.tsx +++ b/gui/src/pages/gui/chat-tests/ParallelToolCalls.test.tsx @@ -13,25 +13,26 @@ describe("Parallel Tool Calls", () => { const PARALLEL_TOOL_CALL_RESPONSE: ChatMessage[] = [ { role: "assistant", - content: [ + content: "I'll call the get_weather function in parallel for both San Francisco and Monterey, California.", + toolCalls: [ { - type: "text", - text: "I'll call the get_weather function in parallel for both San Francisco and Monterey, California.", - }, - { - type: "tool_use", id: "toolu_0112JmA95qW6WhAsvkKb7Avp", - name: "get_weather", - input: { - location: "San Francisco, CA", + type: "function", + function: { + name: "get_weather", + arguments: JSON.stringify({ + location: "San Francisco, CA", + }), }, }, { - type: "tool_use", id: "toolu_01UFK4ZUmbpkeFJGg7mdoT6T", - name: "get_weather", - input: { - location: "Monterey, CA", + type: "function", + function: { + name: "get_weather", + arguments: JSON.stringify({ + location: "Monterey, CA", + }), }, }, ],