mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-11-07 09:47:23 +00:00
TestChannelsDevicePollE2E 用真二进制跑通完整链路(对齐参考插件形态的终局验收):
假平台上游(设备码/token/模型/对话端点)
→ 真网关进程 + plugin_dir(SeedBundled 落地 channels)
→ PUT /api/plugins/channels/kernel 授权(运维批准动作面)
→ call/set_endpoints 把 minimax 端点指到假上游(自建代理能力复用)
→ POST /api/plugins/http/channels/login 发起 device-poll
→ GET .../login/status 轮询:先 pending(authorization_pending),
后 completed(token 下发)且 account 取 nickname
→ 终局证据:/v1/models 出现 channels-minimax 的模型 MiniMax-M3
调试中抓到并修复:channels.lua 三处旧挂载前缀 /api/plugins/channels/http/
(正确为 /api/plugins/http/,spawnBrowser 回调路径、callback redirect_uri、
UI fetch 基址)—— UI 上点登录/回调一直会 404。
顺带:e2e 就绪探针复用 startGateway(无源时 /v1/models 空列表也 200)。