From ef623c9bb5d128ba9a2ea091d0acd49c5f7bad20 Mon Sep 17 00:00:00 2001 From: Prakersh Maheshwari Date: Tue, 17 Mar 2026 02:35:42 +0530 Subject: [PATCH] refactor: trim function name consistently in Responses-to-Chat direction Addresses PR review: both translation directions now trim the function name the same way, matching the Chat-to-Responses pattern. --- open-sse/translator/request/openai-responses.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/open-sse/translator/request/openai-responses.ts b/open-sse/translator/request/openai-responses.ts index fdb0e29db9..e10a294aad 100644 --- a/open-sse/translator/request/openai-responses.ts +++ b/open-sse/translator/request/openai-responses.ts @@ -121,8 +121,8 @@ export function openaiResponsesToOpenAIRequest( if (itemType === "function_call") { // Skip tool calls with empty names to avoid infinite placeholder_tool loops - const fnName = toString(item.name); - if (!fnName || !fnName.trim()) { + const fnName = toString(item.name).trim(); + if (!fnName) { continue; }