Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,59 @@ The API route publishes 1,050,000 context / 922,000 max input metadata. Its
`sol-pro`, `terra-pro`, and `luna-pro` virtual ids keep their selected public identity while the wire
uses the base model plus `reasoning.mode: "pro"`.

## GPT-5.6 Pro through standard ChatGPT (experimental)

`chatgpt-browser/gpt-5.6-pro` is an explicit opt-in route through a signed-in **standard ChatGPT**
conversation. It never calls the Codex/Work backend or OpenAI API and never falls back to another
model or account. OpenAI documents GPT-5.6 Pro under standard ChatGPT's existing Pro/model
allowance, separately from the agentic pool shared by Codex and Work. See OpenAI's
[GPT-5.6 in ChatGPT](https://help.openai.com/en/articles/20001354-gpt-56-in-chatgpt) and
[Codex plan limits](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan).

The adapter delegates visible browser login, strict Pro selection, submission, and final-response
capture to [Oracle](https://github.com/steipete/oracle) 0.16.1 or newer:

```bash
npm install -g @steipete/oracle@^0.16.1

# One-time browser-profile setup. Sign in if Oracle opens an unauthenticated window, then rerun.
oracle --engine browser --browser-manual-login --browser-keep-browser \
--model gpt-5.5-pro --browser-thinking-time extended --wait -p "Reply only OK."

ocx provider add chatgpt-browser --sync
codex -m chatgpt-browser/gpt-5.6-pro
```

`gpt-5.5-pro` above is Oracle's stable alias for the current ChatGPT **Pro** picker entry; the
OpenCodex-facing selector remains `gpt-5.6-pro`. The adapter forces browser mode, the standard
`https://chatgpt.com/` surface, explicit model selection, and Pro effort confirmation before
submission. Missing login, ineligible access, allowance exhaustion, model-picker drift, and capture
failure are returned as distinct errors with no fallback or automatic retry.

This is a `runTurn` adapter: it serializes the Responses conversation and client tools into a
nonce-bound JSON protocol, waits for Oracle's captured result, then emits either final Markdown or
one validated client tool call. Prose-only tool-schema annotations are compacted while callable
names, JSON types, properties, enums, and required fields remain available. OpenCodex also retains
`previous_response_id` state despite Codex's `store:false`, allowing tool results to continue in a
fresh one-shot browser chat. Hosted web search and the OpenAI vision sidecar are deliberately disabled
so this route cannot spend Codex/Work allowance. Image input is not supported.

Browser failures are resolved before OpenCodex commits a streaming HTTP response. This prevents
Codex from treating a failed 200 stream as disconnected and automatically submitting another regular
Pro message. Because response headers wait for the first meaningful Oracle event, unusually long
browser turns depend on the invoking client's header-wait tolerance.

Set `providers.chatgpt-browser.oracleCommand` or `OPENCODEX_ORACLE_COMMAND` when `oracle` is not on
`PATH`. The value is an executable path/name, not a shell command. `ocx provider test
chatgpt-browser` checks the executable and minimum version without spending a Pro message; browser
login, eligibility, and quota remain fail-closed checks on the first real turn.

:::caution[Experimental browser automation]
This integration depends on ChatGPT's web UI and may break when that UI changes. Review OpenAI's
current terms and your organization policies before enabling it. Oracle stores its own local session
artifacts and browser-profile state; protect them like other authenticated application data.
:::

If the built-in `openai` provider is missing or disabled, the dashboard Accounts picker and Codex
Auth page can restore it: absent rows are created from the canonical preset, disabled canonical
rows are re-enabled without replacing saved mode or model settings, and noncanonical `openai`
Expand Down Expand Up @@ -185,7 +238,7 @@ selectors, then retry. Signing in from a machine with no existing `kiro-cli` ses

## 3. API-key catalog

opencodex ships 53 built-in presets: 42 key-based, seven OAuth, three local, and the default
opencodex ships 61 built-in presets: 49 key-based, seven OAuth, four local, and the default
ChatGPT-forward preset. The dashboard's **Add provider** picker opens a key provider's dashboard,
validates the key, and stores it. Notable entries:

Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/ja/reference/adapters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: アダプター
description: 7つのプロバイダーアダプターの対象、リクエスト構成方式、固有の動作。
description: 8つのプロバイダーアダプターの対象、リクエスト構成方式、固有の動作。
---

**アダプター**は opencodex の内部リクエスト/レスポンスモデルとプロバイダーの wire 形式の間を変換します。すべてのアダプターは `ProviderAdapter` インターフェース(`src/adapters/base.ts`)を実装します。
Expand Down
6 changes: 3 additions & 3 deletions docs-site/src/content/docs/ja/reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ src/
├── server/ # Bun.serve, /v1/* proxy, /api/* management API, WS bridge
├── codex/ # Codex config injection, catalog sync, auth/account integration
├── providers/ # provider metadata, API-key pool, quota and labels
├── adapters/ # 7つの wire adapter, 共通 guard/util, Cursor protobuf transport
├── adapters/ # 8つの wire adapter, 共通 guard/util, runTurn transport
├── oauth/ # OAuth providers, API-key catalog, token store/refresh
├── usage/ # usage extraction, JSONL logs, summaries, totals
├── lib/ # runtime, process, retry, privacy, token estimate helpers
Expand Down Expand Up @@ -51,8 +51,8 @@ HTTP の境界は `server/index.ts` が担い、Responses データプレーン
2. `server/responses/core.ts` が展開し JSON を読みます。覚えておいた `previous_response_id` 入力があれば展開したのち `responses/parser.ts` に渡します。
3. `router.ts` が通常のモデル id または `provider/model` id を解決します。続いて Codex アカウント affinity を決定し、必要ならプロバイダー OAuth を更新して選択された認証情報を route に適用します。
4. 本リクエストの前に `vision/` が `noVisionModels` モデル用の画像説明を作ります。安全なサイドカー経路がないときはテキスト専用の上流に画像を送らず取り除きます。
5. `server/adapter-resolve.ts` がモデル別の wire override を適用し、7つのアダプターのいずれかを作ります
Responses passthrough は元の body を中継し、Cursor は双方向 `runTurn` transport を使い、
5. `server/adapter-resolve.ts` がモデル別の wire override を適用し、8つのアダプターのいずれかを作ります
Responses passthrough は元の body を中継し、Cursor と ChatGPT Browser は `runTurn` transport を使い、
残りの変換型アダプターは上流リクエストを build/fetch/parse します。
6. ルーティングモデルがホステッド `web_search` を要求すると `web-search/` が合成関数を公開します。実際の検索は ChatGPT サイドカーで実行し、結果をルーティングモデルに戻し、設定された回数の中で繰り返します。
7. `bridge.ts` が Responses SSE または JSON を作ります。`server/request-log.ts` と `usage/` はレスポンスに触れずに終了ステータス、レイテンシー、プロバイダー/モデル、最善推定トークン使用量を記録します。
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/ko/reference/adapters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 어댑터
description: 7가지 프로바이더 어댑터의 대상, 요청 구성 방식, 고유 동작.
description: 8가지 프로바이더 어댑터의 대상, 요청 구성 방식, 고유 동작.
---

**어댑터**는 opencodex의 내부 요청/응답 모델과 프로바이더 wire 형식 사이를 변환합니다. 모든
Expand Down
6 changes: 3 additions & 3 deletions docs-site/src/content/docs/ko/reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ src/
├── server/ # Bun.serve, /v1/* proxy, /api/* management API, WS bridge
├── codex/ # Codex config injection, catalog sync, auth/account integration
├── providers/ # provider metadata, API-key pool, quota and labels
├── adapters/ # 7개 wire adapter, 공통 guard/util, Cursor protobuf transport
├── adapters/ # 8개 wire adapter, 공통 guard/util, runTurn transport
├── oauth/ # OAuth providers, API-key catalog, token store/refresh
├── usage/ # usage extraction, JSONL logs, summaries, totals
├── lib/ # runtime, process, retry, privacy, token estimate helpers
Expand Down Expand Up @@ -56,8 +56,8 @@ HTTP 경계는 `server/index.ts`가 맡고, Responses 데이터 플레인은 `se
결정하고, 필요하면 프로바이더 OAuth를 갱신해 선택된 자격 증명을 route에 적용합니다.
4. 본 요청 전에 `vision/`이 `noVisionModels` 모델용 이미지 설명을 만듭니다. 안전한 사이드카 경로가
없으면 텍스트 전용 업스트림에 이미지를 보내지 않고 제거합니다.
5. `server/adapter-resolve.ts`가 모델별 wire override를 적용하고 7개 어댑터 중 하나를 만듭니다.
Responses passthrough는 원본 body를 중계하고, Cursor는 양방향 `runTurn` transport를 사용하며,
5. `server/adapter-resolve.ts`가 모델별 wire override를 적용하고 8개 어댑터 중 하나를 만듭니다.
Responses passthrough는 원본 body를 중계하고, Cursor와 ChatGPT Browser는 `runTurn` transport를 사용하며,
나머지 변환형 어댑터는 업스트림 요청을 build/fetch/parse합니다.
6. 라우팅 모델이 호스티드 `web_search`를 요청하면 `web-search/`가 합성 함수를 노출합니다. 실제 검색은
ChatGPT 사이드카로 실행하고 결과를 라우팅 모델에 다시 넣으며, 설정된 횟수 안에서 반복합니다.
Expand Down
27 changes: 26 additions & 1 deletion docs-site/src/content/docs/reference/adapters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Adapters
description: The seven provider adapters — what each targets, how it builds requests, and its quirks.
description: The eight provider adapters — what each targets, how it builds requests, and its quirks.
---

An **adapter** translates between opencodex's internal request/response model and one provider wire
Expand Down Expand Up @@ -173,6 +173,31 @@ advertised effort control on those models as proof of upstream-native reasoning
broader built-in executor and bypasses Codex approval/sandbox semantics, and legacy
`unsafeAllowNativeLocalExec: true` remains equivalent only when `nativeLocalExec` is unset.

## `chatgpt-browser` (experimental)

**Targets:** the standard `https://chatgpt.com/` conversation UI with the visible Pro option.
**Auth:** a local signed-in Chrome session managed by Oracle; no API key or Codex bearer is sent.

- Uses `runTurn` and requires `@steipete/oracle` 0.16.1 or newer. Oracle is spawned without a shell;
the request travels on stdin and the final answer is read from a fresh private temporary file.
- Invokes Oracle's stable current-Pro alias with explicit browser mode, standard ChatGPT URL, model
selection, and strict Pro effort confirmation. Wrong/unavailable model, login/session failure,
Pro allowance exhaustion, timeout, and missing/incompatible Oracle are distinct fail-closed errors.
- Wraps the full Responses conversation and callable client tools in a nonce-bound JSON protocol.
Tool names and validation-relevant JSON Schema are preserved while prose-only annotations are
compacted so large Codex plugin inventories remain within the browser context window.
- The visible ChatGPT composer receives that envelope as one user message. System and developer
labels inside it are advisory text, not transport-level roles, so this experimental adapter does
not provide the instruction-authority isolation of a native Responses API transport. Treat
untrusted repository or user content as prompt-injection-capable on this route.
A reply becomes either final Markdown or one validated function/custom/tool-search call; unknown
tools, bad nonces, malformed JSON, and invalid required-tool responses fail closed.
- Retains local `previous_response_id` replay even when Codex sends `store:false`. For streaming
requests, it waits for the first meaningful browser event before committing response headers so a
capture failure becomes one non-retryable HTTP error instead of an automatic duplicate submission.
- Advertises text-only input with no effort picker, hosted search, parallel tool calls, or vision
sidecar. This keeps the route isolated from the Codex/Work agentic allowance.

## `azure-openai` (alias: `azure`)

**Targets:** **Azure OpenAI**. Wraps `openai-responses` (so also `passthrough: true`).
Expand Down
6 changes: 3 additions & 3 deletions docs-site/src/content/docs/reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ src/
├── server/ # Bun.serve, /v1/* proxy, /api/* management API, WS bridge
├── codex/ # Codex config injection, catalog sync, auth/account integration
├── providers/ # provider metadata, API-key pool, quota and labels
├── adapters/ # seven wire adapters, shared guards/utilities, Cursor protobuf transport
├── adapters/ # eight wire adapters, shared guards/utilities, runTurn transports
├── oauth/ # OAuth providers, API-key catalog, token store/refresh
├── usage/ # request usage extraction, JSONL logs, summaries, totals
├── lib/ # runtime, process, retry, privacy, token estimate helpers
Expand Down Expand Up @@ -59,8 +59,8 @@ the `server/responses.ts` facade and its `server/responses/*.ts` modules:
4. Before the main call, `vision/` describes images for models in `noVisionModels`; if no safe
sidecar path exists, images are removed rather than sent to a text-only upstream.
5. `server/adapter-resolve.ts` applies any model-specific wire override and constructs one of the
seven adapters. Responses passthrough relays the native body, Cursor runs its bidirectional
`runTurn` transport, and translated adapters build/fetch/parse an upstream request.
eight adapters. Responses passthrough relays the native body, Cursor and ChatGPT Browser use
`runTurn` transports, and translated adapters build/fetch/parse an upstream request.
6. For routed models with a hosted `web_search` tool, `web-search/` exposes a synthetic function,
executes the real search through the ChatGPT sidecar, feeds results back to the routed model, and
repeats within the configured loop limit.
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ or bind the forward explicitly to loopback (`ssh -L 127.0.0.1:20100:localhost:10

| Field | Type | Meaning |
| --- | --- | --- |
| `adapter` | `string` | One of `openai-chat`, `openai-responses`, `anthropic`, `google`, `kiro`, `cursor`, `azure-openai` (or alias `azure`). |
| `adapter` | `string` | One of `openai-chat`, `openai-responses`, `anthropic`, `google`, `kiro`, `cursor`, `chatgpt-browser`, `azure-openai` (or alias `azure`). |
| `baseUrl` | `string` | Upstream API base URL. Most built-in fixed endpoints ignore a mismatch; newly promoted collision-safe key presets preserve an older same-named custom destination. See [Fixed provider endpoints](#fixed-provider-endpoints). |
| `oracleCommand?` | `string` | **`chatgpt-browser` only.** Oracle executable path/name. Defaults to `OPENCODEX_ORACLE_COMMAND`, then `oracle`; it is executed directly without a shell. Requires Oracle 0.16.1+. |
| `responsesPath?` | `string` | Optional relative resource path for key-auth `openai-responses` requests. It must start with `/` and contain no URL scheme, query, or fragment. When omitted, the adapter keeps its legacy `/v1/responses` URL construction. |
| `disabled?` | `boolean` | Keep the provider on disk but exclude it from routing and model/catalog listings. |
| `apiKey?` | `string` | API key, or an `${ENV_VAR}` / `$ENV_VAR` reference resolved at request time. |
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/ru/reference/adapters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Адаптеры
description: Семь адаптеров провайдеров — назначение каждого, способ построения запросов и особенности.
description: Восемь адаптеров провайдеров — назначение каждого, способ построения запросов и особенности.
---

**Адаптер** выполняет преобразование между внутренней моделью запросов/ответов opencodex и
Expand Down
6 changes: 3 additions & 3 deletions docs-site/src/content/docs/ru/reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ src/
├── server/ # Bun.serve, /v1/* proxy, /api/* management API, WS bridge
├── codex/ # Codex config injection, catalog sync, auth/account integration
├── providers/ # provider metadata, API-key pool, quota and labels
├── adapters/ # seven wire adapters, shared guards/utilities, Cursor protobuf transport
├── adapters/ # eight wire adapters, shared guards/utilities, runTurn transports
├── oauth/ # OAuth providers, API-key catalog, token store/refresh
├── usage/ # request usage extraction, JSONL logs, summaries, totals
├── lib/ # runtime, process, retry, privacy, token estimate helpers
Expand Down Expand Up @@ -63,8 +63,8 @@ src/
безопасного пути через сайдкар нет, изображения удаляются, а не отправляются текстовому
вышестоящему провайдеру.
5. `server/adapter-resolve.ts` применяет переопределение wire-формата для конкретной модели и
конструирует один из семи адаптеров. Passthrough Responses ретранслирует нативное тело, Cursor
запускает свой двунаправленный транспорт `runTurn`, а транслирующие адаптеры выполняют
конструирует один из восьми адаптеров. Passthrough Responses ретранслирует нативное тело, Cursor
и ChatGPT Browser запускают транспорт `runTurn`, а транслирующие адаптеры выполняют
build/fetch/parse запроса к вышестоящему провайдеру.
6. Для маршрутизируемых моделей с hosted-инструментом `web_search` модуль `web-search/`
предоставляет синтетическую функцию, выполняет настоящий поиск через сайдкар ChatGPT,
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/zh-cn/reference/adapters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Adapters
description: 七个 provider adapter 的目标、请求构建方式与各自特性。
description: 八个 provider adapter 的目标、请求构建方式与各自特性。
---

**adapter** 负责在 opencodex 的内部请求/响应模型与某个 provider 的 wire 格式之间转换。每个
Expand Down
Loading
Loading