zai-org / zai-org/feedback

[Bug] @z_ai/mcp-server 0.1.5 静默更换默认视觉模型为 glm-5.3-flash,导致 vision 工具频繁超时

Open
#684 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

环境

  • @z_ai/mcp-server 0.1.5(npm latest,2026-08-27 发布),通过 npx -y @z_ai/mcp-server@latest 启动
  • Z_AI_MODE=ZHIPU,GLM Coding Plan,macOS,MCP 客户端为 ZCode

问题

升级到 0.1.5 后,视觉理解 MCP 的 8 个工具(analyze_imageanalyze_videoextract_text_from_screenshot 等)频繁超时,此前 0.1.4 下同样调用正常。

根因

0.1.4 → 0.1.5 在 build/core/environment.js getVisionConfig() 中把默认视觉模型静默更换(无 changelog、无迁移提示,第 108 行前后两个版本逐行对比):

- model: config.Z_AI_VISION_MODEL || 'glm-4.6v',
+ model: config.Z_AI_VISION_MODEL || 'glm-5.3-flash',

glm-5.3-flash 是带思考的 reasoning 模型,而该包的 vision 请求是非流式调用(build/core/chat-service.js:21 stream: false,需等待完整响应),叠加默认 maxTokens=131072temperature=0.8,单次图片分析耗时显著上升,很容易触发 MCP 客户端侧的工具调用超时。

文档缺口

视觉理解 MCP 文档 只记载了 Z_AI_API_KEYZ_AI_MODE 两个环境变量,但代码(build/core/environment.js)实际还支持以下变量,均未出现在文档中,用户无从得知可以回退模型或调整超时:

变量 默认值
Z_AI_VISION_MODEL glm-5.3-flash
Z_AI_TIMEOUT 300000 (ms)
Z_AI_RETRY_COUNT 1
Z_AI_VISION_MODEL_TEMPERATURE 0.8
Z_AI_VISION_MODEL_TOP_P 0.6
Z_AI_VISION_MODEL_MAX_TOKENS 131072
Z_AI_BASE_URL 平台默认地址

诉求

  1. 文档补全上表环境变量说明;
  2. 此类默认模型变更请在发布说明 / 文档中注明,避免静默变更;
  3. 建议默认视觉模型换回 glm-4.6v(非思考、延迟低,与视觉理解工具的交互场景更匹配),或按工具用途区分默认模型。

Workaround

启动环境变量中显式设置:Z_AI_VISION_MODEL=glm-4.6v,实测恢复正常。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing build/core/environment.js and build/core/chat-service.js, then compare the 0.1.4 and 0.1.5 behavior described in the issue. Check the linked vision MCP documentation and the project’s release-note location. Done means the supported environment variables and defaults are documented, the default-model change is explained, and the requested default behavior has a maintainer decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.