mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-26 01:34:51 +08:00
feat(presets): real thinking switches for Qianfan and BytePlus Codex
2026-08-15 vendor audit, official-switch group:
- Baidu Qianfan Coding Plan: the v2 Chat API documents top-level
thinking:{type:enabled/disabled} (same shape as Zhipu) across the
plan's six main models, and Baidu's own OpenCode integration guide
sends it on the /v2/coding endpoint. Declaration added (with the
supportsThinking:true flag that gates the whole injection path) plus
none/high levels. Known alias caveat noted inline: if the console
resolves qianfan-code-latest to a non-thinking model the field is
ignored, not rejected (platform documents unsupported params as
ignore-not-error).
- BytePlus (ModelArk intl): the "not verified for the intl site"
comment is obsolete - BytePlus' own Codex guide configures this exact
coding/v3 endpoint with wire_api="responses". Switched apiFormat to
openai_responses (aligned with the domestic Volcengine Plan presets,
one less conversion layer) and pre-filled low/medium/high per the
official Codex doc, with the glm-5-2 tier-collapse caveat noted.
Test moves BytePlus from the Chat-route list to the native Responses
list; reasoning-level expectations extended for both presets.
This commit is contained in:
1 parent
e12fc62366
commit
9dcd3486f7
3 files changed
+33
-14
No files matched your search
@@ -577,15 +577,20 @@ requires_openai_auth = true`,
|
||||
endpointCandidates: [
|
||||
"https://ark.ap-southeast.bytepluses.com/api/coding/v3",
|
||||
],
|
||||
// 国内站 plan/v3、coding/v3 已切原生 Responses(见 火山 Agent Plan /
|
||||
// 火山 Coding Plan 预设),但 BytePlus
|
||||
// 国际站(bytepluses.com)文档未单独核实,暂保持 Chat 路由
|
||||
apiFormat: "openai_chat",
|
||||
// 国际站已核实(2026-08-15 盘点):BytePlus 官方 Codex 接入文档
|
||||
//(docs.byteplus.com/en/docs/ModelArk/2556056)标准 config.toml 的
|
||||
// base_url 就是本端点且 wire_api="responses",OpenCode 文档亦明写
|
||||
// Responses 优先——与国内站火山双 Plan 对齐切原生直连
|
||||
apiFormat: "openai_responses",
|
||||
modelCatalog: modelCatalog([
|
||||
{
|
||||
model: "ark-code-latest",
|
||||
displayName: "Ark Code Latest",
|
||||
contextWindow: 256000,
|
||||
// 官方 Codex 文档 model_reasoning_effort 限定 low/medium/high,与
|
||||
// 国内站同名模型四份文档交叉印证。⚠️auto 路由别名固有不确定性:
|
||||
// 路由到 glm-5-2-260617 时官方明载 low/medium 按 high 等价处理
|
||||
reasoningLevels: ["low", "medium", "high"],
|
||||
},
|
||||
]),
|
||||
category: "cn_official",
|
||||
@@ -1137,12 +1142,26 @@ requires_openai_auth = true`,
|
||||
endpointCandidates: ["https://qianfan.baidubce.com/v2/coding"],
|
||||
apiFormat: "openai_chat",
|
||||
modelCatalog: modelCatalog([
|
||||
// 两态(2026-08-15 盘点):千帆 v2 官方 thinking:{type:enabled/disabled}
|
||||
// 覆盖 Coding Plan 主力六模型,官方 OpenCode 接入文档在 /v2/coding 上
|
||||
// 对 minimax-m2.5/glm-5/kimi-k2.5 照发该字段。⚠️别名固有缺陷:控制台把
|
||||
// qianfan-code-latest 解析到 ernie-4.5-turbo 时 none 不会真关思考
|
||||
{
|
||||
model: "qianfan-code-latest",
|
||||
displayName: "Qianfan Code Latest",
|
||||
contextWindow: 131072,
|
||||
reasoningLevels: ["none", "high"],
|
||||
},
|
||||
]),
|
||||
// 千帆 v2 Chat API 官方顶层参数(与智谱同形态);平台对不支持的参数
|
||||
// "忽略不报错"(官方多处明载),别名解析到非清单模型时只失效不 400
|
||||
codexChatReasoning: {
|
||||
supportsThinking: true,
|
||||
supportsEffort: false,
|
||||
thinkingParam: "thinking",
|
||||
effortParam: "none",
|
||||
outputFormat: "reasoning_content",
|
||||
},
|
||||
category: "cn_official",
|
||||
icon: "baidu",
|
||||
iconColor: "#2932E1",
|
||||
|
||||
@@ -10,15 +10,8 @@ const expectedChatPresets = new Map<
|
||||
string,
|
||||
{ baseUrl: string; contextWindows: Record<string, number> }
|
||||
>([
|
||||
// 火山 Agent Plan / Coding Plan(国内站 plan/v3、coding/v3)已切原生
|
||||
// Responses,见下方 native 清单;BytePlus 国际站未核实,保持 Chat 路由
|
||||
[
|
||||
"BytePlus",
|
||||
{
|
||||
baseUrl: "https://ark.ap-southeast.bytepluses.com/api/coding/v3",
|
||||
contextWindows: { "ark-code-latest": 256000 },
|
||||
},
|
||||
],
|
||||
// 火山 Agent Plan / Coding Plan 与 BytePlus 国际站(coding/v3)均已切
|
||||
// 原生 Responses,见下方 native 清单
|
||||
[
|
||||
"Zhipu GLM",
|
||||
{
|
||||
@@ -152,9 +145,11 @@ describe("Codex Chat provider presets", () => {
|
||||
{ contextWindows: Record<string, number> }
|
||||
>([
|
||||
// 官方 Codex 文档确认 Agent Plan /api/plan/v3 与 Coding Plan
|
||||
// /api/coding/v3 均支持 Responses API
|
||||
// /api/coding/v3 均支持 Responses API;BytePlus 国际站 coding/v3
|
||||
// 同(docs.byteplus.com/en/docs/ModelArk/2556056,2026-08-15 核实)
|
||||
["火山 Agent Plan", { contextWindows: { "ark-code-latest": 256000 } }],
|
||||
["火山 Coding Plan", { contextWindows: { "ark-code-latest": 256000 } }],
|
||||
["BytePlus", { contextWindows: { "ark-code-latest": 256000 } }],
|
||||
[
|
||||
"DouBaoSeed",
|
||||
{ contextWindows: { "doubao-seed-2-1-pro-260628": 262144 } },
|
||||
|
||||
@@ -72,6 +72,11 @@ describe("Codex preset pre-filled reasoning levels", () => {
|
||||
["SiliconFlow en", "MiniMaxAI/MiniMax-M3", ["none", "high"]],
|
||||
// Novita:平台真开关 enable_thinking(声明已修正方言)→ 两态
|
||||
["Novita AI", "zai-org/glm-5.1", ["none", "high"]],
|
||||
// 千帆 v2 官方 thinking:{type}(声明已补)→ 两态
|
||||
["Baidu Qianfan Coding Plan", "qianfan-code-latest", ["none", "high"]],
|
||||
// BytePlus 国际站已切原生 Responses,档位=官方 Codex 文档三档(与国内
|
||||
// 站火山双 Plan 同源交叉印证)
|
||||
["BytePlus", "ark-code-latest", ["low", "medium", "high"]],
|
||||
// StepFun 官方两站模型页+reasoning 指南:3.7-flash 三档(默认 medium)、
|
||||
// 2603 两档;全系无关思考形态故无 none。effort 下发走后端 per-model
|
||||
// 推断(2603=low_high、3.7=passthrough)
|
||||
|
||||
Reference in new issue
Block a user