Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

config-codex-cli — Codex skill: set up OmniRoute

Automate OpenAI Codex CLI setup to work with OmniRoute on any OS. The skill detects your system and shell, writes config, creates 7 profiles, and verifies the connection.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a claude-code
Open on GitHub

What config-codex-cli does

This skill automates Codex CLI preparation to use OmniRoute as an OpenAI-compatible backend. It detects your operating system (Linux, macOS, Windows) and shell, generates config.toml with 7 named profiles, sets environment variables, and verifies the setup works.

For multi-hour sessions, two OmniRoute defaults matter. Session affinity is off by default (TTL = 0), which can break continuity when requests land on different accounts. For long tasks, set sessionAffinityTtlMs above your expected runtime—for example, 43200 ms for ~12 hours. Also check STREAM_IDLE_TIMEOUT_MS: if it's under 10 minutes, quiet reasoning turns can be force-closed when no upstream data arrives.

The skill writes config to the standard location, validates syntax, and reports readiness.

What it helps with

  • install Codex CLI with OmniRoute support on any OS
  • create multiple named profiles for different models and settings
  • configure environment for long-running sessions without interruption
  • verify that Codex connects to OmniRoute correctly

Example prompts for the agent

  • Set up Codex CLI to work with OmniRoute
  • Create a Codex configuration with 7 OmniRoute profiles
  • Check that Codex connects to OmniRoute properly

How to install config-codex-cli

1Skills CLI (Vercel)

npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a claude-code

2Manually: put the files in place

~/.claude/skills/config-codex-cli/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/config-codex-cli/

From the same set34

The whole set →
cli-setup cheaper-inference Helps the agent configure OmniRoute, manage autostart, apply CLI updates, and adjust session environment variables. Claude Code CX Codex Cursor +1 1,200installs omni-combos-routing cheaper-inference This skill creates and manages model routing combos with fallback chains, tests, and metrics. Use it when OmniRoute needs configurable provider routing. Claude Code CX Codex Cursor +1 1,200installs omni-inference cheaper-inference Connects OpenAI-compatible inference endpoints for chat, embeddings, audio, and images. Useful for AI agents calling OmniRoute endpoints. Claude Code CX Codex Cursor +1 1,100installs cli-providers cheaper-inference Manage OmniRoute provider connections from the CLI: inspect the catalog, test connections, rotate keys, and view metrics. Useful when provider setup is part of your terminal workflow. Claude Code CX Codex Cursor +1 1,100installs omni-auth cheaper-inference Manage API keys and sessions in OmniRoute. Authenticates requests via Bearer tokens, handles dashboard login with password or OIDC, and controls session access. Claude Code CX Codex Cursor +1 1,100installs cli-routing cheaper-inference Manage model routing combos from the command line with omniroute. Test routing strategies, inspect metrics, and configure fallback chains interactively. Claude Code CX Codex Cursor +1 1,100installs omni-mcp cheaper-inference Connects an agent to the OmniRoute MCP server for request routing, memory, cache, and audit work. Use it when those operations need to be available as MCP tools. Claude Code CX Codex Cursor +1 1,100installs omni-providers cheaper-inference Manages connections to 375 AI providers via REST API: adds keys, tests connections, syncs models. Claude Code CX Codex Cursor +1 1,100installs

Similar

kr-whois-lookup NomaDamas Queries public registration data for .kr domains, IP addresses, and AS numbers via k-skill-proxy. Read-only tool for coding agents. Claude Code CX Codex Cursor +1 4,200installs apple-notes Hermes Agent Lets a coding agent read, search and write Apple Notes from the terminal through the memo CLI, with everything syncing over iCloud. Claude Code CX Codex Cursor +1 381installs gif-search Hermes Agent Searches and downloads GIFs directly through the Tenor API using curl and jq. Useful when your agent needs reaction media or quick links for chat. Claude Code CX Codex Cursor +1 379installs superdesign superdesigndev Create and refine interfaces, presentations, and graphics on the Superdesign canvas. Useful for drafting new layouts or comparing results from different models. Claude Code CX Codex Cursor +1 11,200installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs writing-plans Jesse Vincent This skill turns requirements for a multi-step task into an implementation plan before code changes begin. It helps when another engineer needs exact files, interfaces, and checks. Claude Code CX Codex 282,859installs caveman-review JuliusBrussee Turns code review comments into one line per finding: location, problem, fix. Useful when a diff or PR needs a fast pass without the filler. Claude Code CX Codex Cursor +1 410,700installs

Questions about config-codex-cli

How do I install config-codex-cli in Codex?

Run npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a codex. The skill will be available at .agents/skills/config-codex-cli/SKILL.md.

What does config-codex-cli do?

The skill automates setup of OpenAI Codex CLI to use OmniRoute as a backend. It detects your OS and shell, creates a config file with profiles, sets environment variables, and verifies the connection.

Why might multi-hour sessions break?

By default, OmniRoute disables session affinity and sets idle timeout to 10 minutes. For long tasks, raise sessionAffinityTtlMs above your task duration and set STREAM_IDLE_TIMEOUT_MS=0.

Source text

SKILL.md · MIT
---
name: config-codex-cli
description: Step-by-step agent workflow to configure the OpenAI Codex CLI on any machine (Linux, macOS, Windows) to use OmniRoute as an OpenAI-compatible backend. Detects OS and shell, writes config.toml and 7 named profiles, sets environment variables, and verifies the setup.
---
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

## Overview

Step-by-step agent workflow to configure the OpenAI Codex CLI on any machine (Linux, macOS, Windows) to use OmniRoute as an OpenAI-compatible backend. Detects OS and shell, writes config.toml and 7 named profiles, sets environment variables, and verifies the setup.

## Quick install

```bash
npm install -g omniroute   # or: npx omniroute
omniroute --version
```

## Subcommands

_No CLI subcommands mapped for this family yet._

<!-- skill:custom-start -->

## Long-running Codex tasks (#7287)

Two OmniRoute defaults silently break multi-hour Codex sessions. Document them whenever configuring Codex for overnight / multi-hour work. Full guide: `docs/guides/CODEX-CLI-CONFIGURATION.md` → **Long-running tasks**.

### Session affinity (default off)

- Setting: `sessionAffinityTtlMs` (ms; UI shows **Affinity TTL (seconds)** under Dashboard → Settings → Routing → Session affinity). Legacy alias: `codexSessionAffinityTtlMs`.
- Default `0` = disabled. Each turn can land on a different account and break prompt-cache / session continuity.
- Codex session keys (`x-codex-session-id`, `x-session-id`, `x-omniroute-session`, body `prompt_cache_key` / `session_id`) are only used for pinning when TTL > 0.
- Max: `86400` seconds / `86400000` ms (24h). Set TTL **above** the expected task length (e.g. `43200` s for ~12h).

### Stream idle timeout (default 10 minutes)

- Env: `STREAM_IDLE_TIMEOUT_MS` (default `600000`). Also consider `FETCH_BODY_TIMEOUT_MS` (same baseline; `0` disables).
- Synthetic SSE heartbeats do **not** reset the idle clock — only real upstream chunks do.
- A quiet reasoning turn past the idle window is force-closed (`stream_idle_timeout` / `StreamIdleTimeoutError`). Grep logs for `Idle timeout: no data from`.

### Recommended multi-hour recipe

1. Dashboard → Settings → Routing → Session affinity → Affinity TTL = `43200` (12h) or `86400` (24h max).
2. OmniRoute environment:

```bash
STREAM_IDLE_TIMEOUT_MS=0
FETCH_BODY_TIMEOUT_MS=0
```

3. Restart OmniRoute. Leave Codex `config.toml` as usual (`wire_api = "responses"`, correct `base_url`).

### Defaults decision

Do **not** flip ship defaults in code for this skill: `sessionAffinityTtlMs` stays `0` and `STREAM_IDLE_TIMEOUT_MS` stays `600000`. Long-running operators must opt in. See Discussion #5718 and issue #7287.
<!-- skill:custom-end -->

© cheaper-inference · MIT · cheaper-inference/OmniRoute

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor