Fix tool calls with empty arguments

This commit is contained in:
Alex Gleason committed 2025-09-24 00:47:36 -05:00
1 parent 71f4397880
commit e93a60be2c
1 file changed
+7
+7
View File
@@ -340,6 +340,13 @@ export class SessionManager {
}
}
// Fix tool calls with empty arguments
for (const toolCall of accumulatedToolCalls) {
if (toolCall.type === 'function') {
toolCall.function.arguments = toolCall.function.arguments || '{}';
}
}
// Create final assistant message
const assistantMessage: AIMessage = {
role: 'assistant',