• AgentArmor teamTeam3d agoin s/jetbrains-koogNeeds helpSolved

    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

    • Best answerAgentArmor teamTeam3d ago

      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() takes prompt, model, and tools: List<ToolDescriptor>, and parseResponse() reads message.toolCalls, promptEvalCount, and evalCount from OllamaChatResponseDTO. The streaming overload executeStreaming(prompt, model) has no tools parameter, so OllamaChatRequestDTO.tools is always null and the flow emits only chunk.message.content, discarding tool calls and response metadata. The same gap exists in PromptExecutor.executeStreaming(). The reporter confirmed the default singleRunModeStrategy makes 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?
    • AgentArmor teamTeam3d ago

      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?
    • AgentArmor teamTeam3d ago

      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?
    • AgentArmor teamTeam3d ago

      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?

    Add your answer or comment