From 273cc48c57c8918c1a937b8522cfb4351593feaa Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 25 Jun 2026 22:17:11 +0800 Subject: [PATCH] feat(codex): use native Responses API for CN providers that support it Several Chinese providers now expose a native OpenAI Responses API endpoint, so Codex can reach them directly without the Responses->Chat route-takeover conversion. Switch these presets to apiFormat "openai_responses" and drop the now-unused codexChatReasoning and modelCatalog (removing modelCatalog also keeps the "local route mapping" toggle unchecked by default): - Qwen / DashScope Bailian (/compatible-mode/v1/responses) - Xiaomi MiMo + Token Plan (api.xiaomimimo.com/v1) - Volcengine Doubao (/api/v3/responses) - Meituan LongCat (/openai/v1) - MiniMax CN + intl (/v1/responses, confirmed in the official API reference) SiliconFlow-hosted MiniMax stays openai_chat (third-party endpoint, not MiniMax's own base_url). Also refresh stale model ids on the remaining chat-only providers: GLM 5.1->5.2, StepFun 3.5-flash-2603->3.7-flash, Ling 2.5-1T->2.6-1T. --- src/config/codexProviderPresets.ts | 142 ++++++++--------------------- 1 file changed, 37 insertions(+), 105 deletions(-) diff --git a/src/config/codexProviderPresets.ts b/src/config/codexProviderPresets.ts index da3398d67..1766615ac 100644 --- a/src/config/codexProviderPresets.ts +++ b/src/config/codexProviderPresets.ts @@ -202,14 +202,8 @@ export const codexProviderPresets: CodexProviderPreset[] = [ "doubao-seed-2-1-pro", ), endpointCandidates: ["https://ark.cn-beijing.volces.com/api/v3"], - apiFormat: "openai_chat", - modelCatalog: modelCatalog([ - { - model: "doubao-seed-2-1-pro", - displayName: "Doubao Seed 2.1 Pro", - contextWindow: 256000, - }, - ]), + // 火山方舟主数据面 /api/v3 原生支持 Responses API(/api/v3/responses),无需路由接管转换 + apiFormat: "openai_responses", category: "cn_official", isPartner: true, partnerPromotionKey: "doubaoseed", @@ -320,12 +314,12 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "zhipu_glm", "https://open.bigmodel.cn/api/coding/paas/v4", - "glm-5.1", + "glm-5.2", ), endpointCandidates: ["https://open.bigmodel.cn/api/coding/paas/v4"], apiFormat: "openai_chat", modelCatalog: modelCatalog([ - { model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 }, + { model: "glm-5.2", displayName: "GLM-5.2", contextWindow: 200000 }, ]), codexChatReasoning: { supportsThinking: true, @@ -346,12 +340,12 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "zhipu_glm_en", "https://api.z.ai/api/coding/paas/v4", - "glm-5.1", + "glm-5.2", ), endpointCandidates: ["https://api.z.ai/api/coding/paas/v4"], apiFormat: "openai_chat", modelCatalog: modelCatalog([ - { model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 }, + { model: "glm-5.2", displayName: "GLM-5.2", contextWindow: 200000 }, ]), codexChatReasoning: { supportsThinking: true, @@ -399,22 +393,8 @@ requires_openai_auth = true`, "qwen3-coder-plus", ), endpointCandidates: ["https://dashscope.aliyuncs.com/compatible-mode/v1"], - apiFormat: "openai_chat", - modelCatalog: modelCatalog([ - { - model: "qwen3-coder-plus", - displayName: "Qwen3 Coder Plus", - contextWindow: 1000000, - }, - { model: "qwen3-max", displayName: "Qwen3 Max", contextWindow: 262144 }, - ]), - codexChatReasoning: { - supportsThinking: true, - supportsEffort: false, - thinkingParam: "enable_thinking", - effortParam: "none", - outputFormat: "reasoning_content", - }, + // 阿里百炼 DashScope 原生支持 OpenAI Responses API(/compatible-mode/v1/responses,同一 base_url),无需路由接管转换 + apiFormat: "openai_responses", category: "cn_official", icon: "bailian", iconColor: "#624AFF", @@ -489,11 +469,16 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "stepfun", "https://api.stepfun.com/step_plan/v1", - "step-3.5-flash-2603", + "step-3.7-flash", ), endpointCandidates: ["https://api.stepfun.com/step_plan/v1"], apiFormat: "openai_chat", modelCatalog: modelCatalog([ + { + model: "step-3.7-flash", + displayName: "Step 3.7 Flash", + contextWindow: 262144, + }, { model: "step-3.5-flash-2603", displayName: "Step 3.5 Flash 2603", @@ -517,11 +502,16 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "stepfun_en", "https://api.stepfun.ai/step_plan/v1", - "step-3.5-flash-2603", + "step-3.7-flash", ), endpointCandidates: ["https://api.stepfun.ai/step_plan/v1"], apiFormat: "openai_chat", modelCatalog: modelCatalog([ + { + model: "step-3.7-flash", + displayName: "Step 3.7 Flash", + contextWindow: 262144, + }, { model: "step-3.5-flash-2603", displayName: "Step 3.5 Flash 2603", @@ -575,17 +565,11 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "longcat", "https://api.longcat.chat/openai/v1", - "LongCat-Flash-Chat", + "LongCat-2.0-Preview", ), endpointCandidates: ["https://api.longcat.chat/openai/v1"], - apiFormat: "openai_chat", - modelCatalog: modelCatalog([ - { - model: "LongCat-Flash-Chat", - displayName: "LongCat Flash Chat", - contextWindow: 262144, - }, - ]), + // 美团 LongCat 官方 Codex 文档用 wire_api=responses 对自家 base_url,原生 Responses,无需路由接管转换 + apiFormat: "openai_responses", category: "cn_official", icon: "longcat", iconColor: "#29E154", @@ -598,24 +582,11 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "minimax", "https://api.minimaxi.com/v1", - "MiniMax-M2.7", + "MiniMax-M3", ), endpointCandidates: ["https://api.minimaxi.com/v1"], - apiFormat: "openai_chat", - modelCatalog: modelCatalog([ - { - model: "MiniMax-M2.7", - displayName: "MiniMax M2.7", - contextWindow: 200000, - }, - ]), - codexChatReasoning: { - supportsThinking: true, - supportsEffort: false, - thinkingParam: "reasoning_split", - effortParam: "none", - outputFormat: "reasoning_details", - }, + // MiniMax 官方 API 参考已列 /v1/responses 为正式端点(CN/intl 双区,POST /v1/responses),原生 Responses,无需路由接管转换 + apiFormat: "openai_responses", category: "cn_official", partnerPromotionKey: "minimax_cn", theme: { @@ -633,24 +604,11 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "minimax_en", "https://api.minimax.io/v1", - "MiniMax-M2.7", + "MiniMax-M3", ), endpointCandidates: ["https://api.minimax.io/v1"], - apiFormat: "openai_chat", - modelCatalog: modelCatalog([ - { - model: "MiniMax-M2.7", - displayName: "MiniMax M2.7", - contextWindow: 200000, - }, - ]), - codexChatReasoning: { - supportsThinking: true, - supportsEffort: false, - thinkingParam: "reasoning_split", - effortParam: "none", - outputFormat: "reasoning_details", - }, + // MiniMax 官方 API 参考已列 /v1/responses 为正式端点(CN/intl 双区,POST /v1/responses),原生 Responses,无需路由接管转换 + apiFormat: "openai_responses", category: "cn_official", partnerPromotionKey: "minimax_en", theme: { @@ -668,15 +626,15 @@ requires_openai_auth = true`, config: generateThirdPartyConfig( "bailing", "https://api.tbox.cn/api/llm/v1", - "Ling-2.5-1T", + "Ling-2.6-1T", ), endpointCandidates: ["https://api.tbox.cn/api/llm/v1"], apiFormat: "openai_chat", modelCatalog: modelCatalog([ { - model: "Ling-2.5-1T", - displayName: "Ling-2.5-1T", - contextWindow: 131072, + model: "Ling-2.6-1T", + displayName: "Ling-2.6-1T", + contextWindow: 262144, }, ]), category: "cn_official", @@ -692,21 +650,8 @@ requires_openai_auth = true`, "mimo-v2.5-pro", ), endpointCandidates: ["https://api.xiaomimimo.com/v1"], - apiFormat: "openai_chat", - modelCatalog: modelCatalog([ - { - model: "mimo-v2.5-pro", - displayName: "MiMo V2.5 Pro", - contextWindow: 1048576, - }, - ]), - codexChatReasoning: { - supportsThinking: true, - supportsEffort: false, - thinkingParam: "thinking", - effortParam: "none", - outputFormat: "reasoning_content", - }, + // 小米 MiMo 官方 Codex 文档已声明原生支持 Responses API(wire_api=responses 对自家 base_url),无需路由接管转换 + apiFormat: "openai_responses", category: "cn_official", icon: "xiaomimimo", iconColor: "#000000", @@ -722,21 +667,8 @@ requires_openai_auth = true`, "mimo-v2.5-pro", ), endpointCandidates: ["https://token-plan-cn.xiaomimimo.com/v1"], - apiFormat: "openai_chat", - modelCatalog: modelCatalog([ - { - model: "mimo-v2.5-pro", - displayName: "MiMo V2.5 Pro", - contextWindow: 1048576, - }, - ]), - codexChatReasoning: { - supportsThinking: true, - supportsEffort: false, - thinkingParam: "thinking", - effortParam: "none", - outputFormat: "reasoning_content", - }, + // 小米 MiMo 官方 Codex 文档已声明原生支持 Responses API(wire_api=responses 对自家 base_url),无需路由接管转换 + apiFormat: "openai_responses", category: "cn_official", icon: "xiaomimimo", iconColor: "#000000",