astra-vision/tests
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
..
test_comfyui.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00
test_core.py fix: 400 from Ollama after a tool call, and silent interruptions 2026-09-07 16:29:48 +02:00
test_documents.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00
test_inference.py feat: initial commit of astra local voice agent 2026-09-07 13:39:51 +02:00
test_ollama.py feat: initial commit of astra local voice agent 2026-09-07 13:39:51 +02:00
test_server.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00
test_stt.py feat: initial commit of astra local voice agent 2026-09-07 13:39:51 +02:00
test_tools.py feat: image generation via ComfyUI and PDF/image upload 2026-09-07 15:56:18 +02:00