+
+
+
+ Custom API endpoint
+
+
+ Route Codex API-key launches through an app-managed custom provider.
+
+
+
+
+ {codexCustomProviderPersistedEnabled ? 'enabled' : 'off'}
+
+ {codexCustomProviderPersistedEnabled ? (
+
+ {codexCustomProviderActive ? 'active' : 'inactive'}
+
+ ) : null}
+
+
+
+
+ {
+ setCodexCustomProviderEnabled(checked === true);
+ setCodexCustomProviderError(null);
+ setCodexCustomProviderStatus(null);
+ }}
+ />
+
+ Enable custom endpoint for Codex API-key launches
+
+
+
+
+
+
+
+ API key
+
+ {
+ setCodexCustomProviderApiKeyValue(event.currentTarget.value);
+ setCodexCustomProviderError(null);
+ setCodexCustomProviderStatus(null);
+ }}
+ placeholder={
+ codexCustomProviderApiKeyConfigured
+ ? 'Keep saved OPENAI_API_KEY'
+ : apiKeyConfig?.placeholder
+ }
+ className="h-9 text-sm"
+ disabled={connectionBusy || apiKeySaving}
+ />
+
+
+
+
+ API key:{' '}
+ {codexCustomProviderApiKeyConfigured
+ ? t('providerRuntime.status.configured')
+ : t('providerRuntime.status.notSet')}
+
+ {codexCustomProviderApiKeyStatus ? (
+
+ {codexCustomProviderApiKeyStatus}
+
+ ) : null}
+ {codexCustomProviderPersistedEnabled && codexCustomProvider?.baseUrl ? (
+
+ {codexCustomProvider.baseUrl}
+
+ ) : null}
+
+
+
+
+
+ Endpoint must support the Codex Responses API. Chat Completions-only
+ gateways may fail at launch or model probe time.
+
+
+
+ {codexCustomProviderError ? (
+
+
+
{codexCustomProviderError}
+
+ ) : codexCustomProviderStatus ? (
+
+ {codexCustomProviderStatus}
+
+ ) : codexCustomProviderIssueMessage ||
+ codexCustomProviderInactiveMessage ||
+ (codexCustomProviderPersistedEnabled &&
+ !codexCustomProviderApiKeyConfigured) ? (
+
+
+
+ {codexCustomProviderIssueMessage ??
+ codexCustomProviderInactiveMessage ??
+ 'Custom endpoint is enabled, but no OPENAI_API_KEY is configured.'}
+
+
+ ) : null}
+
+
+ {codexCustomProviderPersistedEnabled ? (
+ void handleDisableCodexCustomProvider()}
+ >
+ {t('providerRuntime.actions.disable')}
+
+ ) : null}
+ void handleSaveCodexCustomProvider()}
+ >
+ {connectionSaving && pendingConnectionAction === 'codex-custom-provider' ? (
+
+ ) : (
+
+ )}
+ Save endpoint
+
+
+
+ ) : null}
+