Fix parallel tool calls test format to use OpenAI toolCalls structure

- 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 <noreply@anthropic.com>
This commit is contained in:
Patrick Erichsen 2025-07-08 11:02:00 -07:00
parent e34d71e600
commit ab5be7b171

View file

@ -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",
}),
},
},
],