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
Merge PR #551 after current-head verification.\n\nEvidence:\n- head f51b64a is based on dev 261abb7\n- bun test tests/server-images.test.ts: 28 pass / 0 fail\n- bun x tsc --noEmit: pass\n- bun run privacy:scan: pass\n- git diff --check origin/dev...HEAD: pass\n- pre-push equivalent gate on local same-behavior patch: root tests 5066 pass / 0 fail, GUI lint pass, React Doctor no issues\n\nThe stale CHANGES_REQUESTED review named blockers that are now fixed on the current head.
|`webSearchSidecar?`|`OcxWebSearchSidecarConfig`| on | Web-search sidecar options (see below). |
64
64
|`visionSidecar?`|`OcxVisionSidecarConfig`| on | Vision sidecar options (see below). |
65
+
|`images?`|`OcxImagesConfig`| automatic OpenAI selection | Standalone Images relay options for Codex's built-in `image_gen` tool (see below). |
65
66
|`tokenGuardian?`|`OcxTokenGuardianConfig`| off | Optional proactive OAuth refresh and Codex-account warmup policy; fields are listed below. |
66
67
|`corsAllowOrigins?`|`string[]`|`[]`| Additional exact origins allowed by CORS. Loopback origins are always allowed. |
67
68
@@ -419,6 +420,17 @@ with those explicit additions, or set it to `false` to expose only `models`.
419
420
420
421
## Sidecars
421
422
423
+
### `images` (`OcxImagesConfig`)
424
+
425
+
| Field | Type | Default | Meaning |
426
+
| --- | --- | --- | --- |
427
+
|`provider?`|`string`| automatic OpenAI selection | Explicit custom API-key `openai-responses` provider for `/v1/images/generations` and `/v1/images/edits`. Registry-managed ids are rejected; omit this field to use the built-in ChatGPT/OpenAI fallback. |
428
+
|`timeoutMs?`|`number`|`300000`| Whole-request upstream timeout for one standalone Images request. |
429
+
430
+
Explicit provider selection fails closed when the provider is missing, disabled, incompatible, or
431
+
has no usable key. It never falls back to another paid upstream. The custom endpoint must implement
432
+
the OpenAI Images API paths and response shape expected by Codex.
Copy file name to clipboardExpand all lines: structure/01_runtime.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
|`src/lib/bun-runtime.ts`| Bundled-Bun resolution: `isRealBunBinary()` (size gate vs the ~450-byte placeholder stub), `bundledBunPath()`, `durableBunPath()` (path baked into service/shim artifacts). |
9
9
|`src/cli/index.ts`|`ocx` / `opencodex` CLI: init, start, stop, restore/eject, sync, status, login/logout, gui, service, update. After help/version early exits, ordinary commands run the bounded best-effort Codex-shim auto-restore policy before dispatch. Keeps the `#!/usr/bin/env bun` shebang for from-source dev (`bun run src/cli/index.ts`). |
10
10
|`src/server/index.ts`| Bun server entrypoint: `startServer`, `/v1/responses` HTTP + WebSocket routing, exact `POST /v1/images/generations` and `POST /v1/images/edits` routing, `/v1/models`, `/v1/*` JSON 404 guard, GUI fallback, and facade re-exports for split server modules. |
11
-
|`src/server/images.ts`| Standalone Images data plane: forward-provider selection, Codex account affinity, bounded opaque request relay, single-attempt upstream fetch, pool health recording, and safe response/cancellation relay. |
11
+
|`src/server/images.ts`| Standalone Images data plane: default OpenAI or explicit custom-provider selection, Codex account affinity, bounded opaque request relay, single-attempt upstream fetch, pool health recording, and safe response/cancellation relay. |
0 commit comments