diff --git a/internal/lua/plugins/channels.lua b/internal/lua/plugins/channels.lua index df7fd84..a590ce5 100644 --- a/internal/lua/plugins/channels.lua +++ b/internal/lua/plugins/channels.lua @@ -125,9 +125,20 @@ local PLATFORMS = { hosts = { "www.trae.cn", "api.trae.com.cn", "api.trae.cn", "trae-api-cn.mchost.guru" }, base_url = "https://trae-api-cn.mchost.guru", adapter = "openai", + -- 照参考 TRAE_FALLBACK_MODELS 全量(32 项)。其中 4 项带 isHidden + -- (内部子 agent)—— 不进用户可选列表,单列在 models_hidden。 models = { - "DeepSeek-V4-Flash", "DeepSeek-V4-Pro", "kimi-k3", "kimi-k2.6", - "glm-5", "glm-5.2", "Doubao-Seed-2.1-Pro", + "DeepSeek-V4-Flash-Official", "Doubao-Seed-2.1-Pro", "seed-code-pro-0430", + "Doubao-Seed-2.1-Turbo", "Doubao-Seed-2.0-Code", "glm-5.2", "glm-5-turbo", + "glm-5", "DeepSeek-V4-Pro", "DeepSeek-V4-Flash", "kimi-k3", "kimi-k2.7-code", + "kimi-k2.6", "minimax-m3", "qwen-3.7-plus", "sagitta", "aquila", + "custom_model_gemini", "custom_model_placeholder", "custom_model_1M_text", + "custom_model_1M", "custom_model_kimi", "custom_model_claude", + "custom_model_gpt-5", "custom_model_no-fc", "custom_model_deepseek_chat", + "custom_model_deepseek_reasoner", "custom_model_deepseek_v4", + }, + models_hidden = { + "browser_use_subagent", "explore_sub_agent_v13", "explore_sub_agent_v2", "summary", }, -- 每日签到:POST /trae/api/v2/ug/checkin_credits/claim body {} 到 UG 主机。 checkin = { @@ -206,7 +217,9 @@ local PLATFORMS = { parse = "id_list", }, adapter = "openai", - models = { "MiniMax-M3.1-Flash-Preview", "MiniMax-M3", "MiniMax-M2.7-highspeed" }, + -- 照参考 MINIMAX_FALLBACK_MODELS(4 项)。远端权威: + -- GET /mavis/api/v1/models?region=cn&buildEnv=prod + models = { "MiniMax-M3.1-Flash-Preview", "MiniMax-M3", "MiniMax-M2.7-highspeed", "MiniMax-M2.7" }, -- 每日签到(两步:状态预检 + 领取;幂等靠服务端状态) checkin = { url = "https://agent.minimax.cn/minimax-cloud/api/v1/signin/claim", @@ -537,7 +550,17 @@ local PLATFORMS = { parse = "id_list", }, adapter = "openai", - models = { "kimi-k3", "glm-5.2", "deepseek-v4-flash" }, + -- 照参考 LOBSTERAI_FALLBACK_MODELS 全量(19 项)。远端权威: + -- GET /api/models/available(**必须带 model_flag 参数**,否则只返回 25 个 + -- 且没有 kimi-k3 —— 参考注释点名)。 + models = { + "deepseek-v4-flash", "deepseek-v4-pro", "MiniMax-M3", "MiniMax-M2.7", + "qwen3.7-max", "qwen3.7-plus", "qwen3.6-plus", "qwen3.5-plus-2026-04-20", + "kimi-k2.7-code", "kimi-k2.7-code-highspeed", "kimi-k2.6", "kimi-k2.5", + "doubao-seed-2-1-pro-260628", "doubao-seed-2-1-turbo-260628", + "doubao-seed-2-0-code-preview-260215", "glm-5.2", "glm-5.1", + "glm-5v-turbo", "glm-5", + }, -- 余额(对齐参考:GET /api/user/profile-summary) balance = { url = "https://lobsterai-server.youdao.com/api/user/profile-summary", @@ -563,7 +586,19 @@ local PLATFORMS = { parse = "id_list", }, adapter = "openai", - models = { "big-pickle", "claude-sonnet-4-20250514", "gpt-5.1-codex-mini" }, + -- 照参考 OPENCODE_FALLBACK_MODELS 全量(14 项)。isFree 是**官方语义 + -- 字段**(匿名可用与否):7 个 free 无需 key,其余需付费 key(实测匿名 401)。 + models = { + "big-pickle", "space-bunny-free", "longcat-2.5-preview-free", + "mimo-v2.6-flash-free", "mimo-v2.5-free", "nemotron-3-ultra-free", + "nemotron-3.5-lightning-free", "deepseek-v4-flash", "deepseek-v4.1-flash", + "glm-5.2", "kimi-k2.5", "minimax-m2.7", "minimax-m3", "qwen3.8-max", + }, + models_free = { + "big-pickle", "space-bunny-free", "longcat-2.5-preview-free", + "mimo-v2.6-flash-free", "mimo-v2.5-free", "nemotron-3-ultra-free", + "nemotron-3.5-lightning-free", + }, }, -- CodeArts(华为)—— 凭据 + SDK-HMAC-SHA256 签到(照参考 codearts-credits.ts)。 @@ -643,6 +678,9 @@ local PLATFORMS = { "qmodel_38max", "qfmodel", "qmodel_latest", "qmodel", "kmodel_latest", "kmodel", "gmodel", "gfmodel", "dmodel", "dfmodel", "mmodel", + -- CN 独有(参考注释点名:`q37fmodel` / `gm51model` 仅国区下发, + -- 两者都是 1M 上下文、支持图像与思考) + "q37fmodel", "gm51model", }, -- 余额(对齐参考 qoder-credits.ts:GET /sash/api/v2/me/usage,余额=userQuota.remaining -- + addOnQuota.remaining,走 openApiBase) @@ -5149,9 +5187,18 @@ function plugin.model_list(req) local plat = platformById(args and args.platform) if not plat then return { status = 400, json = { error = "未知平台" } } end local disabled = disabledModelsOf(plat.id) + -- models_hidden:内部子 agent(照参考 isHidden 语义)不进用户可选列表。 + local hidden = {} + for _, m in ipairs(plat.models_hidden or {}) do hidden[m] = true end + -- models_free:参考的 isFree 字段(官方语义:匿名/免费可用)。 + local free = {} + for _, m in ipairs(plat.models_free or {}) do free[m] = true end local out = {} for i, m in ipairs(effectiveModels(plat.id)) do - out[#out+1] = { id = m, name = m, disabled = disabled[m] and true or false, isFree = false } + if not hidden[m] then + out[#out+1] = { id = m, name = m, disabled = disabled[m] and true or false, + isFree = free[m] and true or false } + end end local remote = plugin.state.remoteModels and plugin.state.remoteModels[plat.id] return { status = 200, json = {