GLM-5.2 in Codex
Disclosure: I build Swobu (swobuforge/swobu), the open-source local compatibility gateway used here.
I wanted to run GLM-5.2 in the actual Codex harness.
The problem is protocol compatibility: Codex speaks the Responses API, while Z.AI currently exposes different interfaces. So pointing Codex directly at Z.AI is not enough. Swobu translates between them locally.
Setup is through the terminal UI:
- Add Z.AI
- Paste your General API key
- Select
glm-5.2 - Copy the local Swobu endpoint into Codex
No hand-edited Swobu config files. No OpenRouter. No Codex fork.
Run it:
curl -fsSL https://swobu.com/install.sh | sh