Operating System
Linux
Installation Method
Docker (ghcr.io/openhands/agent-canvas)
Agent Canvas Version
1.14.0
Bug Description
I'm using the Synthetic provider and noticed that whenever a model attempts to make a tool call, it sometimes returns the tool call as strange/raw syntax instead of actually invoking the tool.
I've observed this behavior with both:
GLM 5.2
Kimi K3
Normal text responses work correctly. The issue appears specifically when tool/function calling is involved.
Steps to Reproduce
- Use llm from synthetic provider
- Get weird syntax when tool call involved
Actual Behavior
Calling the SDK converter on main leaves the raw wrapper as text and produces no tool call:
from openhands.sdk.llm.mixins.fn_call_converter import (
convert_non_fncall_messages_to_fncall_messages,
)
tools = [{"type": "function", "function": {"name": "terminal", "parameters": {"type": "object", "properties": {"command": {"type": "string"}}}}}]
messages = [
{"role": "user", "content": "run ls"},
{"role": "assistant", "content": "<tool_call>terminal\n<parameter=command>ls</parameter>\n</tool_call>"},
]
result = convert_non_fncall_messages_to_fncall_messages(messages, tools)
# Expected: a structured tool_call for `terminal`.
# Observed on main: no tool call; raw <tool_call> syntax stays in the text.
Expected Behavior
The model should return a properly formatted tool call that the client can recognize and execute.
Relevant Logs
Acceptance Criteria
Screenshots
Additional Context
Somehow it's working fine with the free kimi k3 from openhand.
Tested with native toolcall both enabled and disabled with same issue.
API Mode is using /chat
Operating System
Linux
Installation Method
Docker (
ghcr.io/openhands/agent-canvas)Agent Canvas Version
1.14.0
Bug Description
I'm using the Synthetic provider and noticed that whenever a model attempts to make a tool call, it sometimes returns the tool call as strange/raw syntax instead of actually invoking the tool.
I've observed this behavior with both:
GLM 5.2
Kimi K3
Normal text responses work correctly. The issue appears specifically when tool/function calling is involved.
Steps to Reproduce
Actual Behavior
Calling the SDK converter on main leaves the raw wrapper as text and produces no tool call:
Expected Behavior
The model should return a properly formatted tool call that the client can recognize and execute.
Relevant Logs
Acceptance Criteria
<tool_call>-wrapped model response is converted into a structured tool call rather than leaking into the assistant text.<tool_call>is not converted into a call.Screenshots
Additional Context
Somehow it's working fine with the free kimi k3 from openhand.
Tested with native toolcall both enabled and disabled with same issue.
API Mode is using /chat