Assistant streams its answer token by token

ai/client.py streams the completion and puts the chunks back together
(Assembler), covering OpenAI's piecewise tool-call arguments, Ollama's whole
calls, OpenRouter's comment lines, unnumbered calls and in-stream errors.
The turn emits a delta event per piece and a message per round as before,
and the chat grows the last answer as deltas arrive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 17:37:56 +02:00
co-authored by Claude Opus 5.5
parent 429100a0c7
commit 58b92da8b0
8 changed files with 243 additions and 32 deletions
+2 -1
View File
@@ -54,7 +54,8 @@ A superuser configures an OpenAI-compatible provider under
the dashboard's Assistant entry for signed-in users.
The assistant uses the same tools with your own permissions. Draft edits
appear in the editor, and each answer renders as markdown with a tool trace.
appear in the editor. Each answer streams in as the model writes it and
renders as markdown with a tool trace.
Conversations are stored per user on the instance; the bin button clears
yours.
`MCP_ENABLED` is only needed for external clients, so the built-in assistant