Description
I'm trying to use openbmb/MiniCPM5-1B-MLX as the backend for an agent harness using the OpenAI-compatible mlx_lm.server API.
Normal text generation works, but tool calls do not work. When the agent sends tools to /v1/chat/completions, mlx_lm.server logs:
WARNING - Received tools but model does not supporttool calling. If you think this is an error, file an issue here: https://github.com/ml-explore/mlx-lm/issues
The model appears to generate normally, but the tools are not exposed/handled as structured OpenAI tool_calls, so the agent cannot execute tools.
Environment
- MLX-LM: 0.31.3
- Model:
openbmb/MiniCPM5-1B-MLX
- Python: 3.12.12
- Agent harness: pi 0.85.1
- Hardware: MacBook Air (M1, 2020)
- RAM: 8 GB
- OS: macOS 15.5 (BuildVersion: 24F74)
Server started with:
mlx_lm.server --model openbmb/MiniCPM5-1B-MLX
Steps to reproduce
-
Start the server:
mlx_lm.server --model openbmb/MiniCPM5-1B-MLX
-
Connect an OpenAI-compatible agent client (pi 0.85.1) to the server.
-
Give the agent a task that requires a tool call, for example reading a file.
-
The client sends a normal OpenAI-style tools array to:
POST /v1/chat/completions
-
mlx_lm.server logs:
WARNING - Received tools but model does not supporttool calling. If you think this is an error, file an issue here: https://github.com/ml-explore/mlx-lm/issues
-
The request still returns HTTP 200, but the tool call is not handled and the agent cannot execute the requested tool.
Server log
2026-09-14 01:13:39,527 - WARNING - Received tools but model does not supporttool calling. If you think this is an error, file an issue here: https://github.com/ml-explore/mlx-lm/issues
2026-09-14 01:13:39,546 - INFO - Prompt Cache: 2 sequences, 0.08 GB
2026-09-14 01:13:39,546 - INFO - - assistant: 2 sequences, 0.08 GB
2026-09-14 01:13:39,546 - INFO - - user: 0 sequences, 0.00 GB
2026-09-14 01:13:39,546 - INFO - - system: 0 sequences, 0.00 GB
127.0.0.1 - - [14/Sep/2026 01:13:39] "POST /v1/chat/completions HTTP/1.1" 200-
2026-09-14 01:13:39,855 - INFO - Prompt processing progress: 57/59
2026-09-14 01:13:39,880 - INFO - Prompt processing progress: 58/59
2026-09-14 01:13:39,901 - INFO - Prompt processing progress: 59/59
Expected behavior
I would expect mlx_lm.server to support MiniCPM5's tool-calling format and convert the model's tool calls into standard OpenAI-compatible tool_calls responses.
In particular, MiniCPM5 uses an XML-style tool-call format. Is there currently a MiniCPM5 tool parser in MLX-LM, or is one required?
If this model or XML-style tool-call format is not intended to support tool calling through mlx_lm.server, it would also be useful to document that limitation.
Additional context
The MiniCPM5 documentation says that MiniCPM5-1B/2B emit XML-style tool calls and that a dedicated minicpm5 parser is used by other inference backends.
The MLX model itself works for normal generation with:
mlx_lm.generate --model openbmb/MiniCPM5-1B-MLX ...
So this appears specifically related to tool-call detection/parsing in mlx_lm.server, rather than basic MiniCPM5 model support.
Agent harness
I'm using:
The agent harness screenshot is attached.

Description
I'm trying to use
openbmb/MiniCPM5-1B-MLXas the backend for an agent harness using the OpenAI-compatiblemlx_lm.serverAPI.Normal text generation works, but tool calls do not work. When the agent sends tools to
/v1/chat/completions,mlx_lm.serverlogs:The model appears to generate normally, but the tools are not exposed/handled as structured OpenAI
tool_calls, so the agent cannot execute tools.Environment
openbmb/MiniCPM5-1B-MLXServer started with:
Steps to reproduce
Start the server:
mlx_lm.server --model openbmb/MiniCPM5-1B-MLX
Connect an OpenAI-compatible agent client (pi 0.85.1) to the server.
Give the agent a task that requires a tool call, for example reading a file.
The client sends a normal OpenAI-style
toolsarray to:POST /v1/chat/completions
mlx_lm.serverlogs:WARNING - Received tools but model does not supporttool calling. If you think this is an error, file an issue here: https://github.com/ml-explore/mlx-lm/issues
The request still returns HTTP 200, but the tool call is not handled and the agent cannot execute the requested tool.
Server log
Expected behavior
I would expect
mlx_lm.serverto support MiniCPM5's tool-calling format and convert the model's tool calls into standard OpenAI-compatibletool_callsresponses.In particular, MiniCPM5 uses an XML-style tool-call format. Is there currently a MiniCPM5 tool parser in MLX-LM, or is one required?
If this model or XML-style tool-call format is not intended to support tool calling through
mlx_lm.server, it would also be useful to document that limitation.Additional context
The MiniCPM5 documentation says that MiniCPM5-1B/2B emit XML-style tool calls and that a dedicated
minicpm5parser is used by other inference backends.The MLX model itself works for normal generation with:
So this appears specifically related to tool-call detection/parsing in
mlx_lm.server, rather than basic MiniCPM5 model support.Agent harness
I'm using:
The agent harness screenshot is attached.