mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
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.
This commit is contained in:
@@ -202,14 +202,8 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
|||||||
"doubao-seed-2-1-pro",
|
"doubao-seed-2-1-pro",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://ark.cn-beijing.volces.com/api/v3"],
|
endpointCandidates: ["https://ark.cn-beijing.volces.com/api/v3"],
|
||||||
apiFormat: "openai_chat",
|
// 火山方舟主数据面 /api/v3 原生支持 Responses API(/api/v3/responses),无需路由接管转换
|
||||||
modelCatalog: modelCatalog([
|
apiFormat: "openai_responses",
|
||||||
{
|
|
||||||
model: "doubao-seed-2-1-pro",
|
|
||||||
displayName: "Doubao Seed 2.1 Pro",
|
|
||||||
contextWindow: 256000,
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
isPartner: true,
|
isPartner: true,
|
||||||
partnerPromotionKey: "doubaoseed",
|
partnerPromotionKey: "doubaoseed",
|
||||||
@@ -320,12 +314,12 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"zhipu_glm",
|
"zhipu_glm",
|
||||||
"https://open.bigmodel.cn/api/coding/paas/v4",
|
"https://open.bigmodel.cn/api/coding/paas/v4",
|
||||||
"glm-5.1",
|
"glm-5.2",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://open.bigmodel.cn/api/coding/paas/v4"],
|
endpointCandidates: ["https://open.bigmodel.cn/api/coding/paas/v4"],
|
||||||
apiFormat: "openai_chat",
|
apiFormat: "openai_chat",
|
||||||
modelCatalog: modelCatalog([
|
modelCatalog: modelCatalog([
|
||||||
{ model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 },
|
{ model: "glm-5.2", displayName: "GLM-5.2", contextWindow: 200000 },
|
||||||
]),
|
]),
|
||||||
codexChatReasoning: {
|
codexChatReasoning: {
|
||||||
supportsThinking: true,
|
supportsThinking: true,
|
||||||
@@ -346,12 +340,12 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"zhipu_glm_en",
|
"zhipu_glm_en",
|
||||||
"https://api.z.ai/api/coding/paas/v4",
|
"https://api.z.ai/api/coding/paas/v4",
|
||||||
"glm-5.1",
|
"glm-5.2",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.z.ai/api/coding/paas/v4"],
|
endpointCandidates: ["https://api.z.ai/api/coding/paas/v4"],
|
||||||
apiFormat: "openai_chat",
|
apiFormat: "openai_chat",
|
||||||
modelCatalog: modelCatalog([
|
modelCatalog: modelCatalog([
|
||||||
{ model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 },
|
{ model: "glm-5.2", displayName: "GLM-5.2", contextWindow: 200000 },
|
||||||
]),
|
]),
|
||||||
codexChatReasoning: {
|
codexChatReasoning: {
|
||||||
supportsThinking: true,
|
supportsThinking: true,
|
||||||
@@ -399,22 +393,8 @@ requires_openai_auth = true`,
|
|||||||
"qwen3-coder-plus",
|
"qwen3-coder-plus",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://dashscope.aliyuncs.com/compatible-mode/v1"],
|
endpointCandidates: ["https://dashscope.aliyuncs.com/compatible-mode/v1"],
|
||||||
apiFormat: "openai_chat",
|
// 阿里百炼 DashScope 原生支持 OpenAI Responses API(/compatible-mode/v1/responses,同一 base_url),无需路由接管转换
|
||||||
modelCatalog: modelCatalog([
|
apiFormat: "openai_responses",
|
||||||
{
|
|
||||||
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",
|
|
||||||
},
|
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
icon: "bailian",
|
icon: "bailian",
|
||||||
iconColor: "#624AFF",
|
iconColor: "#624AFF",
|
||||||
@@ -489,11 +469,16 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"stepfun",
|
"stepfun",
|
||||||
"https://api.stepfun.com/step_plan/v1",
|
"https://api.stepfun.com/step_plan/v1",
|
||||||
"step-3.5-flash-2603",
|
"step-3.7-flash",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.stepfun.com/step_plan/v1"],
|
endpointCandidates: ["https://api.stepfun.com/step_plan/v1"],
|
||||||
apiFormat: "openai_chat",
|
apiFormat: "openai_chat",
|
||||||
modelCatalog: modelCatalog([
|
modelCatalog: modelCatalog([
|
||||||
|
{
|
||||||
|
model: "step-3.7-flash",
|
||||||
|
displayName: "Step 3.7 Flash",
|
||||||
|
contextWindow: 262144,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
model: "step-3.5-flash-2603",
|
model: "step-3.5-flash-2603",
|
||||||
displayName: "Step 3.5 Flash 2603",
|
displayName: "Step 3.5 Flash 2603",
|
||||||
@@ -517,11 +502,16 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"stepfun_en",
|
"stepfun_en",
|
||||||
"https://api.stepfun.ai/step_plan/v1",
|
"https://api.stepfun.ai/step_plan/v1",
|
||||||
"step-3.5-flash-2603",
|
"step-3.7-flash",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.stepfun.ai/step_plan/v1"],
|
endpointCandidates: ["https://api.stepfun.ai/step_plan/v1"],
|
||||||
apiFormat: "openai_chat",
|
apiFormat: "openai_chat",
|
||||||
modelCatalog: modelCatalog([
|
modelCatalog: modelCatalog([
|
||||||
|
{
|
||||||
|
model: "step-3.7-flash",
|
||||||
|
displayName: "Step 3.7 Flash",
|
||||||
|
contextWindow: 262144,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
model: "step-3.5-flash-2603",
|
model: "step-3.5-flash-2603",
|
||||||
displayName: "Step 3.5 Flash 2603",
|
displayName: "Step 3.5 Flash 2603",
|
||||||
@@ -575,17 +565,11 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"longcat",
|
"longcat",
|
||||||
"https://api.longcat.chat/openai/v1",
|
"https://api.longcat.chat/openai/v1",
|
||||||
"LongCat-Flash-Chat",
|
"LongCat-2.0-Preview",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.longcat.chat/openai/v1"],
|
endpointCandidates: ["https://api.longcat.chat/openai/v1"],
|
||||||
apiFormat: "openai_chat",
|
// 美团 LongCat 官方 Codex 文档用 wire_api=responses 对自家 base_url,原生 Responses,无需路由接管转换
|
||||||
modelCatalog: modelCatalog([
|
apiFormat: "openai_responses",
|
||||||
{
|
|
||||||
model: "LongCat-Flash-Chat",
|
|
||||||
displayName: "LongCat Flash Chat",
|
|
||||||
contextWindow: 262144,
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
icon: "longcat",
|
icon: "longcat",
|
||||||
iconColor: "#29E154",
|
iconColor: "#29E154",
|
||||||
@@ -598,24 +582,11 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"minimax",
|
"minimax",
|
||||||
"https://api.minimaxi.com/v1",
|
"https://api.minimaxi.com/v1",
|
||||||
"MiniMax-M2.7",
|
"MiniMax-M3",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.minimaxi.com/v1"],
|
endpointCandidates: ["https://api.minimaxi.com/v1"],
|
||||||
apiFormat: "openai_chat",
|
// MiniMax 官方 API 参考已列 /v1/responses 为正式端点(CN/intl 双区,POST /v1/responses),原生 Responses,无需路由接管转换
|
||||||
modelCatalog: modelCatalog([
|
apiFormat: "openai_responses",
|
||||||
{
|
|
||||||
model: "MiniMax-M2.7",
|
|
||||||
displayName: "MiniMax M2.7",
|
|
||||||
contextWindow: 200000,
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
codexChatReasoning: {
|
|
||||||
supportsThinking: true,
|
|
||||||
supportsEffort: false,
|
|
||||||
thinkingParam: "reasoning_split",
|
|
||||||
effortParam: "none",
|
|
||||||
outputFormat: "reasoning_details",
|
|
||||||
},
|
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
partnerPromotionKey: "minimax_cn",
|
partnerPromotionKey: "minimax_cn",
|
||||||
theme: {
|
theme: {
|
||||||
@@ -633,24 +604,11 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"minimax_en",
|
"minimax_en",
|
||||||
"https://api.minimax.io/v1",
|
"https://api.minimax.io/v1",
|
||||||
"MiniMax-M2.7",
|
"MiniMax-M3",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.minimax.io/v1"],
|
endpointCandidates: ["https://api.minimax.io/v1"],
|
||||||
apiFormat: "openai_chat",
|
// MiniMax 官方 API 参考已列 /v1/responses 为正式端点(CN/intl 双区,POST /v1/responses),原生 Responses,无需路由接管转换
|
||||||
modelCatalog: modelCatalog([
|
apiFormat: "openai_responses",
|
||||||
{
|
|
||||||
model: "MiniMax-M2.7",
|
|
||||||
displayName: "MiniMax M2.7",
|
|
||||||
contextWindow: 200000,
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
codexChatReasoning: {
|
|
||||||
supportsThinking: true,
|
|
||||||
supportsEffort: false,
|
|
||||||
thinkingParam: "reasoning_split",
|
|
||||||
effortParam: "none",
|
|
||||||
outputFormat: "reasoning_details",
|
|
||||||
},
|
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
partnerPromotionKey: "minimax_en",
|
partnerPromotionKey: "minimax_en",
|
||||||
theme: {
|
theme: {
|
||||||
@@ -668,15 +626,15 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"bailing",
|
"bailing",
|
||||||
"https://api.tbox.cn/api/llm/v1",
|
"https://api.tbox.cn/api/llm/v1",
|
||||||
"Ling-2.5-1T",
|
"Ling-2.6-1T",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.tbox.cn/api/llm/v1"],
|
endpointCandidates: ["https://api.tbox.cn/api/llm/v1"],
|
||||||
apiFormat: "openai_chat",
|
apiFormat: "openai_chat",
|
||||||
modelCatalog: modelCatalog([
|
modelCatalog: modelCatalog([
|
||||||
{
|
{
|
||||||
model: "Ling-2.5-1T",
|
model: "Ling-2.6-1T",
|
||||||
displayName: "Ling-2.5-1T",
|
displayName: "Ling-2.6-1T",
|
||||||
contextWindow: 131072,
|
contextWindow: 262144,
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
@@ -692,21 +650,8 @@ requires_openai_auth = true`,
|
|||||||
"mimo-v2.5-pro",
|
"mimo-v2.5-pro",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://api.xiaomimimo.com/v1"],
|
endpointCandidates: ["https://api.xiaomimimo.com/v1"],
|
||||||
apiFormat: "openai_chat",
|
// 小米 MiMo 官方 Codex 文档已声明原生支持 Responses API(wire_api=responses 对自家 base_url),无需路由接管转换
|
||||||
modelCatalog: modelCatalog([
|
apiFormat: "openai_responses",
|
||||||
{
|
|
||||||
model: "mimo-v2.5-pro",
|
|
||||||
displayName: "MiMo V2.5 Pro",
|
|
||||||
contextWindow: 1048576,
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
codexChatReasoning: {
|
|
||||||
supportsThinking: true,
|
|
||||||
supportsEffort: false,
|
|
||||||
thinkingParam: "thinking",
|
|
||||||
effortParam: "none",
|
|
||||||
outputFormat: "reasoning_content",
|
|
||||||
},
|
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
icon: "xiaomimimo",
|
icon: "xiaomimimo",
|
||||||
iconColor: "#000000",
|
iconColor: "#000000",
|
||||||
@@ -722,21 +667,8 @@ requires_openai_auth = true`,
|
|||||||
"mimo-v2.5-pro",
|
"mimo-v2.5-pro",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://token-plan-cn.xiaomimimo.com/v1"],
|
endpointCandidates: ["https://token-plan-cn.xiaomimimo.com/v1"],
|
||||||
apiFormat: "openai_chat",
|
// 小米 MiMo 官方 Codex 文档已声明原生支持 Responses API(wire_api=responses 对自家 base_url),无需路由接管转换
|
||||||
modelCatalog: modelCatalog([
|
apiFormat: "openai_responses",
|
||||||
{
|
|
||||||
model: "mimo-v2.5-pro",
|
|
||||||
displayName: "MiMo V2.5 Pro",
|
|
||||||
contextWindow: 1048576,
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
codexChatReasoning: {
|
|
||||||
supportsThinking: true,
|
|
||||||
supportsEffort: false,
|
|
||||||
thinkingParam: "thinking",
|
|
||||||
effortParam: "none",
|
|
||||||
outputFormat: "reasoning_content",
|
|
||||||
},
|
|
||||||
category: "cn_official",
|
category: "cn_official",
|
||||||
icon: "xiaomimimo",
|
icon: "xiaomimimo",
|
||||||
iconColor: "#000000",
|
iconColor: "#000000",
|
||||||
|
|||||||
Reference in New Issue
Block a user