Chuyển đến nội dung
Skillpedia
Agent84k · #1417

config-codex-cli

Skill này làm gì

Skill này là hướng dẫn từng bước để kết nối công cụ dòng lệnh Codex với OmniRoute. Skill dành cho lập trình viên muốn Codex gửi yêu cầu qua OmniRoute trên một hệ điều hành phổ biến.

Khi nào nên dùng

  • ✓Khi người dùng muốn dùng Codex CLI với OmniRoute làm backend.
  • ✓Khi người dùng cần thiết lập Codex trên Windows, macOS hoặc Linux.
  • ✓Khi người dùng dự định chạy các phiên Codex dài, kéo dài nhiều giờ và muốn chúng ổn định.

Liên kết skill

https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/config-codex-cli/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/config-codex-cli/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thiết lập Codex CLI trên máy tính của tôi để nó dùng OmniRoute.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill kiểm tra hệ điều hành và shell, viết file cấu hình Codex với nhiều hồ sơ được đặt tên, thiết lập các biến môi trường cần thiết, rồi kiểm tra lại cài đặt.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

<!-- 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

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:
STREAM_IDLE_TIMEOUT_MS=0
FETCH_BODY_TIMEOUT_MS=0
  1. 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 -->
Câu hỏi thường gặp

Thiết lập tạo ra những gì?

Nó tạo file config.toml với bảy hồ sơ được đặt tên và thiết lập các biến môi trường mà Codex cần.

Skill có kiểm tra kết quả không?

Có. Skill kết thúc bằng bước kiểm tra lại cài đặt.

Còn các phiên lập trình dài thì sao?

Skill lưu ý rằng session affinity mặc định là tắt, và nên đặt thời gian lớn hơn độ dài tác vụ dự kiến nếu chạy phiên dài.

Chi tiết

Mô tả gốc của tác giả

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.

repo: cheaper-inference/OmniRoute

Độ phổ biến

Sao GitHub
84k
Vị trí xếp hạng
#1417
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự