Files
OmniRoute/src/mitm/targets/codex.ts
Hernan Javier Ardila Sanchez fd26e601a2 fix(dashboard): use lightweight ping endpoint for MaintenanceBanner (fixes #3040) (#3043)
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!
2026-06-01 14:30:17 -03:00

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",
};