astra-vision/astra
Jeuner f8963ebc79 fix: 400 from Ollama after a tool call, and silent interruptions
Pipecat stores a tool call's assistant message OpenAI-style, with
function.arguments as a JSON string. Ollama's native /api/chat wants an
object there and rejects the follow-up request with 400 ("Value looks
like object, but can't find closing '}' symbol") — reproduced verbatim
against real Ollama, then fixed with astra/core.py::normalize_tool_calls,
applied in build_request. Verified end-to-end with a real browser test
(synthesized speech as the fake mic): "erzeuge ein Bild von einer Katze
im Weltraum" now completes the full round trip — tool call, ComfyUI
image, and Astra's follow-up reply — with no error.

Also: an assistant turn interrupted before producing any text showed
nothing at all in the transcript. astra/server.py's assistant_turn
handler now notifies on interruption even with empty content, so an
early interruption (e.g. mic picking up noise during the slightly
longer vision-augmented responses) is visible instead of silent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVgSHNHdRx3UNTBodFmhRA
2026-09-07 16:29:48 +02:00
..
__init__.py feat: initial commit of astra local voice agent 2026-09-07 13:39:51 +02:00
comfyui.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00
comfyui_workflow.json feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00
core.py fix: 400 from Ollama after a tool call, and silent interruptions 2026-09-07 16:29:48 +02:00
documents.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00
inference.py feat: add voice picker UI and optional Tailnet exposure 2026-09-07 15:15:13 +02:00
prepare.py feat: add voice picker UI and optional Tailnet exposure 2026-09-07 15:15:13 +02:00
server.py fix: 400 from Ollama after a tool call, and silent interruptions 2026-09-07 16:29:48 +02:00
services.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00
tools.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00