diff --git a/docs-site/src/content/docs/guides/codex-integration.md b/docs-site/src/content/docs/guides/codex-integration.md index ae8aab96629..fd78c442a2d 100644 --- a/docs-site/src/content/docs/guides/codex-integration.md +++ b/docs-site/src/content/docs/guides/codex-integration.md @@ -1621,3 +1621,37 @@ The shared SSE decoder accepts LF, CRLF and standalone CR line endings, even whe Choosing an account-qualified model does not enable credit spending. Stored accounts obey **Use credits after limit** during authentication, when credentials are prepared, and before Responses HTTP or WebSocket dispatch after pacing or retry waits. A held request reports the credit policy, not an authentication failure; wait for the reset, choose another account, or explicitly enable that account’s credit spending. Stored-account vision and web-search helpers also recheck this policy before sending, including retries. If consent changes or a limit is reached after helper selection, the helper reports the policy refusal without sending that attempt. The standalone search relay returns a reset-bound 429. Caller-owned Direct credentials retain their existing behavior. + +## Opt in a custom provider to managed local routing + +A custom provider such as `chatgpt-http` may use `supports_websockets = false` +to keep HTTP transport. OpenCodex leaves custom providers untouched by default. +To delegate only that provider's URL to OpenCodex, run: + +```sh +ocx codex-provider allow chatgpt-http +ocx start +``` + +The first command explains the scope and asks for confirmation, defaulting to No. +For an explicitly approved scripted operation, use `allow chatgpt-http --yes`. +Consent applies to this provider ID in the selected `CODEX_HOME`; it does not +approve other providers or other homes. Start and sync update only its `base_url` +to the local proxy. Its identity, WebSocket setting, other TOML fields and history +remain unchanged. Keep the proxy running while using this route. + +This mode supports explicit Responses provider tables with `requires_openai_auth = true` +and no custom credentials or headers. Non-loopback targets, authless Desktop mode +and client compaction require the existing dedicated integration instead. + +`ocx stop` and `ocx restore` restore recorded URLs while keeping consent for a later +start. Run `ocx codex-provider status` to list approvals, or +`ocx codex-provider revoke chatgpt-http` to restore its managed URL and remove consent. +A URL changed outside OpenCodex is preserved and requires revoke followed by a new +approval; OpenCodex does not silently adopt the replacement as a new baseline. +The original URL assignment is retained in private recovery metadata under +`OPENCODEX_HOME`, separately from the native config journal. + +Startup safety recognizes an approved provider's recorded managed URL as OpenCodex routing. +This does not install restart protection: a manually started proxy still needs a viable +background service to recover automatically after a restart. diff --git a/docs-site/src/content/docs/reference/cli/lifecycle.md b/docs-site/src/content/docs/reference/cli/lifecycle.md index 1a8f7a509d1..bcf244d4269 100644 --- a/docs-site/src/content/docs/reference/cli/lifecycle.md +++ b/docs-site/src/content/docs/reference/cli/lifecycle.md @@ -1139,3 +1139,13 @@ Use `ocx connect --pairing-code-stdin`, `ocx connect status`, `ocx sync`, On Linux, `ocx service install` checks `loginctl show-user -p Linger` before printing boot advice. Enabled linger is reported as already enabled. Disabled linger gets the `loginctl enable-linger $USER` hint; missing or unreadable diagnostics state the uncertainty and do not fail installation. On macOS, `ocx service status` distinguishes a loaded Desktop login item from a valid enabled registration awaiting the next login. `ocx status` credits the latter in restart safety when the same Desktop app currently supervises the proxy. An incorrect plist label or command, a disabled entry, an unverified load probe, or changed process identity still cannot earn protection. + +## Custom Codex provider consent + +`ocx codex-provider status` lists the provider IDs approved for the selected Codex home. +`ocx codex-provider allow ` asks before allowing URL-only management on start/sync; +`--yes` is explicit noninteractive consent for that named provider. +`ocx codex-provider revoke ` restores an unchanged managed URL and revokes permission. +These commands are local and do not require a running proxy. See +[custom provider routing](/guides/codex-integration/#opt-in-a-custom-provider-to-managed-local-routing) +for eligibility, restore behavior and transport preservation. diff --git a/scripts/generate-ocx-skill-surface.ts b/scripts/generate-ocx-skill-surface.ts index 87558c27adc..474c741807b 100644 --- a/scripts/generate-ocx-skill-surface.ts +++ b/scripts/generate-ocx-skill-surface.ts @@ -16,7 +16,7 @@ const PREAMBLE = `\n