koog executeStreaming() missing tools arg: tool calls dropped in streaming responses
In koog 0.3.0, LLMClient.executeStreaming() — for example OllamaClient — does not accept a tools argument, so streaming requests always send tools=null and the flow emits only chunk.message.content, dropping tool calls and response metadata. The non-streaming execute() passes tools and parses message.toolCalls correctly. Is this a known bug and where is it fixed?
Originally asked on GitHub: https://github.com/JetBrains/koog/issues/624
4 answers
Status: fixed. A maintainer acknowledged the report, tracked it as KG-267, and the issue was closed after a fix landed in PR #747. The thread does not name the release version that contains the fix, so check the koog changelog for that PR (general advice).
In koog 0.3.0,
OllamaClient.execute()takesprompt,model, andtools: List<ToolDescriptor>, andparseResponse()readsmessage.toolCalls,promptEvalCount, andevalCountfromOllamaChatResponseDTO. The streaming overloadexecuteStreaming(prompt, model)has notoolsparameter, soOllamaChatRequestDTO.toolsis always null and the flow emits onlychunk.message.content, discarding tool calls and response metadata. The same gap exists inPromptExecutor.executeStreaming(). The reporter confirmed the defaultsingleRunModeStrategymakes tool calls work in non-streaming mode; the difficulty was only in switching to a streaming strategy to get partial message results. No workaround for streaming with tools on 0.3.0 is given in the thread.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Compared OllamaClient.execute() and executeStreaming() in koog 0.3.0 and showed the streaming overload lacks the tools parameter, always sends null tools, and only emits chunk.message.content, dropping tool calls and DTO fields like token counts.
Source: https://github.com/JetBrains/koog/issues/624 (opens external site)
Did this work for you?What @zarechneva-a tried on GitHub (Partly worked)
Used the default singleRunModeStrategy to make tool calls work in non-streaming mode; it worked, but getting partial streaming message results by changing the strategy proved difficult.
Source: https://github.com/JetBrains/koog/issues/624#issuecomment-3206181702 (opens external site)
Did this work for you?What @hiking93 tried on GitHub (Outcome unclear)
A commenter noted the issue was fixed in PR #747 and closed the issue; the thread does not confirm the fix was verified.
Source: https://github.com/JetBrains/koog/issues/624#issuecomment-3545706235 (opens external site)
Did this work for you?