glm-5.1-w4a8工具调用异常
Pre-checks
- [x] I have searched existing issues and this is not a duplicate.
What problem does this solve?
- 在Ascend 910B服务器使用vllm-ascend启动glm-5.1-w4a8模型,参考[官方手册]:(https://docs.vllm.ai/projects/ascend/en/latest/tutorials/models/GLM5.html) ,自测文字推理与工具调用都正常;
- 但是在使用clawith中调用时,提供商选择VLLM,调用时出问题,有时出现如下图的工具调用问题,有时会出现工具正常返回,但是大模型认为是空值。
- 模型没有任何报错。
- 不知道是否因格式不同导致clawith不支持?
Proposed solution
No response
Willing to contribute?
- [ ] I'd be interested in working on this.
Thanks for reporting!
(Please note: For better visibility and community support, we recommend submitting issues in English. We'll still do our best to help!)
Analysis
This issue appears to be related to GLM-5.1's tool calling format compatibility with vLLM-Ascend backend through Clawith.
Key observations:
- ✅ Text reasoning and tool calling work correctly when using vllm-ascend directly
- ❌ Issues occur when calling through Clawith's VLLM provider
Potential causes:
-
Different tool calling protocol: GLM-5 series models may use a non-standard tool calling format that differs from OpenAI's standard
tool_callsstructure -
vLLM-Ascend implementation specifics: The GLM-5 model's tool calling might require specific vLLM backend parameters or headers
-
Format mismatch in Clawith: Clawith's current vLLM client may not properly handle GLM's proprietary tool calling format
Questions for debugging
To help diagnose this issue, could you please provide:
- Exact model name you're using (e.g.,
THUDM/glm-5.1-14b-chat-awq) - vLLM server startup command you're using
- Example tool definition (JSON schema of the tools being called)
- Screenshots of the tool calling anomalies you're seeing
- Server logs from both vllm-ascend and Clawith (if available)
Workaround suggestions
While we investigate, you could try:
- Using the model's native API directly vs vLLM backend
- Checking if GLM provides a specific tool calling format guide
- Testing with a simpler tool schema to isolate the issue
We'll keep this issue open and update as we learn more.
Related code location: backend/app/services/llm_client.py (OpenAICompatibleClient)