config-codex-cli — скилл для Codex: настройка OmniRoute
Автоматическая настройка OpenAI Codex CLI для работы с OmniRoute на любой ОС. Скилл определяет систему и оболочку, пишет конфиг, создаёт 7 профилей и проверяет подключение.
npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a claude-codeЧто делает config-codex-cli
Скилл автоматизирует подготовку Codex CLI к использованию OmniRoute как OpenAI-совместимого бэкенда. Он определяет операционную систему (Linux, macOS, Windows) и командную оболочку, затем генерирует config.toml с 7 именованными профилями, устанавливает переменные окружения и проверяет, что всё работает.
Для многочасовых сессий важно учитывать два параметра OmniRoute. По умолчанию affinity TTL отключен (0), что может разорвать continuity при переходах между аккаунтами. Для длительных задач установите sessionAffinityTtlMs выше ожидаемого времени работы (например, 43200 мс для 12 часов). Также проверьте STREAM_IDLE_TIMEOUT_MS — если он меньше 10 минут, тихие reasoning-туры могут быть прерваны таймаутом.
Шаг за шагом скилл пишет конфиг в стандартное место, проверяет синтаксис и сообщает о готовности.
Какие задачи решает
- установить Codex CLI с поддержкой OmniRoute на машину с любой ОС
- создать несколько именованных профилей для разных моделей и настроек
- настроить переменные окружения для длительных сессий без разрыва
- проверить, что подключение к OmniRoute работает корректно
Примеры запросов агенту
- Настрой Codex CLI для работы с OmniRoute
- Создай конфигурацию Codex с 7 профилями для OmniRoute
- Проверь, что Codex подключается к OmniRoute правильно
Как установить config-codex-cli
1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a claude-code2Вручную: положить файлы
~/.claude/skills/config-codex-cli/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/config-codex-cli/
1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a codex2Вручную: положить файлы
.agents/skills/config-codex-cli/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a cursor2Вручную: положить файлы
.cursor/skills/config-codex-cli/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install cheaper-inference/OmniRoute config-codex-cli2Вручную: положить файлы
.github/skills/config-codex-cli/SKILL.md1Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a gemini-cli2Командой платформы
gemini skills install https://github.com/cheaper-inference/OmniRoute --path skills/config-codex-cliВручную: положить файлы
.devin/skills/config-codex-cli/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора34
Весь набор →Похожие
Вопросы о config-codex-cli
Как установить config-codex-cli в Codex?
Запусти npx skills add cheaper-inference/OmniRoute --skill config-codex-cli -a codex, затем скилл будет доступен в .agents/skills/config-codex-cli/SKILL.md.
Что делает config-codex-cli?
Скилл автоматически настраивает OpenAI Codex CLI на работу с OmniRoute. Он определяет ОС и оболочку, создаёт конфиг с профилями, устанавливает переменные окружения и проверяет подключение.
Почему многочасовые сессии могут прерваться?
По умолчанию OmniRoute отключает session affinity и устанавливает idle timeout в 10 минут. Для длительной работы увеличьте sessionAffinityTtlMs выше ожидаемого времени задачи и установите STREAM_IDLE_TIMEOUT_MS=0.
Исходный текст
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