You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/ko/reference/configuration.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,9 @@ namespaced selected id를 bare id로 바꿉니다.
53
53
|`syncResumeHistory?`|`boolean`|`true`| 되돌릴 수 있는 Codex App 기록 호환 모드. opencodex가 원래 Codex thread metadata를 백업하고, 예전 OpenAI interactive row를 `opencodex`로 재매핑하며, opencodex가 만든 `exec` row를 App에 보이는 source로 잠시 승격합니다. `ocx stop` / `ocx restore`는 백업한 OpenAI row를 복원하고 남은 opencodex user thread를 OpenAI로 돌려 네이티브 Codex가 `config.toml`에서 프록시를 제거한 뒤에도 이어서 열 수 있게 합니다. 끄려면 `false`로 설정합니다. |
54
54
|`codexAccounts?`|`CodexAccount[]`|`[]`| Codex Auth 대시보드에서 관리하는 ChatGPT/Codex pool 계정 metadata. secret은 `codex-accounts.json`에 따로 둡니다. |
55
55
|`activeCodexAccountId?`|`string`| — | 수동으로 선택한 pool 계정. 선택 시 기존 thread affinity를 지우고 다음 요청부터 적용하며, 진행 중인 요청은 기존 계정을 유지합니다. |
56
-
|`autoSwitchThreshold?`|`number`|`80`| 새 세션 자동 전환용 사용량 백분율 threshold. 알려진 5시간, 주간, 30일 quota window 중 가장 높은 점수를 씁니다. `0`이면 quota 자동 전환을 끕니다. |
56
+
|`autoSwitchThreshold?`|`number`|`80`| 새 세션 자동 전환용 사용량 백분율 threshold. 알려진 5시간, 주간, 30일 quota window 중 가장 높은 점수를 씁니다. `0`이면 quota 자동 전환을 끕니다. `quota` 전략과 `fill-first` drain threshold에도 사용됩니다. |
57
+
|`accountPoolStrategy?`|`"quota" \| "round-robin" \| "fill-first"`|`"quota"`| Codex pool의 새 세션 rotation 전략. **새 세션에만** 적용되며 기존 thread id는 affinity를 유지합니다. `quota`(기본) — 활성 계정이 `autoSwitchThreshold`를 넘으면 알려진 usage가 가장 낮은 계정 선택. `round-robin` — 적격 계정 간 smooth weighted 균등 분배. `fill-first` — cooldown, 사용 불가 또는(설정 시) `autoSwitchThreshold`까지 활성 계정을 소진(알 수 없는 usage는 강제 전환하지 않음)한 뒤 안정 정렬 순으로 다음 계정. |
58
+
|`accountPoolStickyLimit?`|`number`|`1`| 한 round-robin 선택이 다음으로 넘어가기 전에 유지하는 성공적 새 세션 bind 수. 범위 1–100. `accountPoolStrategy`가 `round-robin`일 때만 적용. |
57
59
|`upstreamFailoverThreshold?`|`number`|`3`| 일시적인 업스트림 실패가 연속으로 발생한 뒤, 이후 새 세션을 다른 적합한 pool 계정으로 failover할 횟수. `0`이면 실패 기반 failover를 끕니다. |
58
60
|`modelCacheTtlMs?`|`number`|`300000`| 프로바이더별 `/models` 캐시의 유효 기간(5분). |
59
61
|`cacheRetention?`|`"none" \| "short" \| "long"`|`"short"`| Anthropic prompt cache 정책. 끔, 5분 ephemeral, 1시간 extended 중 하나입니다. |
@@ -73,8 +75,14 @@ namespaced selected id를 bare id로 바꿉니다.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/configuration.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,9 @@ differing backup and rewrites known legacy namespaced selected ids to bare ids.
58
58
|`syncResumeHistory?`|`boolean`|`true`| Reversible Codex App history compatibility mode. opencodex backs up original Codex thread metadata, remaps old OpenAI interactive rows to `opencodex`, and temporarily promotes opencodex-created `exec` rows to an app-visible source. `ocx stop` / `ocx restore` restore backed-up OpenAI rows and eject remaining opencodex user threads to OpenAI so native Codex can resume them after the proxy is removed from `config.toml`. Set `false` to opt out. |
59
59
|`codexAccounts?`|`CodexAccount[]`|`[]`| ChatGPT/Codex pool account metadata managed by the Codex Auth dashboard. Secrets live separately in `codex-accounts.json`. |
60
60
|`activeCodexAccountId?`|`string`| — | Manually selected Pool account. Selection clears existing thread affinity and applies to the next request; in-flight requests keep their captured account. |
61
-
|`autoSwitchThreshold?`|`number`|`80`| Usage percent threshold for new-session auto-switching. The score uses the hottest known 5h, weekly, or 30d quota window. Set `0` to disable quota auto-switching. |
61
+
|`autoSwitchThreshold?`|`number`|`80`| Usage percent threshold for new-session auto-switching. The score uses the hottest known 5h, weekly, or 30d quota window. Set `0` to disable quota auto-switching. Used by the `quota` strategy and as the drain threshold for `fill-first`. |
62
+
|`accountPoolStrategy?`|`"quota" \| "round-robin" \| "fill-first"`|`"quota"`| New-session rotation strategy for the Codex pool. Applies to **new sessions only**; existing thread ids keep affinity. `quota` — today's default: pick the lowest known usage when the active account crosses `autoSwitchThreshold`. `round-robin` — even spread across eligible accounts via smooth weighted selection. `fill-first` — keep the active account until it cools down, becomes unusable, or crosses `autoSwitchThreshold` when set (unknown usage does not force a switch), then advance to the next eligible account in stable sorted order. |
63
+
|`accountPoolStickyLimit?`|`number`|`1`| Successful new-session binds retained on one round-robin selection before advancing. Range 1–100; only applies when `accountPoolStrategy` is `round-robin`. |
62
64
|`upstreamFailoverThreshold?`|`number`|`3`| Consecutive transient upstream failures before future new sessions fail over to another eligible pool account. Set `0` to disable failure failover. |
63
65
|`modelCacheTtlMs?`|`number`|`300000`| Freshness window for the per-provider `/models` cache (5 min). |
@@ -99,12 +101,23 @@ also force the same native-provider recovery with `ocx recover-history --legacy-
99
101
:::note[Codex account pool]
100
102
Use the dashboard's **Codex Auth** page to add pool accounts and refresh quotas. The config stores
101
103
non-secret account metadata only; access and refresh tokens are kept in the hardened Codex account
102
-
credential store. Existing thread ids keep account affinity, while new sessions can auto-route based
103
-
on quota, cooldown, and health. A pre-stream upstream **429**/**402** on one pool account is retried
104
-
once on an eligible alternate account in the same request (so Codex CLI does not stall on a depleted
105
-
primary while another account still has quota).
104
+
credential store. Existing thread ids keep account affinity, while new sessions auto-route based on
105
+
`accountPoolStrategy`, quota, cooldown, and health. A pre-stream upstream **429**/**402** on one pool
106
+
account is retried once on an eligible alternate account in the same request (so Codex CLI does not
107
+
stall on a depleted primary while another account still has quota).
106
108
:::
107
109
110
+
**Rotation strategies** (new sessions only; bound threads are unchanged):
111
+
112
+
| Strategy | Behaviour |
113
+
| --- | --- |
114
+
|`quota` (default) | When the active account's known usage crosses `autoSwitchThreshold`, pick the lowest-usage eligible account across 5h, weekly, and 30d windows. `autoSwitchThreshold: 0` disables quota-based picking. |
115
+
|`round-robin`| Even spread across eligible accounts. `accountPoolStickyLimit` (default `1`, range 1–100) keeps that many successful new-session binds on one pick before advancing. |
116
+
|`fill-first`| Drain the active account until cooldown, reauthentication, or (when set) `autoSwitchThreshold`; unknown usage does not force a switch. Then advance to the next eligible account in stable sorted order. |
117
+
118
+
Rotation strategies do not protect against provider enforcement — multi-account use may violate
119
+
provider terms of service.
120
+
108
121
### anthropicAccountPool (experimental)
109
122
110
123
Opt-in routing across **multiple Anthropic OAuth accounts** already stored in `auth.json`
@@ -116,7 +129,9 @@ organization can share quota; pooling those will not help.
116
129
| Key | Type | Default | Description |
117
130
| --- | --- | --- | --- |
118
131
|`anthropicAccountPool.enabled?`|`boolean`|`false`| When true, sticky session affinity + 429 cooldown failover across eligible Anthropic OAuth accounts. |
119
-
|`anthropicAccountPool.autoSwitchThreshold?`|`number`|`80`| For **new** sessions only: if the active account's **known** cached 5-hour usage is at/above this percent, pick the lowest-usage eligible account. Unknown usage does not force a switch. `0` disables quota-based picking (affinity + active only). |
132
+
|`anthropicAccountPool.autoSwitchThreshold?`|`number`|`80`| For **new** sessions only: if the active account's **known** cached 5-hour usage is at/above this percent, pick the lowest-usage eligible account. Unknown usage does not force a switch. `0` disables quota-based picking (affinity + active only). Also used as the drain threshold for `fill-first`. |
133
+
|`anthropicAccountPool.strategy?`|`"quota" \| "round-robin" \| "fill-first"`|`"quota"`| New-session rotation strategy when the pool is enabled. Same round-robin/fill-first semantics as `accountPoolStrategy`; `quota` uses 5-hour bars only (not Codex multi-window scoring). Applies to **new** sessions only. |
134
+
|`anthropicAccountPool.stickyLimit?`|`number`|`1`| Successful new-session binds retained on one round-robin selection before advancing. Range 1–100; only when `strategy` is `round-robin`. |
0 commit comments