Point Codex at OpenRouter to switch between open-weight coding models with one config line
Summary OpenRouter's official Codex CLI guide adds an openrouter provider to ~/.codex/config.toml and sets the model key. Codex's official CLI reference documents -m/--model; OpenRouter's public model list includes z-ai/glm-5.3 and deepseek/deepseek-v4.1-flash (checked 2026-11-24). OpenRouter adds provider failover, budgets and usage tracking.