Skip to content

GLM-4.5-Air Locally on WSL With Ollama

Run GLM-4.5-Air locally on WSL with Ollama and connect it to a coding agent. Install, model pull, OpenAI-compatible endpoint, hardware needs, and the fixes.

MGMCSA Guru Team August 10, 2026 4 min read
GLM-4.5-Air running locally via Ollama on WSL on Windows

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.

Frequently asked questions

Can I run GLM-4.5-Air locally?

GLM-4.5-Air is the lightweight member of the GLM family, which makes it the most realistic GLM to self-host. If a compatible local build is available in Ollama's library (or as a GGUF you import), you can run it on WSL and connect it to a coding agent via its OpenAI-compatible endpoint.

Why GLM-4.5-Air specifically?

Because it's the smallest, lightest GLM, it's the one most likely to fit consumer hardware. The larger GLM-5 models are too big for most local machines, so Air is the practical choice for local use.

Why run it on WSL?

WSL gives the standard Linux environment Ollama and coding agents expect, and on Windows it's a clean place to run a local server. GPU passthrough to WSL works on supported setups, though native Windows Ollama is also an option.

Is local GLM as good as the hosted GLM Coding Plan?

No — a local lightweight model is less capable than the hosted GLM-5/Turbo on the plan. Local is about privacy and zero cost. For serious coding, the $18/month GLM Coding Plan is far more capable and still cheap.

How do I connect it to Claude Code?

Ollama exposes an OpenAI-compatible endpoint, so use Claude Code Router with localhost as the provider. For an editor, point Cline's OpenAI Compatible provider at the same local URL.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.