GLM 5.3 Flash OpenCode is the cheapest serious coding-agent setup you can run right now: Z.ai's new open-weights model inside OpenCode's terminal agent, and OpenCode currently lists a free version of it. You get a model Z.ai says is approaching Claude Opus 4.8 on coding and agent work, a 1M-token context window, and an agent that reads, plans and edits your project. That's what I showed in my latest video, and it's what this page walks you through.
📺 Watch: GLM 5.3 Flash + OpenCode is ACTUALLY WILD!
🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside
Here's the short version. Install OpenCode, run /connect, pick GLM-5.3-Flash Free from the model list, and start building. The rest of this page covers what the model actually is, how to set it up properly, the agent workflows worth running, and how I run a whole Agent OS on free models.
What GLM 5.3 Flash is
GLM-5.3-Flash is the smaller, faster member of Z.ai's GLM-5.3 family. Per the Hugging Face model card, it's a mixture-of-experts model with 320B total parameters and only 18B active per token, built on a hybrid of sparse and linear attention. Z.ai calls it the first natively multimodal model in the GLM-5 series, so vision is trained in from the start rather than bolted on later. The weights are MIT licensed.
The headline claim from Z.ai: it outperforms GLM-5.2 across its benchmarks at one-tenth of GLM-5.2's price. Before the launch it was tested anonymously as "ox-alpha" on OpenCode and OpenRouter, which tells you Z.ai built it with coding agents in mind.
Here are the confirmed numbers from Z.ai's own pages.
| Spec or benchmark | GLM-5.3-Flash | Source |
|---|---|---|
| Parameters | 320B total, 18B active | Hugging Face model card |
| Context window | 1M tokens | docs.z.ai |
| Max output | 128K tokens | docs.z.ai |
| Input types | Text, image, video, file (output is text) | docs.z.ai |
| License | MIT, open weights | Hugging Face model card |
| Terminal-Bench 2.1 | 84.3 | Hugging Face model card |
| DeepSWE v1.1 | 63.4 (GLM-5.2: 46.2) | docs.z.ai |
| AutomationBench | 48.8 (GLM-5.2: 26.2) | docs.z.ai |
| Z.ai Code Bench v1.0 | 29.0 (Claude Opus 4.8: 29.5) | docs.z.ai |
| Artificial Analysis Intelligence Index v4.1.1 | 57 | docs.z.ai |
| Z.ai API price | $0.15 input, $0.03 cached, $0.50 output per 1M tokens | docs.z.ai pricing |
| Price inside OpenCode | GLM-5.3-Flash Free, free for a limited time | opencode.ai/docs/zen |
So is it free? On Z.ai's own API, no. It's cheap, but it's paid. Inside OpenCode, yes, for now. OpenCode's Zen docs list "GLM-5.3-Flash Free" with the model ID glm-5.3-flash-free, available for a limited time and only through OpenCode itself. If you want to see how it stacks up against the other cheap model everyone's talking about, I broke that down in Qwen3.8 Flash Next vs GLM 5.3 Flash.
If you'd rather have someone walk you through the whole free-model stack, it's all inside the AI Profit Boardroom: the Agent OS, a 30-day AI agent roadmap, daily tutorials as new tools drop, and 4 coaching calls a week.
Why GLM 5.3 Flash OpenCode is the pairing to use
A model on its own just answers questions. OpenCode turns it into an agent that works inside your project folder. It reads your files, runs commands, plans changes and makes edits.
Three reasons this pairing works so well.
- It's free right now. The free tier only works inside OpenCode, so OpenCode is the natural place to use it.
- The model was tuned for this. Z.ai ran its pre-release tests on OpenCode, and its strongest numbers are on terminal and agent benchmarks like Terminal-Bench 2.1.
- OpenCode lets you swap models per agent. You can run GLM 5.3 Flash for the bulk of the work and point one agent at a different model when you need it.
One thing to know: per the Z.ai docs, thinking mode can't be switched off on this model. That's good for planning and debugging, and it means answers take a little longer to start.
📺 Watch: GLM 4.7 Flash + OpenCode + Antigravity is INSANE!
How to set up GLM 5.3 Flash in OpenCode
This takes about five minutes.
- Install OpenCode. Run curl -fsSL https://opencode.ai/install | bash or, if you prefer npm, npm install -g opencode-ai.
- Open your project. cd into the project folder and type opencode.
- Connect a provider. Run /connect and pick the OpenCode provider. Per the docs, you sign in to the OpenCode console and paste your API key.
- Pick the model. Run /models and choose GLM-5.3-Flash Free. In your config, OpenCode models use the opencode/ prefix plus the model ID.
- Create your project memory. Run /init. OpenCode scans the project and writes an AGENTS.md file in the root. Commit it so the agent remembers your structure and patterns every session.
Want to pay Z.ai directly instead, or already have the GLM Coding Plan? Create a key at z.ai/manage-apikey/apikey-list, run /connect, search for Z.AI (or Z.AI Coding Plan if you subscribe), paste the key, then pick the model with /models. OpenCode stores the key in ~/.local/share/opencode/auth.json. Z.ai says the Coding Plan gives 3x the quota of GLM-5.3, and off-peak calls, including all weekend, use half the points.
If you don't want to use free models at all, set OPENCODE_DISABLE_FREE_MODELS=1 and they disappear from the list.
Stuck on setup or not sure which provider fits your business? Book a free AI strategy session and we'll map it out with you.
📺 Watch: Google Gemini Flash + OpenCode is INSANE! 🤯
Agent workflows worth running
OpenCode ships with two primary agents. Press Tab to switch between them.
- Plan analyses and suggests. It can't edit most files, so it's safe for thinking through a feature.
- Build has all tools on and makes the changes.
There are also two built-in subagents. General handles multi-step research and can run several jobs in parallel. Explore is a fast, read-only agent for finding files and searching code. Call them directly by typing @general or @explore.
Workflow 1: plan, then build
Start in Plan. Describe the feature in plain English. Let GLM 5.3 Flash map out the files and steps. When the plan looks right, press Tab, switch to Build, and tell it to go. If it gets something wrong, /undo reverts the last change and gives you your message back so you can fix the prompt. /redo puts it back.
Workflow 2: big-repo understanding
The 1M-token context window is the reason to use this model on large codebases. Ask @explore to find every file touching a feature, then ask Build to refactor across all of them in one pass.
Workflow 3: screenshot to fix
Because the model takes images, you can hand it a screenshot of a broken page and ask it to find and fix the bug in the code.
Workflow 4: custom agents
Run opencode agent create, or drop a markdown file into .opencode/agents/ in your project. The filename becomes the agent's name and you set its model in the frontmatter using provider/model-id. Make a "writer" agent, a "reviewer" agent, a "deploy checker" agent. Each one gets its own job and its own model.
I do the same thing with other cheap models too. Here's my walkthrough of DeepSeek V4.1 Flash OpenCode, which is also on OpenCode's free list.
Running an Agent OS on free models
This is the part of the video people messaged me about most. I don't run one model. I run a whole Agent OS: multiple models, one workspace.
Inside it I run Hermes daily with a profile per model. Hermes Oracle handles SEO research and publishing. Hermes Muse comes up with content ideas. Together they form a full AI SEO automation pipeline, from research to idea to published page.
The glue is shared memory with Obsidian. Every agent reads from and writes to the same Obsidian vault, so research one agent does on Monday is there for another agent on Tuesday. No copy-pasting between tools. I've written up exactly how that connection works in Hermes Obsidian.
Then you plug in free models. GLM 5.3 Flash handles the coding and agent-heavy jobs through OpenCode. Other free models handle the lighter jobs. The result is an entire Agent OS that runs on free AI models, and because everything shares one memory, swapping a model doesn't break the system.
If you want the full layout, start with my Agent OS guide. If you want to see how I score models before putting them in the stack, that's what Goldie Bench is for.
The complete Agent OS setup, the free model stack and the GLM 5.3 Flash + OpenCode masterclass are all inside the AI Profit Boardroom for $69/mo, alongside 3,400+ members building the same thing. Want help deciding what to automate first? Grab a free AI strategy session.
Limits to know
- The free tier is temporary. OpenCode says free models are available for a limited time. Build your setup so you can switch to the paid glm-5.3-flash ID, or to Z.ai directly, without rewriting anything.
- Free only works in OpenCode. The free version can't be called from other clients. For Hermes or anything outside OpenCode, you need a paid API key.
- Thinking is always on. Great for hard tasks, slower for quick one-liners.
- It's close to Opus, not ahead of it. Z.ai's own Code Bench puts it at 29.0 versus 29.5 for Claude Opus 4.8. Keep a stronger model on hand for your most critical work.
- Running it locally needs real hardware. The weights are open and the model card gives vLLM and SGLang commands, but 320B total parameters is not a laptop model.
FAQ
Is GLM 5.3 Flash free in OpenCode?
Yes, for now. OpenCode lists GLM-5.3-Flash Free (glm-5.3-flash-free) as free for a limited time, usable only inside OpenCode. On Z.ai's API it costs $0.15 per 1M input tokens and $0.50 per 1M output tokens.
How big is the GLM 5.3 Flash context window?
Z.ai's docs list a 1M-token context window and up to 128K output tokens.
Can I use my GLM Coding Plan with OpenCode?
Yes. Run /connect, search for Z.AI Coding Plan, paste your Z.ai API key, then pick the model with /models.
Is GLM 5.3 Flash open source?
The weights are on Hugging Face under the MIT license, with deployment commands for vLLM, SGLang and Transformers.
Want this whole GLM 5.3 Flash OpenCode stack running in your business without the trial and error? Book a free AI strategy session and we'll plan it with you.











