NConnect
DocsGLM 5.3 + Codex CLI

TUTORIAL

How to run GLM 5.3 with Codex CLI

Run OpenAI's Codex CLI on Z.ai's GLM 5.3, a 1M-context model for coding and tool use, served by Nebius Token Factory through NConnect. No OpenAI account needed.

GLM 5.3Codex CLI 5 minUpdated

Codex speaks the OpenAI Responses API, which Nebius does not serve. NConnect runs a local proxy that translates Codex's requests to Nebius chat completions. GLM 5.3 from Z.ai is a 1,024K-context model tuned for coding, reasoning and tool use.

Prerequisites

Steps

  1. Install NConnect

    This installs the CLI and the ncodex alias, plus Bun if needed.

    curl -fsSL https://nconnect.sh/install.sh | bash
  2. Add your Nebius API key

    nconnect configure
  3. Install Codex CLI

    Skip this if codex is already on your PATH. In an interactive terminal, NConnect also offers to run this for you the first time you launch Codex CLI.

    npm install -g @openai/codex
  4. Launch Codex CLI on GLM 5.3

    nconnect --model zai-org/GLM-5.3 codex

    Arguments after codex go to Codex, so non-interactive runs work too:

    nconnect --model zai-org/GLM-5.3 codex exec "add a test for the parser"

What NConnect does on launch

  • Registers a temporary nconnect model provider with command-line overrides. Your ~/.codex/config.toml is not modified.
  • Translates Responses API traffic to Nebius and meters every turn.
  • Backs Codex's native web_search with Tavily when you have added a Tavily key.
  • Summarizes traces for Codex's durable memory with a cheaper model (MiniMax M3 by default; change it with NCONNECT_CODEX_MEMORY_MODEL).

Start faster with --no-mcp

Codex connects to every MCP server in your config at startup, which can add seconds to a simple prompt. --no-mcp is an NConnect shortcut that skips your user config for that launch. Authentication still works.

nconnect --model zai-org/GLM-5.3 codex --no-mcp

Attaching images

GLM 5.3 is text-only. To attach screenshots, launch with a vision model such as Kimi K2.6. See Images & vision.

More tutorials