Last updated

Codex GLM: Use GLM-5.3 and GLM-5.3-Flash in Codex

This guide shows you how to add GLM-5.3, GLM-5.3-Flash, GLM-5.2 and GLM-5-Turbo to the Codex model picker. The main provider paths bill separately: Ollama Cloud, the Z.ai GLM Coding Plan and the metered Z.ai platform API.

GLMGLMOllama CloudCoding Plan

What you can add

Picker labelModel IDAuthentication
GLM-5.2 (Ollama Cloud)ollama-cloud/glm-5.2Ollama Cloud API key
GLM-5.3 (Ollama Cloud)ollama-cloud/glm-5.3Ollama Cloud API key
GLM-5.3-Flash (Ollama Cloud)ollama-cloud/glm-5.3-flashOllama Cloud API key
GLM-5.3 (Coding Plan)zai-coding/glm-5.3Z.ai GLM Coding Plan API key
GLM-5.3-Flash (Coding Plan)zai-coding/glm-5.3-flashZ.ai GLM Coding Plan API key
GLM-5.2 (Coding Plan)zai-coding/glm-5.2Z.ai GLM Coding Plan API key
GLM-5-Turbo (Coding Plan)zai-coding/glm-5-turboZ.ai GLM Coding Plan API key
GLM-5.3-Flash (Z.ai API)zai-api/glm-5.3-flashMetered Z.ai platform API key
GLM-5.3 (Z.ai API)zai-api/glm-5.3Metered Z.ai platform API key
GLM-5.2 (Z.ai API)zai-api/glm-5.2Metered Z.ai platform API key
GLM-4.7 (Z.ai API)zai-api/glm-4.7Metered Z.ai platform API key

GLM models also appear through OpenCode Go, OpenRouter, Command Code, Venice and Alibaba Model Studio. Those entries coexist because each provider owns its billing and authentication. The Ollama Cloud 5.3 routes are listed candidates that still require exact-route certification; the Z.ai Coding, Z.ai API and named OpenCode/OpenRouter Flash routes have direct proof.

Choose your path

  • Ollama Cloud bills through an ollama.com account. You get an account API key, and the router reads context windows from Ollama’s published model metadata. Use this if you already use Ollama or want GLM alongside other Ollama Cloud models such as Kimi K2.7 Code, MiniMax M3 and DeepSeek V4 Pro.
  • Z.ai GLM Coding Plan uses the plan’s dedicated coding endpoint and its subscription API key. Use this if you subscribe to the GLM Coding Plan and want the plan’s quota and the zai-coding provider’s thinking behavior.
  • Z.ai API is the separately billed pay-as-you-go platform. It uses its own ZAI_PLATFORM_API_KEY; a Coding Plan key cannot authenticate it and a platform key cannot spend Coding Plan quota.

Enable Ollama Cloud

./bin/model-router codex provider-key ollama-cloud set
./bin/model-router codex providers enable ollama-cloud

The key prompt is hidden and stores the value in a protected per-user file. On Windows, use ./codex-router.ps1 codex provider-key ollama-cloud set.

Enable the Z.ai GLM Coding Plan

./bin/model-router codex provider-key zai-coding set
./bin/model-router codex providers enable zai-coding

The Z.ai coding key is not interchangeable with general Z.ai platform keys. Only the GLM Coding Plan subscription key works with the coding endpoint, and Z.ai reserves that endpoint for interactive coding tools. A general Z.ai platform key will fail authentication on this route.

Enable the metered Z.ai API

./bin/model-router codex provider-key zai-api set
./bin/model-router codex providers enable zai-api

Verify the integration

./bin/model-router codex doctor
./bin/model-router codex providers

The provider you enabled must report SHOW and ready. Then fully quit Codex, reopen it, create a new task, and check the picker for GLM-5.3. For a live, quota-consuming check:

./bin/test-model 'zai-coding/glm-5.3' --live --yes

How GLM requests behave

The zai-coding route uses the GLM Coding Plan’s dedicated endpoint and maps Codex reasoning choices onto each model’s declared effort ladder. Certified GLM-5.3-Flash routes accept only low · high · max and default to max. The suffix-free GLM-5.3 entries declare a 1M context window. GLM-5-Turbo does not advertise effort control it does not support.

GLM-5.3-Flash is the multimodal member of the family. The zai-coding/glm-5.3-flash, zai-api/glm-5.3-flash and openrouter/glm-5.3-flash routes accept text and pasted images natively, so the router sends the image straight to GLM instead of spending a second provider’s quota on Vision Bridge transcription. The suffix-free GLM-5.3 routes remain text-only and still use Vision Bridge when an image is present. After updating from an older registry, rebuild the catalog and fully quit and reopen Codex before testing image input.

Common pitfalls

  • Keys and quotas are provider-specific. Ollama Cloud, Z.ai Coding Plan, the metered Z.ai API, OpenCode Go and Alibaba Model Studio all authenticate and bill separately.
  • Unexpected Vision Bridge use on GLM-5.3-Flash usually means a stale catalog. Run ./bin/model-router codex doctor --fix, then fully quit and reopen Codex so the corrected image modality is republished.
  • Missing picker entries usually mean missing credentials. Confirm the provider reports ready, then restart Codex. See models missing from the picker.
  • Provider policy risk. Z.ai and ollama.com may restrict or block proxy traffic. Using GLM through Codex Router is at your own risk.
  • Windows users: the key commands go through ./codex-router.ps1 codex provider-key ...; the rest of the flow is identical.

Related: models overview, DeepSeek in Codex, Kimi in Codex, installation.