🔧 Công cụ lập trình•Mã nguồn mở•Đang hoạt động

codex-shim

Local Responses API shim giúp Codex Desktop dùng model BYOK hoặc provider khác mà không cần rebuild Codex.

#codex-shim
Danh mục
🔧 Công cụ lập trình
Giá
Mã nguồn mở
GitHub Stars
⭐ 1,066
Ngôn ngữ
Python
License
MIT
Ngày thêm
2026-05-29
Tóm tắt từ README GitHub
codex-shim Run Codex Desktop against any BYOK model you can describe in , plus an optional passthrough to your ChatGPT subscription's Codex model — without rebuilding Codex. The shim is a local Python/aiohttp server that exposes an OpenAI Responses-compatible endpoint on loopback. Codex points at the shim; the shim routes each request to the matching upstream (OpenAI chat completions, Anthropic Messages, a generic OpenAI-shaped chat endpoint, or ChatGPT Codex passthrough), then translates streaming responses back into the shape Codex expects. Tested on Codex Desktop 0.133.0-alpha.1 for macOS arm64. The shim server and routing layer are plain Python/aiohttp and work on Windows, macOS, Linux, WSL, and Git Bash. The only macOS-specific piece is the optional Desktop picker ASAR patch, needed when Codex hides custom catalog entries. --- What this gives you Codex Desktop only shows models allowed by its server-side config. If you have OpenAI / Anthropic / Z.ai / DeepSeek / Gemini / OpenRouter / local proxy models you want as first-class picker entries, this wires them in locally. The practical win is that Codex keeps its native UX while model routing moves local: - B
Xem thêm từ README.md

Đánh giá chi tiết

Tổng quan

codex-shim là một server Python/aiohttp chạy local, cung cấp endpoint tương thích OpenAI Responses API để Codex Desktop có thể gọi các model BYOK hoặc upstream khác. Thay vì rebuild hoặc chỉnh sâu Codex, người dùng trỏ Codex về shim; shim sẽ route request đến OpenAI chat completions, Anthropic Messages, endpoint OpenAI-compatible, hoặc passthrough Codex model từ ChatGPT subscription rồi chuyển streaming response về dạng Codex mong đợi.

Đây là một công cụ khá “đúng ngứa” cho nhóm thích vọc coding agent: muốn giữ giao diện Codex Desktop nhưng linh hoạt model hơn, thử nhiều provider, hoặc dùng catalog model riêng. README cũng nói rõ phần server/routing chạy trên Windows, macOS, Linux, WSL và Git Bash; riêng ASAR patch cho Desktop picker là phần tùy chọn liên quan macOS.

Tính năng chính

  • Local server tương thích Responses API cho Codex Desktop.
  • Định nghĩa model trong ~/.codex-shim/models.json.
  • Route sang OpenAI, Anthropic, endpoint OpenAI-compatible hoặc ChatGPT Codex passthrough.
  • Dịch streaming response từ upstream về shape Codex cần.
  • Có phần patch tùy chọn khi Codex Desktop ẩn custom catalog entries.

Điểm mạnh

codex-shim mở khóa rất nhiều thử nghiệm model mà không phải đụng vào codebase Codex. Với người dùng BYOK, đây là cách hay để kiểm thử model rẻ hơn, riêng tư hơn hoặc mạnh ở một tác vụ cụ thể trong cùng một workflow Codex Desktop.

Hạn chế

Đây là lớp shim không chính thức nên có rủi ro gãy khi Codex Desktop đổi API nội bộ. Người dùng cũng cần hiểu rõ bảo mật khi route prompt/code qua provider ngoài, đặc biệt với repository riêng tư.

Phù hợp khi nào

Phù hợp cho power user của Codex Desktop, developer muốn thử nhiều model coding, hoặc team cần kiểm thử BYOK provider trong giao diện Codex quen thuộc.

codex-shim | Atlas for AI