From 59229990ac3243bea97041f9a97860a7ebd660f8 Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Tue, 13 Oct 2026 17:01:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(channels):=20=E4=BF=AE=E6=AD=A3=20zcode=20?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E7=AB=AF=E7=82=B9=EF=BC=88=E9=A1=BB=E5=B8=A6?= =?UTF-8?q?=20/api/v1/zcode-plan/anthropic=20=E5=89=8D=E7=BC=80=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 参考 zcode-anthropic.ts:7 注释点名:该平台**只存在** /api/v1/zcode-plan/anthropic/v1/messages 这一个 chat 路径, openai 与裸 v1/chat/completions 一律 404 page not found。 此前 base_url 只填 https://zcode.z.ai,拼出的地址必然 404。 --- internal/lua/plugins/channels.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/lua/plugins/channels.lua b/internal/lua/plugins/channels.lua index 2490dad..911a4b0 100644 --- a/internal/lua/plugins/channels.lua +++ b/internal/lua/plugins/channels.lua @@ -755,7 +755,10 @@ local PLATFORMS = { -- 推理走 Anthropic 协议的免费额度通道(照参考 zcode-upstream.ts): -- 积分制无论 bigmodel/zai 都走 zcode.z.ai(官方分派表规则 2/5,2026-10-03 实测); -- 只有订阅制才走 api.z.ai。这里用积分制那条。 - base_url = "https://zcode.z.ai", + -- zcode 只存在 /api/v1/zcode-plan/anthropic/v1/messages 这一个 chat 路径 + -- (参考 zcode-anthropic.ts:7 注释:openai / 裸 v1/chat/completions 一律 + -- 404 page not found)。适配器 anthropic 补 /v1/messages。 + base_url = "https://zcode.z.ai/api/v1/zcode-plan/anthropic", -- 远端模型目录(照参考 zcode-upstream.ts ZCODE_CLIENT_CONFIGS_URL) models_remote = { endpoints = { { url = "https://zcode.z.ai/api/v1/client/configs", method = "GET",