Repository navigation
Description
Description
On the OpenCode Zen Go Anthropic-compatible endpoint (https://opencode.ai/zen/go/v1/messages), any request with a non-empty tools array fails for all GLM models (glm-5.3, glm-5.2, glm-5.1). The same request without tools, or with the same tools against other models (kimi-k3, qwen3.7-plus), succeeds — so this looks like a broken Anthropic→GLM tools translation in the Console Go gateway, not a client or account issue.
This effectively makes GLM models unusable from Claude Code, which always sends tools.
Environment
- Endpoint:
POST https://opencode.ai/zen/go/v1/messages(Anthropic-compatible, Go plan) - Client: plain
curl(reproduces without any client), and Claude Code - Reproduced with 3 independent Go plan API keys (3 separate workspaces) — identical errors, so account-independent
- Date: 2026-08-15
Repro 1 — glm-5.3 + one minimal tool → [1210]
curl -X POST https://opencode.ai/zen/go/v1/messages \
-H "x-api-key: <REDACTED>" \
-H "anthropic-version: 2023-06-01" -H "content-type: application/json" \
-d '{
"model": "glm-5.3",
"max_tokens": 2048,
"tools": [{
"name": "get_weather",
"description": "query weather",
"input_schema": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}],
"messages": [{"role": "user", "content": [{"type": "text", "text": "What is the weather in Beijing? Please call the tool."}]}]
}'Response:
{"error":{"type":"server_error","message":"Error from provider (Console Go): Upstream request failed: [1210] Invalid API parameter, please check the documentation."}}Notes:
"tools": [](empty array) → 200 OK, so it's specifically non-emptytools.- Fails regardless of tool shape (with/without
description, with extratypefield, complex schemas).
Repro 2 — glm-5.2 / glm-5.1 + same tool → 422 with revealing param path
{"error":{"param":"tools.0.function-after[_domain_filters(), WebSearchTool].type","type":"invalid_request_error","message":"Error from provider (Console Go): Upstream request failed: [invalid_request_error] Input should be 'web_search'"}}The mangled param path tools.0.function-after[_domain_filters(), WebSearchTool].type suggests the gateway is translating ordinary Anthropic function tools into Zhipu's web_search tool format before forwarding upstream.
Control experiments (why I believe it's a gateway translation bug)
| Request | Result |
|---|---|
glm-5.3, no tools → /zen/go/v1/messages |
✅ 200 |
glm-5.3, 1 minimal tool → /zen/go/v1/messages |
❌ [1210] |
| glm-5.2 / glm-5.1, same tool → same endpoint | ❌ 422 Input should be 'web_search' |
| kimi-k3, same tool → same endpoint | ✅ 200, clean tool_use block |
| qwen3.7-plus, same tool → same endpoint | ✅ 200, clean tool_use block |
glm-5.3, same tool → /zen/go/v1/chat/completions (OpenAI endpoint) |
✅ 200, correct tool_calls with parsed arguments |
glm-5.2, same tool → Zhipu native https://open.bigmodel.cn/api/anthropic/v1/messages |
✅ 200, clean tool_use block |
So: the GLM models themselves handle tools fine (OpenAI endpoint + Zhipu native Anthropic endpoint both work), the Zen Anthropic endpoint's tool translation works fine for other vendors (kimi/qwen) — the failure is specific to the Anthropic→GLM tools translation path in the Console Go gateway.
Expected behavior
tools on the Anthropic-compatible endpoint should work for GLM models the same way it does for kimi-k3 / qwen3.7-plus on the same endpoint, and for glm-5.3 on the OpenAI endpoint.
Additional notes
- glm-5.3 appears to be newly added to the model list (around 2026-08-14).
- Side observation: on Zhipu's native Anthropic endpoint, requesting
glm-5.2now returns"model": "glm-5.3"in the response — the alias seems to have been repointed upstream. Not sure if that's related to the routing difference between the[1210](glm-5.3) and 422 (glm-5.2/5.1) errors.
Activity
github-actions commentedon Aug 14, 2026
This issue might be a duplicate of existing issues. Please check:
zen/goAnthropic endpoint, other models work fineinput_schemais present in tools on the same Anthropic route (referenced in your own bisection table)goldyard2022 commentedon Aug 14, 2026
Closing as duplicate of #34331 and #41120 — same gateway tools-translation bug class. New findings from this repro (glm-5.3
[1210], the glm-5.2/5.1 422web_searchmistranslation trace, kimi-k3 now passing, Zhipu-native control) have been posted to #41120.