Coding tools

Codex

OpenAI’s coding agent, in the terminal or in VS Code, with any Unaligned model.

Codex speaks OpenAI’s Responses API, which Unaligned serves at https://api.unaligned.pw/openai/v1/responses. Every model works through it, not only GPT ones.

Setup

Add Unaligned as a provider in ~/.codex/config.toml, and make it the default:

model = "glm-5.3"
model_provider = "unaligned"
# The model's "context" from the model list; Codex assumes 272,000 otherwise.
model_context_window = 1000000

[model_providers.unaligned]
name = "Unaligned"
base_url = "https://api.unaligned.pw/openai/v1"
env_key = "UNALIGNED_KEY"
  • env_key names the environment variable holding your key; Codex sends it as Authorization: Bearer.
  • wire_api can be left out: "responses" is the default, and the only value current Codex accepts.
  • The Codex IDE extension (VS Code, Cursor, Windsurf) reads the same file: set it up once for both.

Several models

Switch with /model during a session, or codex -m kimi-k3 at start. To keep ready-made setups, write a profile per model: since Codex 0.134, a profile is its own file, ~/.codex/<name>.config.toml.

model = "claude-sonnet-5-5"
model_provider = "unaligned"
model_context_window = 1000000

Good to know

  • Codex’s instructions are written for OpenAI models; others follow them well, with occasional differences in style.
  • When the model reasons, Codex shows its reasoning as a summary, as with OpenAI models.
  • Codex’s web search runs at OpenAI: it isn’t available with a custom provider.
  • Nothing is stored between requests: Codex sends the whole conversation each turn, which is what it does by default anyway (store: false).