Dev.to AI 🤖 Ai 👁 2 📖 8 min read

GLM-5.4 migration: three GLM-5.3 request settings that now fail with error 1210

A client built for GLM-5.3 moves to GLM-5.4 by changing model to glm-5.4, as long as it doesn't send one of three settings GLM-5.3 tolerated: thinking: {"type": "disabled"}, a reasoning_effort other than low, high or max

A client built for GLM-5.3 moves to GLM-5.4 by changing model to glm-5.4, as long as it doesn't send one of three settings GLM-5.3 tolerated: thinking: {"type": "disabled"}, a reasoning_effort other than low, high or max, or max_tokens above 131,072. In a test through AIHubMix on December 2, 2026 (one request per setting), each returned HTTP 400 with error code 1210 from GLM-5.4's Chat Completions endpoint; GLM-5.3 answered the same requests with 200. The 400 body carries the code and a generic message.

On a Python coding task, GLM-5.4 at its default effort took a median 27 seconds and $0.011 per run, against 233 seconds and $0.055 on GLM-5.3. It passed 4 of 5 runs; GLM-5.3 passed 5 of 5. Both costs use Z.ai's list prices, which are the same for the two models.

Before you start

Zhipu opened the GLM-5.4 API on December 2, 2026, for Chat Completions, Responses and Anthropic Messages clients. Its migration guide gives 1M tokens of context, up to 128K tokens of output and three effort levels: low, high and max. The default effort is max.

To follow the steps below:

  • Put an AIHubMix key in AIHUBMIX_API_KEY and use https://aihubmix.com/v1 as the base URL (quick start).
  • Have curl for the error check and the OpenAI Python SDK for the multi-turn sample.
  • Know where your code and config set thinking, reasoning_effort and max_tokens.

The rest of a typical GLM-5.3 request stays as it is: base URL, key, message format, streaming fields and the 1M context window.

Map each GLM-5.3 setting to a value GLM-5.4 accepts

Each setting below went to both models once:

Setting in the request GLM-5.3 GLM-5.4 Use instead
thinking type disabled 200 400, code 1210 effort low
reasoning_effort minimal 200 400, code 1210 low
reasoning_effort medium 200 400, code 1210 high
reasoning_effort xhigh 200 400, code 1210 max
max_tokens 131,073 200 400, code 1210 131,072 or less

One request per cell through AIHubMix Chat Completions, December 2, 2026, 05:27 to 05:28 UTC. A request with max_tokens set to 131,072 succeeded on GLM-5.4. Zhipu lists both models as always thinking, yet only GLM-5.4 rejected the disabled-thinking field.

The replacements follow the conversion table Z.ai documents for its Coding Plan, where these values are mapped for you. Through AIHubMix's glm-5.4, the old values were rejected instead. The Responses endpoint accepted the thinking field with a 200; the other settings weren't sent there.

Reproduce error 1210, then fix it

This request keeps the disabled-thinking field from a GLM-5.3 client:

curl -s https://aihubmix.com/v1/chat/completions \
  -H "Authorization: Bearer $AIHUBMIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "glm-5.4", "thinking": {"type": "disabled"},
       "messages": [{"role": "user", "content": "Reply with OK."}]}'

Expect HTTP 400 with "code": "1210". On Chat Completions, the message in the body doesn't name the setting:

{"error": {"message": "For unknown errors, please submit a request at https://console.aihubmix.com/support?category=billing or email [email protected] (tid: …)", "type": "", "param": "", "code": "1210"}}

For the same thinking setting, the Anthropic Messages endpoint returned the upstream reason: [1210][This model always thinks and does not support turning off thinking; please use low, high, or max.]. Zhipu's error code table defines 1210 as invalid API call parameters.

To fix the request, replace the thinking object with "reasoning_effort": "low". In our test, that request returned 200.

Pass reasoning_content back between turns

From GLM-5.4 on, Zhipu's standard API keeps earlier reasoning by default (thinking.clear_thinking now defaults to false). Its thinking guide asks clients to return the complete, unmodified reasoning content, and warns that reordered or edited reasoning lowers quality and cache hits. Agents and long coding sessions should store each reply's reasoning_content and send it back unchanged.

With the OpenAI Python SDK, the field arrives as an extra attribute on the message:

import os
from openai import OpenAI

client = OpenAI(base_url="https://aihubmix.com/v1", api_key=os.environ["AIHUBMIX_API_KEY"])
messages = [{"role": "user", "content": "Name one Python built-in that returns an iterator. One word."}]

reply = client.chat.completions.create(
    model="glm-5.4",          # was "glm-5.3"
    reasoning_effort="high",  # only "low", "high" or "max" (default)
    max_tokens=8192,          # 131072 at most
    messages=messages,
)
msg = reply.choices[0].message
reasoning = (msg.model_extra or {}).get("reasoning_content")

# Send the reasoning back unchanged on the next turn.
messages.append({"role": "assistant", "content": msg.content, "reasoning_content": reasoning})
messages.append({"role": "user", "content": "Name another one. One word."})
reply = client.chat.completions.create(model="glm-5.4", reasoning_effort="high", max_tokens=8192, messages=messages)
print(reply.choices[0].message.content)

Both requests succeeded when this code ran through AIHubMix on December 2, 2026.

Reasoning you send back counts as input tokens. In a two-turn test with a 1,307-token prompt, GLM-5.4 produced 166 reasoning tokens in turn one. Turn two then counted these input tokens:

Turn two request Input tokens
GLM-5.4, reasoning sent back 1,543
GLM-5.4, reasoning left out 1,377
GLM-5.3, reasoning sent back 1,549
GLM-5.3, reasoning left out 1,381
GLM-5.4, clear_thinking true, reasoning sent back 1,543

In our test on AIHubMix, what changed the input count was whether the client sent the field, not the clear_thinking default.

Time and cost on one coding task

The task asked for a Python function, parse_duration, that turns strings such as 1h30m or 2d 4h into seconds and raises ValueError on bad input. A run passed only if the returned code cleared all 16 checks:

  • Valid: 1h30m, 1h 30m, 2d 4h, 45s, " 1d ", 0s, 1d2h3m4s, 10m 0s.
  • Invalid: an empty string, spaces only, 30m1h, 1h1h, 05m, 1H, 1h 30m (two spaces), 1.5h.

Each setup ran five times with the same 313-token prompt and no sampling parameters, on December 2 between 05:28 and 05:45 UTC. Costs use Z.ai's list prices, checked at 05:58 UTC the same day and identical for both models: $1.40 per million input tokens, $0.26 per million cached input tokens and $4.40 per million output tokens. BigModel lists ¥8, ¥2 and ¥28.

Model and effort Passed Median time Median output tokens Median cost
GLM-5.3, default 5 of 5 233 s 12,496 $0.0554
GLM-5.4, default 4 of 5 27 s 2,501 $0.0114
GLM-5.4, low 4 of 5 5 s 318 $0.0018

Output tokens include reasoning, and runs of the three setups overlapped in time. GLM-5.3 responses reported the model version glm-5-3-260814; GLM-5.4 responses reported glm-5.4. GLM-5.3's output ranged from 3,706 to 18,421 tokens per run, and GLM-5.4's at its default from 1,864 to 3,390.

At those medians, 1,000 runs of this task would cost about $55 on GLM-5.3, $11 on GLM-5.4 at its default effort and under $2 at low. For short, high-volume calls, send reasoning_effort: "low". For harder coding or agent steps, keep the default and keep running the code's tests.

Confirm the migration worked

  1. Search your code and config for disabled thinking, effort names other than low, high and max, and max_tokens above 131,072.
  2. Send one request with your real settings. Expect HTTP 200 and glm-5.4 as the returned model.
  3. In a multi-turn conversation, log reasoning_content and confirm the next request carries it unchanged.
  4. Run five to ten of your own tasks at the effort you plan to use, and compare the pass rate, output tokens and time with GLM-5.3.
  5. After a day of traffic, check reasoning_tokens per call and whether cached_tokens is ever above zero.

Failure modes and fixes

HTTP 400 with code 1210 right after the model switch

In the test, code 1210 came from disabled thinking, unsupported effort names and max_tokens above 131,072. Swap in the value from the mapping table. If a tool you can't edit sends the setting, it will get HTTP 400 until you can change what it sends, so keep that tool on GLM-5.3 for now.

coding-glm-5.4 answers "cannot be served at the moment"

coding-glm-5.4 lists $0.12 per million input tokens and $0.44 per million output tokens on AIHubMix, far below Zhipu's own rates. With our test key, all three endpoints answered "cannot be served at the moment" at 05:27 UTC, and Chat Completions returned the code no_available_channel again at 05:28 UTC. Send it one request before routing traffic to it, and use glm-5.4 for production traffic.

A reply whose code fails its tests

Both GLM-5.4 failures on the coding task were ordinary bugs. At the default effort, one reply defined _SEGMENT and then referred to _SEG, so the code didn't import. At low, one reply rejected 1h30m and 1d2h3m4s, two valid inputs. Only the tests tell you whether a reply is right, so keep running them on every reply.

Input tokens grow with every turn

Each reasoning_content you return adds its tokens to the input of every later turn. Setting clear_thinking to true didn't lower the count in the two-turn test; leaving the field out did. Zhipu recommends sending it back, so budget for the growth.

Usage never shows cached tokens

No response in our test session reported cached tokens, including two identical 1,298-token requests sent 8 seconds apart. Budget at the uncached rate until your own usage data shows cached_tokens above zero.

What these tests don't show

  • Five runs of one task can't rank the models in general. GLM-5.4 failed one run in five at both efforts and GLM-5.3 failed none, so if every run has to pass without a retry, test your own task before switching. The runs do show that the effort setting, and how long a model chooses to think, can change time and cost several times over.
  • A one-line prompt returned 200 on all three AIHubMix endpoints: /v1/chat/completions, /v1/responses and /v1/messages. Claude Code talks to the Messages endpoint and Codex to the Responses endpoint, but neither tool was run.
  • Image input rests on one test. A base64 screenshot sent to glm-5.4 as image_url came back with the correct order reference, TXA-B4M. AIHubMix's model guide lists text, image, video and document input, and its parameter schema lists vision for glm-5.4.
  • Zhipu hasn't published GLM-5.4 weights. Its Hugging Face organisation had no public GLM-5.4 weights at 05:56 UTC on December 2, so teams that self-host GLM-5.3 should wait.

Keep reading: the GLM-5.4 series

Sources

  1. BigModel release notes: the GLM-5.4 API entry dated December 2, 2026.
  2. GLM-5.4 model page and migration guide: limits, defaults and recommended settings.
  3. Thinking modes and error codes: always-on thinking, preserved reasoning and code 1210.
  4. Z.ai pricing, BigModel pricing and Z.ai's Coding Plan effort table: rates checked December 2, 2026 at 05:58 UTC.
  5. GLM 5.4 on AIHubMix: the model ID tested on December 2, 2026, between 05:27 and 05:57 UTC.
📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.