diff --git a/app/api/voice/chat/route.ts b/app/api/voice/chat/route.ts index 0c36aae..35942d1 100644 --- a/app/api/voice/chat/route.ts +++ b/app/api/voice/chat/route.ts @@ -55,7 +55,7 @@ function toAnthropicTools(tools: any[]): any[] { function historyToAnthropicMessages(history: HistoryMessage[]): any[] { const result: any[] = [] for (const msg of history) { - if (msg.role === 'system') continue // skip, goes in system field + if ((msg.role as string) === 'system') continue // skip, goes in system field if (msg.role === 'user') { result.push({ role: 'user', content: msg.content || '' }) } else if (msg.role === 'assistant') {