From ff6cb9188005b4d3141ee1c2549ac57727716009 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 20 Aug 2025 23:02:38 -0700 Subject: [PATCH] fix test --- core/llm/openaiTypeConverters.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/llm/openaiTypeConverters.ts b/core/llm/openaiTypeConverters.ts index 37be83b01..adf5a81bc 100644 --- a/core/llm/openaiTypeConverters.ts +++ b/core/llm/openaiTypeConverters.ts @@ -161,7 +161,7 @@ export function fromChatResponse(response: ChatCompletion): ChatMessage { role: "assistant", content: "", toolCalls: message.tool_calls - ?.filter((tc) => tc.type === "function" && "function" in tc) + ?.filter((tc) => tc.type === "function") .map((tc) => ({ id: tc.id, type: "function" as const, @@ -194,10 +194,7 @@ export function fromChatCompletionChunk( role: "assistant", content: "", toolCalls: delta?.tool_calls - .filter( - (tool_call) => - tool_call.type === "function" && "function" in tool_call, - ) + .filter((tool_call) => tool_call.type === "function") .map((tool_call) => ({ id: tool_call.id, type: "function" as const,