Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Description
When sending chat completion requests to glm-5.3-flash via the OpenCode Go gateway (opencode.ai/zen/go/v1), the API deterministically fails with an HTTP 400 error ([1210] API parameter invalid) whenever the request messages contain specific standard Unicode characters—most notably the multiplication sign × (U+00D7) and certain trailing quotation mark sequences like ” (U+201D).
This is not a rate-limit, context length, or token limit issue. It can be reproduced consistently with a single, minimal 1-turn text prompt.
Environment & Context
- Model:
glm-5.3-flash(via OpenCode Go / Console Go) - Endpoint:
/zen/go/v1/chat/completions - Error Response:
{ "error": { "type": "server_error", "message": "Error from provider (Console Go): Upstream request failed: [1210] API parameter invalid, please check documentation." } }
Minimal Reproducible Example (MRE)
1. Failing Request (U+00D7 Multiplication Sign)
curl -X POST https://opencode.ai/zen/go/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <OPENCODE_GO_API_KEY>" \
-d '{
"model": "glm-5.3-flash",
"messages": [
{"role": "user", "content": "Test: A \u00D7 B"}
]
}'Result: HTTP 400 / [1210] API parameter invalid
2. Working Baseline (ASCII x or Alternative Unicode ✕)
curl -X POST https://opencode.ai/zen/go/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <OPENCODE_GO_API_KEY>" \
-d '{
"model": "glm-5.3-flash",
"messages": [
{"role": "user", "content": "Test: A x B"}
]
}'Result: HTTP 200 OK
Comparative Test Matrix
Across alternating test rounds executed within the same timeframe, the outcome is 100% deterministic:
| Payload Content | Unicode Details | Upstream Status | Result |
|---|---|---|---|
"Test: A \u00D7 B" |
Multiplication sign (U+00D7) |
HTTP 400 [1210] |
❌ Deterministic Failure |
"Test: A x B" |
Standard ASCII x (U+0078) |
HTTP 200 OK | ✅ Success |
"Test: A \u2715 B" |
Multiplication X (U+2715) |
HTTP 200 OK | ✅ Success |
"Calculate: 3 \u00D7 4 = 12" |
Multiplication sign (U+00D7) |
HTTP 400 [1210] |
❌ Deterministic Failure |
"...memory" + \u201D |
Right double quotation mark (U+201D) |
HTTP 400 [1210] |
❌ Deterministic Failure |
"...memory" + \u201D + " system" |
Chinese text ending with U+201D |
HTTP 400 [1210] |
❌ Deterministic Failure |
"...memory" + \u201D + " of system" |
Token boundary shifted | HTTP 200 OK | ✅ Success |
Real-World Impact on Multi-Turn Agents
In automated multi-turn AI coding agents or chat systems:
- If any historical turn (system prompt, tool output, resolution logs like
1920×1080, or arithmetic expressions like7×24) contains the character\u00D7, the agent re-submits the entire conversation history on subsequent turns. - This causes the entire conversation session to permanently fail with
[1210], rendering the session unusable unless context compression or manual history sanitization is applied.
Suggested Remediation
- Gateway Pre-processing / Normalization:
- Sanitize or normalize incoming
messagestext on the OpenCode Go API gateway layer before forwarding to the tokenizer (e.g., auto-substitute\u00D7with standard ASCIIx).
- Sanitize or normalize incoming
- Upstream Tokenizer Fix:
- Inspect the GLM-5.3-Flash vocabulary and BPE tokenizer boundaries for
U+00D7and edge-case multi-byte quotation combinations (U+201D) to resolve the parser exception.
- Inspect the GLM-5.3-Flash vocabulary and BPE tokenizer boundaries for
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the very thorough and reproducible report, @kzeokytjvwhnrtl13otf-bit. A session that breaks for good because of a single
×in its history is a nasty failure mode.This is a problem with the OpenCode Go service (
opencode.ai/zen/go/v1) and the upstream provider, not with the OpenCode app: your plaincurlrepro shows it without any OpenCode client. Support for OpenCode Go, Zen and the Console isn't handled in GitHub issues, so please email help@anoma.ly with the details: the model (glm-5.3-flash), the endpoint, your minimal repro payloads and test matrix, and approximate timestamps of failing requests. If you've already emailed, the team will get to it, especially now that we've seen it here. Please keep API keys, account emails and other account details out of this public issue and put them only in the email.Related reports (not the same cause):
[1210]upstream error ("thinking cannot be disabled")[1210]/400 for GLM and Kimi models when tools are presentfile_data, Z.AI accepts PDF only viafile_url/file_id#49237: Z.AI[1210]for PDF attachmentsThe bot will close this issue in 1 day.
opencodejr commentedon Oct 29, 2026
Closing this now, @kzeokytjvwhnrtl13otf-bit, since problems with the OpenCode Go service are handled by email rather than in GitHub issues. Thanks again for the clear repro. If this is still happening, please email help@anoma.ly with your test matrix, payloads and approximate timestamps, and keep API keys and account details out of this public thread. If you later see a problem in the OpenCode app itself, feel free to open a new issue.