oMLX 0.6.4 (2529) can't yet handle this model's toolcalls

#2
by hf260814 - opened

Just a heads up. A trivial query "is rust installed?" generates request like this
data: {... "choices":[{"index":0,"delta":{"content":"\n\n<function name=\"bash\">"}}]}
which is just returned instead of being executed.

For comparison gemma4 generates a request like this
data: {... "choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_45b52d0e","type":"function","function":{"name":"bash","arguments"...

See https://github.com/jundot/omlx/issues/3429 and proposed https://github.com/jundot/omlx/pull/3530

OpenBMB org

Thanks for the heads up — this has been fixed.

PR jundot/omlx#3530 was merged into main on Sept 16 (issue #3429 now closed). The root cause was that oMLX's tool_call parsers only recognized wrapped dialects like <tool_call>…</tool_call>, so MiniCPM5's attribute-style <function name="bash"><param name="...">…</param></function> output fell through and got streamed back as plain content.

The merge adds _parse_attribute_function_tool_calls (bare form) plus _parse_xml_tool_calls for the wrapped form, handles CDATA-wrapped values, accepts both <param> and <parameter>, and gates parsing on declared tools so prose mentioning a function name isn't misread as a call. Stream filtering also suppresses the markup while leaving undeclared tags alone.

So on an oMLX build newer than 0.6.4 (2529) this should now surface as a proper tool_calls delta instead of content.

Sign up or log in to comment