From 13799b5058e5622172a05637d8ccc6603b4335c8 Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Sun, 26 Apr 2026 22:06:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=20modelType=20=E4=BB=8E=20open?= =?UTF-8?q?ai-responses=20=E6=94=B9=E4=B8=BA=20codex=20=E5=B9=B6=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E6=9E=9A=E4=B8=BE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- src/components/ConsoleOAuthFlow.tsx | 2 +- src/utils/settings/types.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ConsoleOAuthFlow.tsx b/src/components/ConsoleOAuthFlow.tsx index 236834401..1270f84e9 100644 --- a/src/components/ConsoleOAuthFlow.tsx +++ b/src/components/ConsoleOAuthFlow.tsx @@ -372,7 +372,7 @@ export function ConsoleOAuthFlow({ CODEX_LOGIN_METHOD: 'chatgpt_subscription', } updateSettingsForSource('userSettings', { - modelType: 'openai-responses' as any, + modelType: 'codex', env, } as any) for (const [key, value] of Object.entries(env)) { diff --git a/src/utils/settings/types.ts b/src/utils/settings/types.ts index e7b0bbfb5..520cbd5ea 100644 --- a/src/utils/settings/types.ts +++ b/src/utils/settings/types.ts @@ -369,11 +369,11 @@ export const SettingsSchema = lazySchema(() => .optional() .describe('Tool usage permissions configuration'), modelType: z - .enum(['anthropic', 'openai', 'gemini', 'grok']) + .enum(['anthropic', 'openai', 'gemini', 'grok', 'codex']) .optional() .describe( - 'API provider type. "anthropic" uses the Anthropic API (default), "openai" uses the OpenAI Chat Completions API, "gemini" uses the Gemini API, and "grok" uses the xAI Grok API (OpenAI-compatible). ' + - 'When set to "openai", configure OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL. When set to "gemini", configure GEMINI_API_KEY and optional GEMINI_BASE_URL. When set to "grok", configure GROK_API_KEY (or XAI_API_KEY), optional GROK_BASE_URL, GROK_MODEL, and GROK_MODEL_MAP.', + 'API provider type. "anthropic" uses the Anthropic API (default), "openai" uses the OpenAI Chat Completions API, "gemini" uses the Gemini API, "grok" uses the xAI Grok API (OpenAI-compatible), and "codex" uses the OpenAI Responses API via ChatGPT subscription or API key. ' + + 'When set to "openai", configure OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL. When set to "gemini", configure GEMINI_API_KEY and optional GEMINI_BASE_URL. When set to "grok", configure GROK_API_KEY (or XAI_API_KEY), optional GROK_BASE_URL, GROK_MODEL, and GROK_MODEL_MAP. When set to "codex", configure CODEX_API_KEY and optional CODEX_BASE_URL.', ), model: z .string()