How to Use GLM 5.3 in OpenCode: Setup Guide

How to Use GLM 5.3 in OpenCode: Setup Guide

Use GLM 5.3 in OpenCode — configure the Z.AI devpack, set model glm-5.3, enable thinking (reasoning_effort max), and start agentic coding with the open-weights SOTA model.

How to Use GLM 5.3 in OpenCode: Setup Guide

Quick answer: GLM 5.3 works in OpenCode via Z.AI's devpack (npx @z_ai/coding-helper) — the same setup used for Claude Code, Cline, and Kilo Code. Point OpenCode at the GLM Coding Plan backend (or API), set reasoning_effort: "max", and you get the open-weights SOTA coding model (Terminal-Bench 3.0: 28.3, +50% on Z.AI Code Bench) inside your terminal.


TL;DR

StepWhat to do
1. SubscribeGLM Coding Plan (Lite/Pro/Max) or get API key
2. Install helpernpx @z_ai/coding-helper
3. ConfigureLoad plan into OpenCode
4. Set modelglm-5.3
5. Tunereasoning_effort: "max" for coding

Why GLM 5.3 in OpenCode?

OpenCode is one of the fastest-growing open-source coding agents, and GLM 5.3 is currently the strongest open-weights coding model — a natural pairing:

  • +50% coding over GLM 5.2 on Z.AI's Code Bench (34.5% at ~75K output tokens vs 23.4% at ~96K)
  • Terminal-Bench 3.0: 28.3 — open-weights SOTA (GLM 5.2: 4.6)
  • AutomationBench: 48.2 — best in Z.AI's official table
  • 1M-token context — whole repos fit in context
  • ~4× cheaper than Claude Opus 5 per token at comparable capability

Step 1: Get Access

Option A — GLM Coding Plan (recommended for agent use): Subscribe at z.ai/subscribe — Lite $18/mo, Pro $80/mo, Max $168/mo (annual −30%). All subscribers are on GLM 5.3 already. Off-peak hours (outside 14:00–18:00 UTC+8 weekdays) cost 50% of standard points.

Option B — API key: Use the glm-5.3 API ($1.40/$4.40 per 1M) once it's fully available.

Step 2: Install Z.AI's Coding Helper

npx @z_ai/coding-helper

This loads your GLM coding package into OpenCode and other supported tools (20+ including Claude Code, Cline, Kilo Code, Crush, Factory).

Step 3: Configure OpenCode

After the helper loads the provider, set the model:

{
  "model": "glm-5.3",
  "thinking": { "type": "enabled" },
  "reasoning_effort": "max"
}

Important: GLM 5.3 always has thinking enabled — reasoning_effort accepts low/high/max (default max). If your OpenCode config still sends thinking.type: "disabled" (from GLM 5.2), remove it — requests will fail otherwise.

Step 4: Start Coding

Typical OpenCode session with GLM 5.3:

opencode
# → select z-ai/glm-5.3 as the model
# → start with a repo-scale task

What to expect vs GLM 5.2:

  • Better multi-file reasoning (1M context, repo-scale)
  • Longer agent runs that stay on task (AutomationBench nearly doubled)
  • More output tokens per task (thinking is always on) — but fewer tokens per completed task than 5.2

Cost Tips for OpenCode + GLM 5.3

  1. Use off-peak hours — 50% of standard points outside 14:00–18:00 UTC+8 weekdays.
  2. Cache aggressively — long, stable system prompts hit the cached-input rate (~$0.26/1M on API; 98%+ cache hits in ZCode).
  3. Right-size effortlow for simple refactors, max for complex multi-file work.
  4. Annual billing — −30% on any Coding Plan tier.

FAQ

Can I use GLM 5.3 in OpenCode? Yes — via Z.AI's devpack (npx @z_ai/coding-helper), which supports OpenCode plus 20+ agents.

What model ID do I use in OpenCode? glm-5.3, with thinking.type: "enabled" and reasoning_effort set.

Do I need the Coding Plan for OpenCode? It's the easiest path — all Coding Plan subscribers are on GLM 5.3. The API also works once fully available.

Is GLM 5.3 good for agentic coding? Yes — Terminal-Bench 3.0 28.3 (open SOTA), AutomationBench 48.2 (best in Z.AI's table), +50% on Z.AI Code Bench.

Is GLM 5.3 free in OpenCode? No — it runs on the GLM Coding Plan (points-based, off-peak 50%) or the paid API. Open weights (free self-host) arrive in ~2 weeks.


Sources

Last updated: August 18, 2026

Start Using GLM 5 Today

Try GLM 5 free — reasoning, coding, agents, and image generation in one platform.

How to Use GLM 5.3 in OpenCode: Setup Guide - GLM 5