fix(voice): агент слушает 0.0.0.0 + защита tool_use.input от null
All checks were successful
Deploy / deploy (push) Successful in 1m58s
All checks were successful
Deploy / deploy (push) Successful in 1m58s
- agent/predict.py: HTTPServer bind 127.0.0.1 -> 0.0.0.0, иначе route.ts
(контейнер планшета) не достукивается до tablet-agent по имени в сети coolify
- route.ts: historyToAnthropicMessages приводит не-объект/null из
tc.function.arguments к {} — Anthropic 400 (tool_use.input must be object)
на legacy-истории от Groq (arguments: "null")
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UYsVrPyJ5phJeVsAGciS1v
This commit is contained in:
@@ -81,7 +81,7 @@ function historyToAnthropicMessages(history: HistoryMessage[]): any[] {
|
||||
if (msg.content) content.push({ type: 'text', text: msg.content })
|
||||
for (const tc of msg.tool_calls) {
|
||||
let input: any = {}
|
||||
try { input = JSON.parse(tc.function.arguments) } catch {}
|
||||
try { const _p = JSON.parse(tc.function.arguments); if (_p && typeof _p === 'object' && !Array.isArray(_p)) input = _p } catch {}
|
||||
content.push({ type: 'tool_use', id: tc.id, name: tc.function.name, input })
|
||||
}
|
||||
result.push({ role: 'assistant', content })
|
||||
|
||||
Reference in New Issue
Block a user