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
{{ message }}
Repository navigation
Commit 58c36c9
Browse filesBrowse the repository at this point in the historyBrowse files
- key-failover: fail closed - only authMode key (or the documented omitted
default) may replay; unknown modes rejected; an already-expired HTTP-date
Retry-After retries immediately (like Retry-After: 0)
- derive: providerConfigSeed preserves the registry auth kind (incl. local) so
the gate survives the seed round-trip and routing
- core: release the unread 429 body BEFORE every backoff (main loop, passthrough,
continuations); passthrough and continuation replay sends record the
rate-limit-429 recovery kind; continuation budget hoisted outside the failover
loop so rotation/413 cannot re-arm it; continuation waits sleep on the upstream
signal so an SSE body-cancel aborts them too
- images/web-search loops: release the 429 body before the wait, restart the
response-header deadline after each deliberate wait (backoffs never consume the
connect budget or surface as 504), and record rate-limit-429 on replay sends
- config: load-time degradation for invalid optional retryOn429 fields (warn +
drop the field) instead of tripping the whole schema and hiding all providers
behind a default config; the management write boundary still rejects
- tests: fail-closed auth modes (incl. unknown), expired HTTP-date, per-request
budget across 2-key pools (e2e + terminal continuation), byte-identical replay
bodies/auth (passthrough + continuation), recovery telemetry in both loops,
config load degradation, registry auth-kind preservation, typed usage-log entry
- docs: retry-wait vs total-latency and attempts+poolKeys volume bounds,
identical-replay equivalence, deadline/backoff behavior in devlog 010 and
structure/04; retryOn429 boundary notes in the provider guide and adapter
reference (English + ja/ko/ru/zh-cn)
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/guides/providers.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,11 @@ labels local presets separately; those normally omit both `authMode` and `apiKey
39
39
|`forward`| Relays **your incoming Codex auth headers** verbatim to the provider — no key stored. This is the ChatGPT-login passthrough. | OpenAI (`openai-responses` adapter). |
40
40
|`oauth`| Resolves a stored OAuth access token (auto-refreshed before expiry) and uses it as the bearer key. | xAI, Anthropic, Kimi, Kiro, Google Antigravity, Cursor, GitHub Copilot. |
41
41
42
+
The [`retryOn429`](/reference/configuration/) same-key 429 replay applies only to API-key
43
+
providers (`authMode: "key"`). OAuth, forward, and local presets are excluded — their
44
+
credentials must never be replayed on the same token, and local runtimes have no remote key to
45
+
preserve.
46
+
42
47
## 1. ChatGPT login (forward / passthrough)
43
48
44
49
The `openai` provider needs **no API key**. Direct forwards credentials from your existing
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/ko/reference/adapters.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,10 @@ interface ProviderAdapter {
45
45
**변환하지 않은 채** 스트리밍합니다.
46
46
**인증:**`forward`(호출자 헤더 중계) 또는 `key`.
47
47
48
+
`key` 인증에서는 [`retryOn429`](/ko/reference/configuration/)도 여기에 적용됩니다: 사전 스트림
49
+
429는 번역된 `openai-chat`/Anthropic 요청 경로와 동일하게 같은 키로 동일 요청을 대기 후
50
+
재전송합니다. 커스텀 `runTurn` 전송은 HTTP 재시도 루프에 포함되지 않습니다.
51
+
48
52
-`forward` URL → `{baseUrl}/responses`. `key` provider는 기본적으로 기존 `{baseUrl}/v1/responses` 구성을 사용합니다.
49
53
-`key` provider는 검증된 상대 `responsesPath`를 설정할 수 있습니다. adapter는 `baseUrl` 끝의 `/` 하나를 제거하고 `{trimmedBaseUrl}{responsesPath}`로 전송합니다. Ark Agent Plan은 `baseUrl: "https://ark.cn-beijing.volces.com/api/plan/v3"`와 `responsesPath: "/responses"`를 사용합니다.
50
54
-`forward` 모드에서는 안전한 헤더 허용 목록(`FORWARD_HEADERS`)만 중계합니다. authorization,
**Auth:**`forward` (relay the caller's headers) or `key`.
47
47
48
+
For `key` auth, [`retryOn429`](/reference/configuration/) applies here too: a pre-stream 429
49
+
waits and replays the identical request on the same key before any other handling, exactly like
50
+
the translated `openai-chat` / Anthropic request path. Custom `runTurn` transports are not part
51
+
of the HTTP retry loop.
52
+
48
53
-`forward` URL → `{baseUrl}/responses`. A `key` provider defaults to the legacy `{baseUrl}/v1/responses` construction.
49
54
- A `key` provider may set a validated relative `responsesPath`; the adapter removes one trailing slash from `baseUrl` and sends `{trimmedBaseUrl}{responsesPath}`. For Ark Agent Plan, use `baseUrl: "https://ark.cn-beijing.volces.com/api/plan/v3"` with `responsesPath: "/responses"`.
50
55
- In `forward` mode only a safe header allowlist is relayed (`FORWARD_HEADERS`): authorization,
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/ru/guides/providers.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,11 @@ description: Все способы, которыми opencodex аутентиф
41
41
|`forward`| Передаёт провайдеру **входящие заголовки аутентификации Codex** без изменений — ключ не хранится. Это сквозной режим (passthrough) входа через ChatGPT. | OpenAI (адаптер `openai-responses`). |
42
42
|`oauth`| Берёт сохранённый OAuth-токен доступа (автоматически обновляется до истечения срока) и использует его как bearer-ключ. | xAI, Anthropic, Kimi, Kiro, Google Antigravity, Cursor, GitHub Copilot. |
43
43
44
+
Повтор при 429 на том же ключе ([`retryOn429`](/ru/reference/configuration/)) применим только к
45
+
провайдерам с API-ключом (`authMode: "key"`). Пресеты OAuth, forward и local исключены — их
46
+
учётные данные нельзя повторно отправлять по тому же токену, а у локальных сред выполнения нет
47
+
удалённого ключа.
48
+
44
49
## 1. Вход через ChatGPT (forward / passthrough)
45
50
46
51
Провайдеру `openai`**не нужен API-ключ**. Direct пересылает учётные данные вашего существующего
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/ru/reference/adapters.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,10 @@ interface ProviderAdapter {
48
48
запроса и стримит ответ обратно **без преобразования**.
49
49
**Аутентификация:**`forward` (ретрансляция заголовков вызывающей стороны) или `key`.
50
50
51
+
При `key`-аутентификации [`retryOn429`](/ru/reference/configuration/) действует и здесь: 429 до
52
+
начала потока ждёт и повторяет идентичный запрос на том же ключе, как и в переводимом пути
53
+
`openai-chat`/Anthropic. Пользовательские транспорты `runTurn` в цикл HTTP-повторов не входят.
54
+
51
55
- URL для `forward` → `{baseUrl}/responses`. Провайдер с `key` по умолчанию сохраняет прежнее построение `{baseUrl}/v1/responses`.
52
56
- Провайдер с `key` может задать проверенный относительный `responsesPath`: адаптер удаляет один завершающий `/` из `baseUrl` и отправляет запрос на `{trimmedBaseUrl}{responsesPath}`. Для Ark Agent Plan используйте `baseUrl: "https://ark.cn-beijing.volces.com/api/plan/v3"` и `responsesPath: "/responses"`.
53
57
- В режиме `forward` ретранслируется только безопасный allowlist заголовков (`FORWARD_HEADERS`):
0 commit comments