ruby_llm-mcp icon indicating copy to clipboard operation
ruby_llm-mcp copied to clipboard

Streaming responses fail when using tool parsers that wont add empty argument blocks.

Open evang-corptools opened this issue 1 year ago • 2 comments

While using vllm and qwen3-32b streaming responses from tool calls fail.

ruby_llm-1.9.1/lib/ruby_llm/stream_accumulator.rb:71:in block in accumulate_tool_calls': undefined method empty?' for nil

changing line 71 from tool_call_arguments = tool_call.arguments.empty? ? +'' : tool_call.arguments to args = tool_call.arguments tool_call_arguments = args.nil? || args.empty? ? '' : args Fixes this issue in a non breaking way.

evang-corptools avatar Nov 18 '25 20:11 evang-corptools

Hey @evang-corptools -- are you using a public MCP that is available for testing or tool definition example that I could replete this issue to better understand your issue?

Reading more about this specific subject, feels like this maybe something that needs to be up steamed into RubyLLM as that project is responsible for the actually getting the tool arguments called.

If you could also get us some RubyLLM/RubyLLM::MCP debug logs (with debug mode enabled) should also help us come up with a correct solution for this problem

patvice avatar Nov 19 '25 16:11 patvice

Youre right, this is ruby llm, wrong project lol Ill submit my issue there.

evang-corptools avatar Nov 19 '25 16:11 evang-corptools