mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-25 16:42:16 +03:00
Integrated into release/v3.8.8. Applied review fixes: moved the SELECT 1 into a pingDb() db helper (no raw SQL in route, Hard Rule #5) + the 503 catch no longer leaks err.message (Hard Rule #12). Thanks @herjarsa!
31 lines
948 B
TypeScript
31 lines
948 B
TypeScript
/**
|
|
* OpenAI Codex CLI — MITM target descriptor.
|
|
*/
|
|
import type { MitmTarget } from "../types";
|
|
|
|
export const CODEX_TARGET: MitmTarget = {
|
|
id: "codex",
|
|
name: "OpenAI Codex",
|
|
icon: "smart_toy",
|
|
color: "#F59E0B",
|
|
hosts: ["chatgpt.com"],
|
|
port: 443,
|
|
endpointPatterns: ["/backend-api/codex/chat/completions", "/v1/chat/completions"],
|
|
defaultModels: [
|
|
{ id: "gpt-4.1", name: "GPT-4.1", alias: "gpt-4.1" },
|
|
{ id: "gpt-4o-mini", name: "GPT-4o mini", alias: "gpt-4o-mini" },
|
|
],
|
|
setupTutorial: {
|
|
steps: [
|
|
"Install the OpenAI Codex CLI",
|
|
"Authenticate with your ChatGPT/Plus credentials",
|
|
"Enable DNS routing for this agent",
|
|
"Run `codex` — requests are now proxied via OmniRoute",
|
|
],
|
|
detection: { command: "which codex", platform: "all" },
|
|
},
|
|
handler: () =>
|
|
import("../handlers/codex").then((m) => ({ default: m.CodexHandler })),
|
|
riskNoticeKey: "providers.riskNotice.oauth",
|
|
};
|