@bitkyc08/opencodex 1.9.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +95 -71
- package/README.md +93 -46
- package/README.zh-CN.md +101 -70
- package/gui/dist/assets/index-DRr-3yL3.css +1 -0
- package/gui/dist/assets/index-LGqpEmI5.js +9 -0
- package/gui/dist/index.html +13 -3
- package/package.json +1 -3
- package/src/adapters/openai-chat.ts +34 -20
- package/src/bridge.ts +13 -5
- package/src/cli.ts +11 -9
- package/src/codex-catalog.ts +147 -31
- package/src/config.ts +2 -1
- package/src/oauth/index.ts +28 -12
- package/src/oauth/key-providers.ts +27 -0
- package/src/providers/derive.ts +35 -0
- package/src/providers/registry.ts +130 -7
- package/src/reasoning-effort.ts +102 -0
- package/src/responses/parser.ts +1 -1
- package/src/server.ts +19 -2
- package/src/service.ts +26 -2
- package/src/star-prompt.ts +5 -4
- package/src/types.ts +22 -0
- package/src/ws-bridge.ts +5 -2
- package/gui/dist/assets/index-C1wlp1SM.css +0 -1
- package/gui/dist/assets/index-CDhJ0DI7.js +0 -9
- package/scripts/postinstall.mjs +0 -57
package/README.ko.md
CHANGED
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.png">
|
|
5
|
-
<img alt="opencodex" src="assets/logo-light.png" width="96" height="96">
|
|
6
|
-
</picture>
|
|
7
|
-
|
|
8
|
-
# opencodex (`ocx`)
|
|
9
|
-
|
|
10
|
-
**[OpenAI Codex](https://openai.com/codex)를 위한 범용 프로바이더 proxy — Codex CLI, App, SDK에서 어떤 LLM이든 사용하세요.**
|
|
11
|
-
|
|
12
|
-
[English](README.md) · **한국어** · [简体中文](README.zh-CN.md)
|
|
13
|
-
|
|
14
|
-
📖 **[전체 문서 →](https://lidge-jun.github.io/opencodex/ko/)**
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/banner.png" alt="opencodex — 어떤 LLM이든 Codex에서 사용" width="820">
|
|
3
|
+
</p>
|
|
15
4
|
|
|
16
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="README.md">English</a> · <b>한국어</b> · <a href="README.zh-CN.md">简体中文</a> · 📖 <a href="https://lidge-jun.github.io/opencodex/ko/"><b>전체 문서 →</b></a>
|
|
7
|
+
</p>
|
|
17
8
|
|
|
18
9
|
<p align="center">
|
|
19
|
-
<img src="assets/
|
|
10
|
+
<img src="assets/architecture.png" alt="opencodex 아키텍처 — Codex CLI가 opencodex 프록시를 통해 모든 LLM 프로바이더로 라우팅" width="820">
|
|
20
11
|
</p>
|
|
21
12
|
|
|
22
|
-
Codex는 오직 Responses API(`/v1/responses`)만 사용합니다. opencodex는 Codex와
|
|
23
|
-
|
|
24
|
-
모두 포함해서 — 양방향으로 동작합니다.
|
|
13
|
+
Codex는 오직 Responses API(`/v1/responses`)만 사용합니다. opencodex는 Codex와 LLM 프로바이더 사이에서
|
|
14
|
+
프로토콜을 실시간으로 변환해 줍니다. streaming, tool 호출, reasoning, 이미지까지 양방향으로 처리합니다.
|
|
25
15
|
|
|
26
16
|
```
|
|
27
17
|
Codex CLI / App / SDK ──/v1/responses──▶ opencodex ──▶ Any provider
|
|
@@ -30,24 +20,34 @@ Codex CLI / App / SDK ──/v1/responses──▶ opencodex ──▶ Any provi
|
|
|
30
20
|
OpenRouter · Azure · DeepSeek · GLM · …and OpenAI itself
|
|
31
21
|
```
|
|
32
22
|
|
|
23
|
+
## 지원 플랫폼
|
|
24
|
+
|
|
25
|
+
| OS | 지원 상태 | 서비스 관리자 |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| macOS (arm64 / x64) | 완전 지원 | launchd |
|
|
28
|
+
| Linux (x64 / arm64) | 완전 지원 | systemd (user unit) |
|
|
29
|
+
| Windows (x64) | 완전 지원 | Task Scheduler |
|
|
30
|
+
|
|
31
|
+
[Bun](https://bun.sh) 1.1 이상이 필요합니다. 세 플랫폼 모두 네이티브로 동작합니다 (Windows에서도 WSL 없이 사용 가능합니다).
|
|
32
|
+
|
|
33
33
|
## 빠른 시작
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
#
|
|
37
|
-
npm install -g @bitkyc08/opencodex #
|
|
36
|
+
# 설치
|
|
37
|
+
npm install -g @bitkyc08/opencodex # 또는: bun install -g @bitkyc08/opencodex
|
|
38
38
|
|
|
39
|
-
#
|
|
39
|
+
# 대화형 설정 (config 작성 + Codex에 자동 주입)
|
|
40
40
|
ocx init
|
|
41
41
|
|
|
42
|
-
#
|
|
42
|
+
# 프록시 시작
|
|
43
43
|
ocx start
|
|
44
44
|
|
|
45
|
-
#
|
|
45
|
+
# Codex를 평소처럼 사용하세요 — opencodex를 통해 라우팅됩니다
|
|
46
46
|
codex "Write a hello world in Rust"
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
<details>
|
|
50
|
-
<summary><b><a href="https://bun.sh">bun</a>이 없으신가요?</b> — 먼저
|
|
50
|
+
<summary><b><a href="https://bun.sh">bun</a>이 없으신가요?</b> — 먼저 설치해 주세요 (opencodex는 bun에서 실행됩니다)</summary>
|
|
51
51
|
|
|
52
52
|
<br/>
|
|
53
53
|
|
|
@@ -59,41 +59,56 @@ curl -fsSL https://bun.sh/install | bash
|
|
|
59
59
|
powershell -c "irm bun.sh/install.ps1 | iex"
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
설치 후 `npm install -g @bitkyc08/opencodex`를 다시 실행하세요. (`ocx` 바이너리는 bun
|
|
62
|
+
설치 후 `npm install -g @bitkyc08/opencodex`를 다시 실행하세요. (`ocx` 바이너리는 bun 기반이므로 bun이 `PATH`에 있어야 합니다.)
|
|
63
63
|
|
|
64
64
|
</details>
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
## 프로바이더 추가하기
|
|
67
|
+
|
|
68
|
+
가장 쉬운 방법은 웹 대시보드를 이용하는 것입니다.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ocx gui # 브라우저에서 localhost:10100 대시보드를 엽니다
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
대시보드에서 할 수 있는 일:
|
|
75
|
+
|
|
76
|
+
1. **프로바이더 선택** — 20개 이상의 내장 프로바이더(Anthropic, Google, xAI, Ollama Cloud 등)에서 원하는 것을 고르세요.
|
|
77
|
+
2. **API 키 입력** — 키를 붙여넣으면 바로 저장됩니다. OAuth를 지원하는 프로바이더는 로그인 버튼으로 인증할 수도 있습니다.
|
|
78
|
+
3. **모델 자동 감지** — 프로바이더를 추가하면 사용 가능한 모델을 자동으로 가져옵니다. Codex 모델 선택기에도 곧바로 반영됩니다.
|
|
79
|
+
|
|
80
|
+
물론 `~/.opencodex/config.json`을 직접 편집해도 됩니다. 하지만 대시보드가 훨씬 편리합니다.
|
|
81
|
+
|
|
82
|
+
## 모델 라우팅
|
|
83
|
+
|
|
84
|
+
`provider/model` 형식으로 원하는 모델을 직접 지정할 수 있습니다:
|
|
67
85
|
|
|
68
86
|
```bash
|
|
69
|
-
codex -m "anthropic/claude-opus-4-8"
|
|
70
|
-
codex -m "
|
|
87
|
+
codex -m "anthropic/claude-opus-4-8" "이 스택 트레이스를 설명해 줘"
|
|
88
|
+
codex -m "google/gemini-2.5-pro" "이 코드를 리팩터링해 줘"
|
|
89
|
+
codex -m "ollama-cloud/glm-5.2" "SQL 마이그레이션 작성"
|
|
90
|
+
codex -m "xai/grok-4" "이 PR을 리뷰해 줘"
|
|
71
91
|
```
|
|
72
92
|
|
|
93
|
+
프로바이더 이름 없이 모델명만 쓰면 `defaultProvider`로 라우팅됩니다.
|
|
94
|
+
|
|
73
95
|
## 주요 기능
|
|
74
96
|
|
|
75
|
-
- **다섯 가지 adapter**로 Anthropic Messages, Google Gemini, Azure, OpenAI Responses passthrough,
|
|
76
|
-
|
|
77
|
-
- **
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- **
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- **서브에이전트 제어.** `subagentModels` 또는 웹 대시보드에서 최대 5개의 라우팅/네이티브 모델을
|
|
84
|
-
Codex `spawn_agent` 선택기에 우선 노출할 수 있습니다.
|
|
85
|
-
- **기본은 HTTP/SSE, WebSocket은 opt-in.** 프록시는 Responses WebSocket 엔드포인트를 갖고 있지만,
|
|
86
|
-
`"websockets": true`일 때만 `supports_websockets`를 광고합니다.
|
|
87
|
-
- **Sidecar.** OpenAI가 아닌 모델에도 ChatGPT 로그인을 통한 `gpt-5.4-mini`를 사용해 실제 **웹 검색**과
|
|
88
|
-
**이미지 이해** 기능을 제공합니다.
|
|
89
|
-
- 프로바이더, OAuth 로그인, 모델 선택, 요청 로그를 위한 **웹 대시보드**.
|
|
97
|
+
- **다섯 가지 adapter**로 Anthropic Messages, Google Gemini, Azure, OpenAI Responses passthrough, 그리고 **모든 OpenAI 호환 Chat Completions** 엔드포인트를 지원합니다. 프로바이더가 OpenAI 호환 API를 제공한다면 별도 adapter 없이 바로 연결할 수 있습니다.
|
|
98
|
+
- **OAuth, API 키, ChatGPT forward** 중 원하는 인증 방식을 선택하세요. xAI / Anthropic / Kimi 계정으로 OAuth 로그인하면 토큰이 자동 갱신됩니다. `codex login`을 forward 하거나, API 키를 직접 입력해도 됩니다(`${ENV_VARS}` 지원). 18개 프로바이더의 API 키 카탈로그(**Ollama Cloud** 포함)가 기본 내장되어 있습니다.
|
|
99
|
+
- **Codex CLI, TUI, App, SDK에 바로 연결됩니다.** `$CODEX_HOME/config.toml`(기본 `~/.codex/config.toml`)에 `[model_providers.opencodex]` 테이블을 자동 주입하고, 공유 모델 카탈로그를 작성합니다. 라우팅된 모델이 Codex 모델 선택기에 자동으로 나타납니다.
|
|
100
|
+
- **서브에이전트 제어.** `subagentModels` 또는 웹 대시보드에서 최대 5개의 모델을 골라 Codex `spawn_agent` 선택기에 우선 노출할 수 있습니다.
|
|
101
|
+
- **기본은 HTTP/SSE, WebSocket은 opt-in.** 프록시에 Responses WebSocket 엔드포인트가 있지만, `"websockets": true`로 설정할 때만 `supports_websockets`를 광고합니다.
|
|
102
|
+
- **Sidecar로 기능 확장.** OpenAI가 아닌 모델에서도 ChatGPT 로그인을 통한 `gpt-5.4-mini`로 실제 **웹 검색**과 **이미지 이해** 기능을 사용할 수 있습니다.
|
|
103
|
+
- **웹 대시보드** 하나로 프로바이더 관리, OAuth 로그인, 모델 선택, 요청 로그 확인까지 가능합니다.
|
|
104
|
+
- **깔끔한 종료, 잔여물 제로.** `ocx stop`(또는 대시보드의 Stop 버튼)을 누르면 프록시가 종료되고, 백그라운드 서비스가 설치돼 있으면 함께 내려가며, Codex 설정이 원본으로 복원됩니다. 이후 `codex` 명령은 opencodex 없이 원래대로 동작합니다.
|
|
90
105
|
|
|
91
106
|
## 프로바이더 및 adapter
|
|
92
107
|
|
|
93
|
-
| Provider | Adapter |
|
|
108
|
+
| Provider | Adapter | 인증 방식 |
|
|
94
109
|
|---|---|---|
|
|
95
|
-
| OpenAI (ChatGPT
|
|
96
|
-
| OpenAI (API
|
|
110
|
+
| OpenAI (ChatGPT 로그인) | `openai-responses` | forward (키 불필요) |
|
|
111
|
+
| OpenAI (API 키) | `openai-responses` | key |
|
|
97
112
|
| Anthropic Claude | `anthropic` | oauth / key |
|
|
98
113
|
| xAI Grok | `openai-chat` | oauth / key |
|
|
99
114
|
| Kimi (Moonshot) | `openai-chat` | oauth / key |
|
|
@@ -106,22 +121,22 @@ codex -m "ollama-cloud/glm-5.2" "Write a SQL migration"
|
|
|
106
121
|
## CLI
|
|
107
122
|
|
|
108
123
|
```bash
|
|
109
|
-
ocx init #
|
|
110
|
-
ocx start [--port 10100] #
|
|
111
|
-
ocx stop #
|
|
112
|
-
ocx restore #
|
|
113
|
-
ocx sync #
|
|
114
|
-
ocx status #
|
|
115
|
-
ocx login <xai|anthropic|kimi> # OAuth
|
|
116
|
-
ocx logout <provider> #
|
|
117
|
-
ocx gui #
|
|
118
|
-
ocx service <install|start|stop|status|uninstall> #
|
|
119
|
-
ocx update #
|
|
124
|
+
ocx init # 대화형 설정
|
|
125
|
+
ocx start [--port 10100] # 프록시 시작
|
|
126
|
+
ocx stop # 프록시 중지 + Codex 원래 설정 복원
|
|
127
|
+
ocx restore # 중지 없이 복원 (별칭: ocx eject)
|
|
128
|
+
ocx sync # 모델 갱신 + Codex에 재주입
|
|
129
|
+
ocx status # 프록시 실행 중인지 확인
|
|
130
|
+
ocx login <xai|anthropic|kimi> # OAuth 로그인
|
|
131
|
+
ocx logout <provider> # 저장된 로그인 정보 삭제
|
|
132
|
+
ocx gui # 웹 대시보드 열기
|
|
133
|
+
ocx service <install|start|stop|status|uninstall> # 백그라운드 서비스 (launchd/systemd/schtasks)
|
|
134
|
+
ocx update # opencodex를 최신 버전으로 업데이트
|
|
120
135
|
```
|
|
121
136
|
|
|
122
137
|
## 설정
|
|
123
138
|
|
|
124
|
-
|
|
139
|
+
설정 파일은 `~/.opencodex/config.json`에 저장됩니다. 최소 설정 예시:
|
|
125
140
|
|
|
126
141
|
```json
|
|
127
142
|
{
|
|
@@ -144,20 +159,29 @@ ocx update # update opencodex to the latest published versio
|
|
|
144
159
|
}
|
|
145
160
|
```
|
|
146
161
|
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
로컬에서 Ollama나 LM Studio를 실행 중이라면 이렇게 추가하세요:
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"ollama-local": {
|
|
167
|
+
"adapter": "openai-chat",
|
|
168
|
+
"baseUrl": "http://localhost:11434/v1",
|
|
169
|
+
"apiKey": "",
|
|
170
|
+
"defaultModel": "llama3.1"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
WebSocket 전송은 기본적으로 꺼져 있습니다. Codex가 HTTP/SSE 대신 Responses WebSocket 경로를 사용하게 하려면 `"websockets": true`를 설정하세요.
|
|
149
176
|
|
|
150
|
-
모든 필드에 대한 자세한 내용은 **[설정 레퍼런스](https://lidge-jun.github.io/opencodex/ko/reference/configuration/)**
|
|
151
|
-
를 참고하세요.
|
|
177
|
+
모든 필드에 대한 자세한 내용은 **[설정 레퍼런스](https://lidge-jun.github.io/opencodex/ko/reference/configuration/)** 를 참고하세요.
|
|
152
178
|
|
|
153
179
|
## 문서
|
|
154
180
|
|
|
155
|
-
공개 문서
|
|
156
|
-
|
|
157
|
-
**[lidge-jun.github.io/opencodex](https://lidge-jun.github.io/opencodex/ko/)**에 게시됩니다.
|
|
181
|
+
공개 문서(설치, 프로바이더, 라우팅, sidecar, Codex 통합, Codex App 모델 선택기, CLI/설정 레퍼런스)는 [`docs-site/`](./docs-site)의 Astro 사이트로 빌드되어
|
|
182
|
+
**[lidge-jun.github.io/opencodex](https://lidge-jun.github.io/opencodex/ko/)** 에 게시됩니다.
|
|
158
183
|
|
|
159
|
-
유지보수용 source of truth는 [`structure/`](./structure)
|
|
160
|
-
[`docs/`](./docs)에 남아 있습니다.
|
|
184
|
+
유지보수용 source of truth는 [`structure/`](./structure)에, 과거 조사/진단 노트는 [`docs/`](./docs)에 있습니다.
|
|
161
185
|
|
|
162
186
|
## 개발
|
|
163
187
|
|
|
@@ -165,11 +189,11 @@ CLI/설정 레퍼런스 — 는 [`docs-site/`](./docs-site) 아래의 Astro 사
|
|
|
165
189
|
git clone https://github.com/lidge-jun/opencodex.git
|
|
166
190
|
cd opencodex
|
|
167
191
|
bun install
|
|
168
|
-
bun run dev #
|
|
169
|
-
bun x tsc --noEmit #
|
|
192
|
+
bun run dev # dev 모드로 프록시 시작
|
|
193
|
+
bun x tsc --noEmit # 타입 체크
|
|
170
194
|
```
|
|
171
195
|
|
|
172
|
-
**[기여하기](https://lidge-jun.github.io/opencodex/ko/contributing/)
|
|
196
|
+
**[기여하기](https://lidge-jun.github.io/opencodex/ko/contributing/)** 를 참고하세요.
|
|
173
197
|
|
|
174
198
|
## 라이선스
|
|
175
199
|
|
package/README.md
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
<
|
|
1
|
+
<h3 align="center">make codex open!</h3>
|
|
2
|
+
<p align="center"><code>npm install -g @bitkyc08/opencodex</code> · <code>ocx start</code> · <b>localhost:10100</b></p>
|
|
2
3
|
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
</picture>
|
|
7
|
-
|
|
8
|
-
# opencodex (`ocx`)
|
|
9
|
-
|
|
10
|
-
**Universal provider proxy for [OpenAI Codex](https://openai.com/codex) — use any LLM with Codex CLI, App, and SDK.**
|
|
11
|
-
|
|
12
|
-
[English](README.md) · [한국어](README.ko.md) · [简体中文](README.zh-CN.md)
|
|
13
|
-
|
|
14
|
-
📖 **[Full documentation →](https://lidge-jun.github.io/opencodex/)**
|
|
4
|
+
<p align="center">
|
|
5
|
+
<img src="assets/banner.png" alt="opencodex — Universal provider proxy for Codex, use any LLM" width="820">
|
|
6
|
+
</p>
|
|
15
7
|
|
|
16
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="README.md">English</a> · <a href="README.ko.md">한국어</a> · <a href="README.zh-CN.md">简体中文</a> · 📖 <a href="https://lidge-jun.github.io/opencodex/"><b>Full documentation →</b></a>
|
|
10
|
+
</p>
|
|
17
11
|
|
|
18
12
|
<p align="center">
|
|
19
|
-
<img src="assets/
|
|
13
|
+
<img src="assets/architecture.png" alt="opencodex architecture — Codex CLI routes through opencodex proxy to any LLM provider" width="820">
|
|
20
14
|
</p>
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
— in both directions.
|
|
16
|
+
Use Claude, Gemini, Grok, GLM, DeepSeek, Kimi, Qwen, Ollama, or any other LLM with Codex — without waiting for OpenAI to add support.
|
|
17
|
+
|
|
18
|
+
opencodex is a lightweight local proxy that translates Codex's Responses API into whatever your provider speaks. Streaming, tool calls, reasoning tokens, images — everything works, in both directions.
|
|
25
19
|
|
|
26
20
|
```
|
|
27
21
|
Codex CLI / App / SDK ──/v1/responses──▶ opencodex ──▶ Any provider
|
|
@@ -73,30 +67,61 @@ Then re-run `npm install -g @bitkyc08/opencodex`. (The `ocx` binary is bun-nativ
|
|
|
73
67
|
|
|
74
68
|
</details>
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
## Add a provider
|
|
71
|
+
|
|
72
|
+
The fastest way to add a provider is through the web dashboard:
|
|
77
73
|
|
|
78
74
|
```bash
|
|
75
|
+
ocx gui
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This opens the dashboard at `http://localhost:10100`. From there:
|
|
79
|
+
|
|
80
|
+
1. Click **"Add Provider"**
|
|
81
|
+
2. Pick from **40+ built-in providers** — or enter a custom OpenAI-compatible endpoint
|
|
82
|
+
3. Paste your API key (or log in via OAuth for Anthropic, xAI, and Kimi)
|
|
83
|
+
4. Models are **auto-discovered** from the provider's `/v1/models` endpoint
|
|
84
|
+
|
|
85
|
+
Your new provider is ready to use immediately. No restart needed.
|
|
86
|
+
|
|
87
|
+
You can also add providers through `ocx init` (interactive CLI) or by editing `~/.opencodex/config.json` directly.
|
|
88
|
+
|
|
89
|
+
## Model routing
|
|
90
|
+
|
|
91
|
+
Target any configured provider and model using the `provider/model` syntax:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Use Claude Opus through Anthropic
|
|
79
95
|
codex -m "anthropic/claude-opus-4-8" "Explain this stack trace"
|
|
80
|
-
|
|
96
|
+
|
|
97
|
+
# Use Gemini through Google
|
|
98
|
+
codex -m "google/gemini-3-pro" "Write unit tests for auth.ts"
|
|
99
|
+
|
|
100
|
+
# Use GLM through Ollama Cloud
|
|
101
|
+
codex -m "ollama-cloud/glm-5.2" "Write a SQL migration"
|
|
102
|
+
|
|
103
|
+
# Use a local model through Ollama
|
|
104
|
+
codex -m "ollama/llama3" "Refactor this function"
|
|
81
105
|
```
|
|
82
106
|
|
|
107
|
+
When you omit the `provider/` prefix, opencodex routes to the default provider — or auto-matches based on the model name pattern (e.g., `claude-*` routes to Anthropic, `gpt-*` routes to OpenAI).
|
|
108
|
+
|
|
109
|
+
Routed models also appear in the **Codex App** model picker with per-model reasoning effort controls:
|
|
110
|
+
|
|
111
|
+
<p align="center">
|
|
112
|
+
<img src="assets/codex-app-picker.png" alt="Codex App showing opencodex routed models with reasoning effort picker" width="480">
|
|
113
|
+
</p>
|
|
114
|
+
|
|
83
115
|
## Highlights
|
|
84
116
|
|
|
85
|
-
- **
|
|
86
|
-
|
|
87
|
-
- **
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- **
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- **Subagent control.** Feature up to five routed or native models in Codex's `spawn_agent` picker
|
|
94
|
-
from `subagentModels` or the web dashboard.
|
|
95
|
-
- **HTTP/SSE by default, WebSocket opt-in.** The proxy has a Responses WebSocket endpoint, but it
|
|
96
|
-
only advertises `supports_websockets` when `"websockets": true` is set.
|
|
97
|
-
- **Sidecars.** Give non-OpenAI models real **web search** and **image understanding** via a
|
|
98
|
-
`gpt-5.4-mini` over your ChatGPT login.
|
|
99
|
-
- **Web dashboard** for providers, OAuth login, model selection, and request logs.
|
|
117
|
+
- **Use any LLM with Codex.** 5 protocol adapters cover Anthropic Messages, Google Gemini, Azure, OpenAI Responses passthrough, and every OpenAI-compatible Chat Completions endpoint — that's 40+ providers out of the box.
|
|
118
|
+
- **Log in once, skip the API key.** OAuth support for xAI, Anthropic, and Kimi means you can authenticate with your existing account. Tokens auto-refresh. Or forward your `codex login`, paste an API key, or use `${ENV_VAR}` references — your call.
|
|
119
|
+
- **Works everywhere Codex does.** Injects into Codex CLI, TUI, App, and SDK automatically. Routed models show up in Codex's model picker just like native ones.
|
|
120
|
+
- **Delegate to the right model.** Feature up to five routed or native models in Codex's subagent picker from the dashboard or config — route complex tasks to a reasoning model, fast tasks to a cheap one.
|
|
121
|
+
- **Give any model superpowers.** Non-OpenAI models get real web search and image understanding via a `gpt-5.4-mini` sidecar over your ChatGPT login.
|
|
122
|
+
- **See what's happening.** The web dashboard shows providers, OAuth status, model selection, and a live request log — no more guessing why a request failed.
|
|
123
|
+
- **Runs in the background.** Install as a system service (launchd / systemd / Task Scheduler) and forget about it. The proxy starts on boot and stays out of your way.
|
|
124
|
+
- **Clean exit, zero residue.** `ocx stop` (or the dashboard's Stop button) shuts down the proxy, stops the background service if one is installed, and restores Codex to its original configuration. Plain `codex` works exactly as it did before — no leftover config, no orphaned processes.
|
|
100
125
|
|
|
101
126
|
## Providers & adapters
|
|
102
127
|
|
|
@@ -108,11 +133,13 @@ codex -m "ollama-cloud/glm-5.2" "Write a SQL migration"
|
|
|
108
133
|
| xAI Grok | `openai-chat` | oauth / key |
|
|
109
134
|
| Kimi (Moonshot) | `openai-chat` | oauth / key |
|
|
110
135
|
| Google Gemini | `google` | key |
|
|
111
|
-
| Azure OpenAI | `azure` | key |
|
|
136
|
+
| Azure OpenAI | `azure-openai` | key |
|
|
112
137
|
| Ollama Cloud + 17-provider catalog | `openai-chat` | key |
|
|
113
138
|
| Ollama / vLLM / LM Studio (local) | `openai-chat` | key (usually blank) |
|
|
114
139
|
| Any OpenAI-compatible endpoint | `openai-chat` | key |
|
|
115
140
|
|
|
141
|
+
Plus DeepSeek, Groq, OpenRouter, Together, Fireworks, Cerebras, Mistral, Hugging Face, NVIDIA NIM, MiniMax, Qwen Portal, and more. See the full list with `ocx init` or in the [provider docs](https://lidge-jun.github.io/opencodex/reference/configuration/).
|
|
142
|
+
|
|
116
143
|
## CLI
|
|
117
144
|
|
|
118
145
|
```bash
|
|
@@ -131,7 +158,7 @@ ocx update # update opencodex to the latest published versio
|
|
|
131
158
|
|
|
132
159
|
## Configuration
|
|
133
160
|
|
|
134
|
-
Config lives at `~/.opencodex/config.json`.
|
|
161
|
+
Config lives at `~/.opencodex/config.json`. Here's a typical multi-provider setup:
|
|
135
162
|
|
|
136
163
|
```json
|
|
137
164
|
{
|
|
@@ -154,20 +181,40 @@ Config lives at `~/.opencodex/config.json`. Minimal example:
|
|
|
154
181
|
}
|
|
155
182
|
```
|
|
156
183
|
|
|
157
|
-
|
|
158
|
-
|
|
184
|
+
Local models work too. Point opencodex at any OpenAI-compatible server running on your machine:
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"port": 10100,
|
|
189
|
+
"defaultProvider": "ollama",
|
|
190
|
+
"providers": {
|
|
191
|
+
"ollama": {
|
|
192
|
+
"adapter": "openai-chat",
|
|
193
|
+
"baseUrl": "http://localhost:11434/v1",
|
|
194
|
+
"authMode": "key",
|
|
195
|
+
"apiKey": "",
|
|
196
|
+
"defaultModel": "llama3"
|
|
197
|
+
},
|
|
198
|
+
"vllm": {
|
|
199
|
+
"adapter": "openai-chat",
|
|
200
|
+
"baseUrl": "http://localhost:8000/v1",
|
|
201
|
+
"authMode": "key",
|
|
202
|
+
"apiKey": "",
|
|
203
|
+
"defaultModel": "Qwen/Qwen3-32B"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
WebSocket transport is off by default. Set `"websockets": true` only if you want Codex to advertise and use the Responses WebSocket path instead of HTTP/SSE.
|
|
159
210
|
|
|
160
|
-
See the **[Configuration reference](https://lidge-jun.github.io/opencodex/reference/configuration/)**
|
|
161
|
-
for every field.
|
|
211
|
+
See the **[Configuration reference](https://lidge-jun.github.io/opencodex/reference/configuration/)** for every field.
|
|
162
212
|
|
|
163
213
|
## Documentation
|
|
164
214
|
|
|
165
|
-
The public docs — install, providers, routing, sidecars, Codex integration, Codex App model picker,
|
|
166
|
-
and CLI/config reference — are built from [`docs-site/`](./docs-site) and published to
|
|
167
|
-
**[lidge-jun.github.io/opencodex](https://lidge-jun.github.io/opencodex/)**.
|
|
215
|
+
The public docs — install, providers, routing, sidecars, Codex integration, Codex App model picker, and CLI/config reference — are built from [`docs-site/`](./docs-site) and published to **[lidge-jun.github.io/opencodex](https://lidge-jun.github.io/opencodex/)**.
|
|
168
216
|
|
|
169
|
-
Maintainer source-of-truth notes live under [`structure/`](./structure). Historical investigations
|
|
170
|
-
remain under [`docs/`](./docs).
|
|
217
|
+
Maintainer source-of-truth notes live under [`structure/`](./structure). Historical investigations remain under [`docs/`](./docs).
|
|
171
218
|
|
|
172
219
|
## Development
|
|
173
220
|
|