Codex CLI
Codex CLI supports custom model providers through the Responses API. A separate profile keeps Mixlayer isolated from your default Codex configuration.
Create a Mixlayer API key
Create an API key in the Mixlayer console, then export it in your shell:
See API Keys for more details on creating and managing keys.
Create a Mixlayer profile
Save the following as ~/.codex/mixlayer.config.toml:
This uses GLM 5.2, a 256K-context model suited to long-horizon coding, difficult reasoning, and tool-driven tasks. You can replace the identifier and context window with another model from the Models section.
Start Codex
Your normal ~/.codex/config.toml remains unchanged.
Verify
Inside Codex, run:
Confirm that the active model is z-ai/glm-5.2 and the model provider is mixlayer.