What this thread does
Use requestLLMStreaming() for incremental text, but on Koog 1.3.0 switch tool-dependent Ollama turns to requestLLM() when streaming requests omit tool declarations.
As of November 2026. This concerns JetBrains Koog's native OllamaClient path.
What changed
- The May 21, 2026 Koog 1.0.0 notes include Ollama streaming fixes for cross-dispatcher Flow emission, JSON returned as
text/plain, and tool-call ordering. - Those fixes do not establish streaming tool support in 1.3.0: Magnus Lejonlid (Sunckist) reported missing outbound tools on October 19, 2026, explicitly naming 1.3.0 and the development branch. Koog 1.3.0 was released on September 24, 2026.
Do first:
1. Separate a text-only stream from a turn that needs the model to choose a tool. For text display inside a write session, the streaming documentation gives this pattern:
llm.writeSession {
appendPrompt { user("Explain the next step briefly.") }
requestLLMStreaming()
.filterTextOnly()
.collect { chunk -> print(chunk) }
}
2. Keep typed frames when your consumer needs tool calls, reasoning or completion metadata. Render StreamFrame.TextDelta; use StreamFrame.ToolCallComplete for a complete invocation and StreamFrame.End for the end marker. Delta and complete frames describe the same content at different stages, so displaying both can duplicate text. See the frame reference. 3. For a tool-dependent turn on the affected client, compare the outbound /api/chat request with the non-streaming call. If the streaming request lacks tools, use requestLLM() with the same configured tools and preserve your tool-execution loop. The session documentation says this method uses the current prompt and tools. This is a fallback to evaluate, not a promise about every Ollama model.
Diagnostic: text arrives but the model never calls a tool
#2304 reports that executeStreaming(prompt, model, tools) accepts the tool list but does not serialize it into the request, unlike execute. Its short description is “The model is never told about the tools”. Issue #2304 attributes the failure to tools missing from the outbound /api/chat request.
As of November 2026 (checked 2026-11-30), the issue remains open, as does PR #2305. Missing declarations prevent the model from choosing those tools; supplying them does not guarantee a tool call.
Diagnostic: java.lang.IllegalStateException: Flow invariant is violated:
This is a different failure. luca-campara's March 31, 2026 issue #1775 names ai.koog:koog-agents:0.7.3, Kotlin 2.3.0 and coroutines 1.10.2 on Compose Desktop: frames fail to reach the collector because emission crosses coroutine contexts. First check that dependency version against the 1.0.0 release's fix entry. The 1.0.0 notes list a Flow-emission fix; separately, issue #2304 reports missing tools in 1.3.0.
Limits
The tool omission report names Koog versions but no Ollama server version. It does not cover an OpenAI-compatible proxy path. Our diagnostic recommendation: inspect the outbound streaming request for tools even when text arrives.
Not for: Ollama OpenAI-compatible request conversion for assistant turns with an empty content array and tool calls; see the merged Ollama converter fix, PR #19312.
Started from a post by @Magnus Lejonlid (Sunckist), packaged by the editor. Original post