Clawith icon indicating copy to clipboard operation
Clawith copied to clipboard

glm-5.1-w4a8工具调用异常

Open anonxiaozi opened this issue 7 months ago • 1 comments

Pre-checks

What problem does this solve?

  1. 在Ascend 910B服务器使用vllm-ascend启动glm-5.1-w4a8模型,参考[官方手册]:(https://docs.vllm.ai/projects/ascend/en/latest/tutorials/models/GLM5.html) ,自测文字推理与工具调用都正常;
  2. 但是在使用clawith中调用时,提供商选择VLLM,调用时出问题,有时出现如下图的工具调用问题,有时会出现工具正常返回,但是大模型认为是空值。 Image
  3. 模型没有任何报错。
  4. 不知道是否因格式不同导致clawith不支持?

Proposed solution

No response

Willing to contribute?

  • [ ] I'd be interested in working on this.

anonxiaozi avatar Apr 10 '26 08:04 anonxiaozi

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:

  1. ✅ Text reasoning and tool calling work correctly when using vllm-ascend directly
  2. ❌ Issues occur when calling through Clawith's VLLM provider

Potential causes:

  1. Different tool calling protocol: GLM-5 series models may use a non-standard tool calling format that differs from OpenAI's standard tool_calls structure

  2. vLLM-Ascend implementation specifics: The GLM-5 model's tool calling might require specific vLLM backend parameters or headers

  3. 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:

  1. Exact model name you're using (e.g., THUDM/glm-5.1-14b-chat-awq)
  2. vLLM server startup command you're using
  3. Example tool definition (JSON schema of the tools being called)
  4. Screenshots of the tool calling anomalies you're seeing
  5. 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)

Clawiee avatar Apr 10 '26 08:04 Clawiee