feat(codex): switch Volcengine Agentplan preset to native Responses

Official Codex docs (volcengine.com/docs/82379/2556056, updated
2026-07) confirm the Coding Plan endpoint /api/coding/v3 supports the
Responses API, so the preset no longer needs local route conversion.
BytePlus stays on Chat routing until the international-site docs are
verified. Also document the billing pitfall: the pay-as-you-go /api/v3
endpoint must never appear in plan-subscription endpoint candidates.
This commit is contained in:
Jason
2026-07-31 17:59:10 +08:00
parent 8ae1ce8558
commit 56a66eea36
2 changed files with 11 additions and 8 deletions
+7 -1
View File
@@ -487,8 +487,12 @@ requires_openai_auth = true`,
"https://ark.cn-beijing.volces.com/api/coding/v3",
"ark-code-latest",
),
// ⚠️ 计费红线(官方 warning):Coding Plan 必须走 /api/coding/v3
// 填按量端点 /api/v3 不消耗套餐额度、按量另计费,绝不能混入候选
endpointCandidates: ["https://ark.cn-beijing.volces.com/api/coding/v3"],
apiFormat: "openai_chat",
// 官方 Codex 文档(volcengine.com/docs/82379/25560562026-07 更新):
// Coding Plan /api/coding/v3 已支持 Responses APIwire_api=responses),无需路由接管转换
apiFormat: "openai_responses",
modelCatalog: modelCatalog([
{
model: "ark-code-latest",
@@ -517,6 +521,8 @@ requires_openai_auth = true`,
endpointCandidates: [
"https://ark.ap-southeast.bytepluses.com/api/coding/v3",
],
// 国内站 coding/v3 已切原生 Responses(见 火山Agentplan),但 BytePlus
// 国际站(bytepluses.com)文档未单独核实,暂保持 Chat 路由
apiFormat: "openai_chat",
modelCatalog: modelCatalog([
{
@@ -10,13 +10,8 @@ const expectedChatPresets = new Map<
string,
{ baseUrl: string; contextWindows: Record<string, number> }
>([
[
"火山Agentplan",
{
baseUrl: "https://ark.cn-beijing.volces.com/api/coding/v3",
contextWindows: { "ark-code-latest": 256000 },
},
],
// 火山Agentplan(国内站 coding/v3)已切原生 Responses,见下方 native 清单;
// BytePlus 国际站未核实,保持 Chat 路由
[
"BytePlus",
{
@@ -156,6 +151,8 @@ describe("Codex Chat provider presets", () => {
string,
{ contextWindows: Record<string, number> }
>([
// 官方 Codex 文档确认 Coding Plan /api/coding/v3 支持 Responses API
["火山Agentplan", { contextWindows: { "ark-code-latest": 256000 } }],
[
"DouBaoSeed",
{ contextWindows: { "doubao-seed-2-1-pro-260628": 262144 } },