Skip to main content
View source

GLM (Z.ai)

View as Markdown

A RocketRide LLM node that connects Zhipu AI's GLM family of open-weight hybrid-reasoning models to a pipeline through the OpenAI-compatible Z.ai cloud API or a self-hosted vLLM or SGLang deployment.

About Zhipu AI GLM​

GLM is Zhipu AI's family of open-weight models, served through the OpenAI-compatible Z.ai cloud API (z.ai). The international cloud endpoint is https://api.z.ai/api/paas/v4 and the mainland China endpoint is https://open.bigmodel.cn/api/paas/v4. GLM weights are openly published on Hugging Face under MIT-style licenses (zai-org/GLM-5.2, zai-org/GLM-4.5-Air, and so on), so the same models can be served locally.

What it does​

Provides chat completion using GLM models as an llm-class invoke filter. It can be wired directly via lanes or consumed by any agent or node that needs an LLM backend.

The GLM-4.5 through GLM-5 generations are hybrid-reasoning MoE models with thinking and non-thinking modes and strong agentic and coding performance. The vision variants (GLM-4V and GLM-4.5V), embedding, CogView (image), CogVideoX (video), rerank, and audio lines are out of scope for this chat node.

Lanes​

Lane inLane outDescription
questionsanswersSend a question directly, receive a generated answer

Profiles​

Default: GLM-5.2 (glm-5-2). The profile set matches the live Z.ai /models catalog (verified 2026-08).

ProfileModelContextOutputNotes
GLM-5.2 (default)glm-5.21,000,00032,768Frontier long-context reasoning and coding
GLM-5.1glm-5.1204,80032,768Previous flagship
GLM-5glm-5204,80032,768First GLM-5 generation
GLM-5 Turboglm-5-turbo204,80032,768Fast cost-effective tier
GLM-4.7glm-4.7204,80032,768Enhanced-reasoning 4.x flagship
GLM-4.6glm-4.6204,80032,768Open-weight 4.x flagship
View 3 more models
ProfileModelContextOutputNotes
GLM-4.5glm-4.5131,07232,768Open-weight
GLM-4.5 Airglm-4.5-air131,07232,768Open-weight, efficient cost/quality balance
custom(user-specified)131,0728,192Any model on an OpenAI-compatible endpoint

Configuration​

Choose a model profile. The profile supplies the model identifier and context window, so a cloud pipeline needs no additional model settings. Budget generous output tokens for reasoning-heavy prompts.

To use a self-hosted vLLM or SGLang deployment, select the Custom Model profile and point its server base URL at your OpenAI-compatible endpoint. Its output limit starts at 8,192 tokens and can be changed there. The API key may be left empty there: the node passes a dummy token, and local servers accept any value.

Authentication​

Cloud profiles require a Z.ai or Zhipu AI API key in apikey. The key requirement is enforced by base-URL match: if serverbase contains api.z.ai or bigmodel.cn and no key is set, the node raises GLM API key is required for cloud profiles. at startup. Key format is not validated beyond presence.

Notes​

Reasoning output​

GLM-4.5+ models are reasoning models. The Z.ai cloud returns reasoning in a separate reasoning_content field, and for endpoints that inline <think>...</think> blocks in content the engine's shared LangChain adapter strips them and routes the reasoning to the thinking lane, so the node needs no stripping of its own.

Model sync​

Profiles are maintained by the sync_models tooling (llm_glm provider, ROCKETRIDE_GLM_KEY). The include filter keeps only the glm-* text chat models; vision (4V and 4.5V), embedding, rerank, audio, and reward variants are excluded, because they belong in dedicated nodes.

Upstream docs​

Schema​

FieldTypeDescriptionDefault
glm.profilestringModel
Zhipu AI GLM LLM model
"glm-5-2"
glm.serverbasestringServer base URL
OpenAI-compatible base URL for the GLM endpoint (e.g. https://api.z.ai/api/paas/v4 for the Z.ai cloud API, http://localhost:8000/v1 for a self-hosted vLLM / SGLang server).
"https://api.z.ai/api/paas/v4"
modelstringModel
Zhipu AI GLM model
modelOutputTokensintegerOutput Tokens
Most tokens the model may write in one reply (at least 1,024). Leave it empty to keep the node's default. Reasoning models count their thinking against this limit: set it well above the reply you expect, or they can spend it all thinking and return nothing. It cannot exceed Tokens; a larger value is lowered to it.
modelTotalTokensnumberTokens
Total Tokens

Dependencies​

  • openai
  • langchain-openai
  • langchain-core
  • langchain