mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-12 18:22:48 +03:00
Add native ChatGPT Web provider for Codex clients (#8949)
* Bypass proxy compaction for native Codex context
* Add native ChatGPT Web provider pipeline
* Add managed browser and tunnel deployment
* Add ChatGPT Web setup and doctor UI
* Document and test ChatGPT Web integration
* fix(security): register chatgpt-web-codex-doctor in LOCAL_ONLY_API_PATTERNS
The diagnostic route under /api/providers/{id}/chatgpt-web-codex-doctor
was not registered in the spawn-capable route guard. Adding it for
parity with the existing /login pattern.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
* fix(providers): route chatgpt-web-codex admin routes through a service boundary
The provider CRUD/doctor routes imported chatgpt-web-codex helpers
(finalizeValidatedChatGptWebCodexSecrets, encode/decodeChatGptWebCodexSecrets,
getChatGptWebCodexDoctorStatus) directly from open-sse/executors/**, which
no-restricted-imports (EXECUTOR_IMPORT_RESTRICTION) forbids for src/app/**
files — executor implementations must stay behind an open-sse handler or
service boundary.
Add open-sse/services/chatgptWebCodexAdmin.ts as a thin re-export boundary
(mirroring the existing tokenRefresh.ts re-export pattern) and import from
there instead. No behavior change.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
---------
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
This commit is contained in:
@@ -329,6 +329,7 @@ const LOBE_PROVIDER_ALIASES = {
|
||||
"black-forest-labs": "Bfl",
|
||||
cerebras: "Cerebras",
|
||||
"chatgpt-web": "OpenAI",
|
||||
"chatgpt-web-codex": "OpenAI",
|
||||
claude: "ClaudeCode",
|
||||
"claude-web": "Claude",
|
||||
cline: "Cline",
|
||||
|
||||
@@ -3,6 +3,20 @@
|
||||
* Pure data literal; re-exported by the providers.ts barrel. No behavior change.
|
||||
*/
|
||||
export const WEB_COOKIE_PROVIDERS = {
|
||||
"chatgpt-web-codex": {
|
||||
id: "chatgpt-web-codex",
|
||||
alias: "cgpt-codex",
|
||||
name: "ChatGPT Web (Codex)",
|
||||
icon: "terminal",
|
||||
color: "#10A37F",
|
||||
textIcon: "CC",
|
||||
website: "https://chatgpt.com",
|
||||
authHint:
|
||||
"Paste the full ChatGPT Cookie header. OmniRoute verifies it in an isolated headless browser profile.",
|
||||
subscriptionRisk: true,
|
||||
riskNoticeVariant: "webCookie",
|
||||
toolCalling: "native",
|
||||
},
|
||||
"chatgpt-web": {
|
||||
id: "chatgpt-web",
|
||||
alias: "cgpt-web",
|
||||
|
||||
@@ -25,6 +25,13 @@ export type WebSessionCredentialRequirement =
|
||||
};
|
||||
|
||||
export const WEB_SESSION_CREDENTIAL_REQUIREMENTS = {
|
||||
"chatgpt-web-codex": {
|
||||
kind: "cookie",
|
||||
credentialName: "ChatGPT Cookie header (full)",
|
||||
placeholder: "__Secure-next-auth.session-token=...; cf_clearance=...",
|
||||
acceptsFullCookieHeader: true,
|
||||
storageKeys: ["cookie", "sessionToken", "session-token", "__Secure-next-auth.session-token"],
|
||||
},
|
||||
"zenmux-free": {
|
||||
kind: "cookie",
|
||||
credentialName: "Cookie header (full)",
|
||||
|
||||
@@ -611,6 +611,9 @@ export const validateProviderApiKeySchema = z
|
||||
baseUrl: z.string().trim().url().optional(),
|
||||
region: z.string().trim().max(64).optional(),
|
||||
cx: z.string().trim().max(500).optional(),
|
||||
runtimeKey: z.string().trim().max(65_536).optional(),
|
||||
tunnelId: z.string().trim().max(128).optional(),
|
||||
connectorName: z.string().trim().max(200).optional(),
|
||||
})
|
||||
.superRefine((data, ctx) => {
|
||||
if (data.provider === "google-pse-search" && !data.cx) {
|
||||
|
||||
Reference in New Issue
Block a user