hermes - 💡(How to fix) Fix vision_analyze tool fails with GLM (glm-4v-flash) provider: error 1210 request format mismatch

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The built-in vision_analyze tool fails when using the GLM (ZhipuAI) vision provider (glm-4v-flash) with error:

Error code: 400 - {'error': {'code': '1210', 'message': 'API 调用参数有误,请检查文档。'}}

Error Message

The built-in vision_analyze tool fails when using the GLM (ZhipuAI) vision provider (glm-4v-flash) with error: Error code: 400 - {'error': {'code': '1210', 'message': 'API 调用参数有误,请检查文档。'}}

  • Actual: Returns 400 error 1210 immediately

Root Cause

Request format mismatch between Hermes' vision_analyze tool and the GLM API. The GLM vision API accepts image data in OpenAI-compatible format with content as an array of {"type": "text/..."} and {"type": "image_url", "image_url": {"url": "data:image/...;base64,..."}} objects.

Manual curl calls with exactly this format work correctly (tested with glm-4v-flash at https://open.bigmodel.cn/api/paas/v4/).

Fix Action

Workaround

Manual curl + base64 encoding works perfectly (documented in references/glm-vision-provider.md). The GLM API key, endpoint, and model are all correct.

Code Example

Error code: 400 - {'error': {'code': '1210', 'message': 'API 调用参数有误,请检查文档。'}}

---

auxiliary:
  vision:
    provider: glm
    model: glm-4v-flash
    base_url: "https://open.bigmodel.cn/api/paas/v4/"
    api_key: "<valid-key>"
RAW_BUFFERClick to expand / collapse

Description

The built-in vision_analyze tool fails when using the GLM (ZhipuAI) vision provider (glm-4v-flash) with error:

Error code: 400 - {'error': {'code': '1210', 'message': 'API 调用参数有误,请检查文档。'}}

Root Cause

Request format mismatch between Hermes' vision_analyze tool and the GLM API. The GLM vision API accepts image data in OpenAI-compatible format with content as an array of {"type": "text/..."} and {"type": "image_url", "image_url": {"url": "data:image/...;base64,..."}} objects.

Manual curl calls with exactly this format work correctly (tested with glm-4v-flash at https://open.bigmodel.cn/api/paas/v4/).

Config Used

auxiliary:
  vision:
    provider: glm
    model: glm-4v-flash
    base_url: "https://open.bigmodel.cn/api/paas/v4/"
    api_key: "<valid-key>"

Expected vs Actual

  • Expected: vision_analyze tool sends a correctly formatted OpenAI-compatible request to GLM, returns image analysis
  • Actual: Returns 400 error 1210 immediately

Workaround

Manual curl + base64 encoding works perfectly (documented in references/glm-vision-provider.md). The GLM API key, endpoint, and model are all correct.

Environment

  • Hermes Agent latest (2026-05)
  • GLM provider: glm-4v-flash
  • Platform: CLI and WeChat gateway (same result, across multiple sessions)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix vision_analyze tool fails with GLM (glm-4v-flash) provider: error 1210 request format mismatch