Of the GLM family, GLM-4.5-Air is the one you can realistically run yourself — it’s the lightweight member, small enough to fit consumer hardware where the larger GLM-5 models won’t. Run it locally with Ollama on WSL and you get a private, zero-cost GLM you can wire into a coding agent. It’s a niche but useful setup for privacy-focused or offline work.
This covers the local run on WSL and connecting it to an agent. For the far more capable hosted option, see GLM Coding Plan setup.
Why GLM-4.5-Air for local
Step 1: Ollama on WSL
If WSL isn’t installed, start with the WSL install guide. Install Ollama inside WSL (or use native Windows Ollama). It serves models on a local OpenAI-compatible endpoint at http://localhost:11434/v1.
Step 2: Get GLM-4.5-Air into Ollama
Check Ollama’s model library for a GLM-4.5-Air build. If one is listed:
ollama pull glm-4.5-air
If it isn’t in the library, you can import a compatible GGUF build via a Modelfile per Ollama’s docs. Confirm the model name you end up with, as you’ll need it for the agent config.
Step 3: Test it
ollama run glm-4.5-air
Give it a small coding question to confirm it loads and responds at a usable speed.
Step 4: Connect a coding agent
Claude Code via Claude Code Router:
{
"Providers": [
{
"name": "ollama",
"api_base_url": "http://localhost:11434/v1/chat/completions",
"api_key": "ollama",
"models": ["glm-4.5-air"]
}
],
"Router": { "default": "ollama,glm-4.5-air" }
}
Then ccr code.
Cline (VS Code): set the OpenAI Compatible provider’s Base URL to http://localhost:11434/v1 and the model to glm-4.5-air — see GLM + Cline for the general flow.
The honest trade-offs
Local GLM-4.5-Air vs hosted GLM
| Cost | Local: free to run · Hosted: $18/mo plan |
|---|---|
| Privacy | Local: fully private · Hosted: sent to Z.AI |
| Capability | Local Air: light · Hosted GLM-5/Turbo: much stronger |
| Setup | Local: more effort · Hosted: two env vars |
Air is a lightweight model, so local quality is well below the hosted GLM-5/Turbo on the plan. This setup is about privacy and zero cost, not capability. For real coding power at low cost, the GLM Coding Plan is hard to beat at $18/month.
Troubleshooting
- Model not found in Ollama — it may not be in the library; import a GGUF via a Modelfile.
- Slow / won’t load — pick a smaller quantization or free up RAM/VRAM.
- Agent can’t connect — Ollama not running, or wrong port/URL.
- Weak results — expected for a light local model; use the hosted plan for hard tasks.
Local GLM-4.5-Air checklist
- Ollama installed (WSL or native)
- GLM-4.5-Air pulled or imported as GGUF
- A quantization that fits your hardware
- Agent connected to localhost:11434/v1
- Hard tasks reserved for the hosted GLM plan
Wrapping up
GLM-4.5-Air is the GLM you can actually self-host: run it locally with Ollama on WSL, expose its OpenAI-compatible endpoint, and connect Claude Code (via the router) or Cline. It’s private and free to run, with the honest caveat that a lightweight local model is far less capable than the hosted GLM-5/Turbo — so keep the $18 plan for serious work and use Air locally for privacy.
For other local routes, see DeepSeek locally with Ollama and Qwen3-Coder locally with LM Studio.