selan.ai Gateway Reactor Browser

Guide · Other models in Claude Code

How do you run GLM 5.3 in Claude Code?

Point Claude Code at an endpoint that serves GLM in Anthropic's API format, then name the model. Z.ai publishes one such endpoint for its GLM Coding Plan, and OpenRouter and Ollama Cloud are two more. Through Selan, an owner connects the company's OpenRouter key or Ollama Cloud plan once. Each developer then runs selan claude --model openrouter:z-ai/glm-5.3.

/model Claude Opus Claude Sonnet GLM 5.3 gateway GLM

Why does GLM work in Claude Code at all?

Claude Code sends every request in Anthropic's Messages format. It reaches another server when ANTHROPIC_BASE_URL is set to that server's address.

Z.ai serves GLM in that same format, at https://api.z.ai/api/anthropic. OpenRouter and Ollama Cloud answer in it too.

So GLM needs no translation in the middle, unlike GPT. What it needs is the right model names, the right window and a key. How GPT differs is in running GPT in Claude Code.

How do you set up GLM in Claude Code by hand?

Z.ai's guide starts with an API key from your GLM Coding Plan page. Its npx @z_ai/coding-helper sets it up for you. By hand, it puts these in the env block of ~/.claude/settings.json:

  • the base URL above, and your Z.ai API key as ANTHROPIC_AUTH_TOKEN
  • glm-5.3[1m] as the Opus and the Sonnet model
  • glm-5.3-flash[1m] as the Haiku model
  • CLAUDE_CODE_AUTO_COMPACT_WINDOW at 1000000
  • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC at 1, and API_TIMEOUT_MS at 3000000

Without the three model lines, Z.ai maps all three to GLM-5.3-Flash. A change takes effect only in a new terminal window.

Every request in that session then goes to Z.ai. Claude models are out of reach until you change the file back.

That works for one person. On a team, it is one Z.ai key and one settings file per laptop. Why a key on every laptop is the expensive part is in keeping API keys off laptops.

Can a team share one GLM Coding Plan?

No. Z.ai's usage policy says a plan's benefits belong to its subscriber, and it prohibits account sharing and multi-user access.

The plan also works only in the tools Z.ai supports. Claude Code is one of them.

Every plan serves GLM-5.3 and GLM-5.3-Flash. A request for GLM-5.2 or GLM-5.1 is answered by GLM-5.3, and one for GLM-4.7 by GLM-5.3-Flash.

Each plan has a 5-hour and a weekly usage limit, counted in credits. Off-peak, model use costs half the credits. Peak is Monday to Friday, 14:00 to 18:00 Singapore time.

For a team that wants only GLM, Z.ai's Team Plan is the simpler answer. It has seats and roles, usage per member, a spending limit per member and one bill. Z.ai says it keeps the team's code and prompts out of model training by default.

How do you run GLM in Claude Code through Selan?

Selan does not connect a GLM Coding Plan. It reaches GLM through an OpenRouter key or an Ollama Cloud plan, which an owner connects once.

GLM 5.3 and GLM 5.3 Flash are models Selan lists at OpenRouter. An owner switches them on under Settings → Models.

Developers install the selan CLI, sign in as themselves and name the model:

selan claude --model openrouter:z-ai/glm-5.3

The part before the first colon is the provider. Everything after it is that provider's own model id, passed through as it is.

With --model, Selan tells Claude Code the model's real context window. Selan lists 1,048,576 tokens for both GLM models, so a session compacts there and not at 200K. If an owner set a lower context limit for your company, it compacts at that instead.

Both start at max effort. Selan offers low, high and max for them. If an owner has set a lower Max effort for Zhipu, they start at the highest level left under that ceiling.

To skip the flag, an owner adds GLM to Claude Code's picker under Settings → Model pickers. It then appears in /model beside the Claude models. The details are in Run any model.

Which account does a GLM turn run on?

RouteHow it billsName it as
An OpenRouter key Per token, on your OpenRouter invoice openrouter:z-ai/glm-5.3 or openrouter:z-ai/glm-5.3-flash
An Ollama Cloud plan Your Ollama plan's monthly usage, then any credits you bought ollama:glm-5.3 or ollama:glm-5.3-flash, as Ollama lists them

A GLM turn runs on the provider its name points at, and on no other.

If that account is out of quota, the request fails rather than moving to the other one.

Ollama answers only when you name one of its models. A request that names no model never lands on it. How Ollama itself runs in Claude Code is in using Ollama with Claude Code. All of this is on Providers and models. When OpenRouter alone is the simpler answer is in OpenRouter and Selan compared.

What does a team get beyond the model?

  • One usage record. GLM turns land beside Claude turns, per person and per repository. Usage per developer shows what an owner sees.
  • One spend limit. An OpenRouter turn is metered, so it counts against a member's limit. A turn on an Ollama plan does not. See spend limits.
  • No OpenRouter or Ollama key on a laptop. Keys stay on the gateway. A developer holds a Selan session you can revoke.
  • Codex on the same accounts. selan codex --model openrouter:z-ai/glm-5.3 uses the same route. See Codex.

What should you check before switching a team to GLM?

  • Images. Selan lists GLM 5.3 as text only. GLM 5.3 Flash also takes images and video.
  • Effort and spend. Both GLM models think before they answer, and Selan starts them at max. On OpenRouter, the thinking is metered too.
  • The model must be switched on. A model your company cannot use is refused before Claude Code starts, not at the first request.
Good to know: Anthropic doesn't support routing Claude Code to non-Claude models through any gateway, Selan included. A GLM session is the gateway's to answer for, not Anthropic's.

Start for free

Free for up to three seats, and the Free plan needs no card.

The short version

The manual setup is Z.ai's guide to the GLM Coding Plan in Claude Code and its switching-models page. The plan's models, limits, usage policy and Team Plan are Z.ai's own docs. The Ollama ids are Ollama's cloud model list. All were read on 7 November 2026. Anthropic's position is its gateway docs, as read on 3 November 2026. What Selan does is its model list, its CLI and its providers, Codex and getting-started docs as they stood on 7 November 2026.