Repository navigation
feat(config): 新增 cn.chat_base,修复海外出口下 CN 模型全部缺失 - #220
Merged
Merged
Conversation
copilot.tencent.com 对海外出口(如 Clash 全局 + TUN)的 TLS 握手直接复位, CN 模型目录与对话全部 EOF,/v1/models 只剩 global 模型。官方 WorkBuddy 桌面端 已改用 https://www.workbuddy.cn,实测该域海外出口可达,模型目录与 /v2/chat/completions 均正常。 仿照 global.chat_base:空 = 回落内置默认,老配置零影响;只在装配期生效, 已列入面板保存后的需重启字段。
此前失败只进负缓存、不留日志,CN 域不可达时网关只列 global 模型却毫无线索。 负缓存期内直接返回,不会刷屏。
Closed
jin66god
pushed a commit
to jin66god/workbuddy2api-panel
that referenced
this pull request
Oct 19, 2026
…inguo2625469#225/linguo2625469#221/linguo2625469#212/linguo2625469#158 + 面板配置入口与 README 重构) - linguo2625469#223 出站 Transport 读取 HTTP(S)_PROXY 环境变量 - linguo2625469#220 新增 cn.chat_base,修复海外出口 CN 模型全部缺失;models 拉取失败记 WARN - linguo2625469#225 models.hidden 模型黑名单:列表过滤 + 点名 400,热生效 - linguo2625469#221 11158 区分账号类型无权限;模型锁按 realm 隔离;全池无权限返回 400 - linguo2625469#212 到期提醒快照与「检查」同口径:按日聚合批次、DeductionEndTime 优先 - linguo2625469#158 按地区独立调度:加权随机 / 轮询 / 顺序耗尽 + 账号顺序,热生效 - 面板「上游与高级」补 CN 上游地址与模型黑名单入口(含前端回归测试) - README 精简重构:能力/配置/部署以本仓库为准,删除开发向流水账 - 新增 GitHub Issue 模板:Bug / 功能 / 其他
jin66god
added a commit
to jin66god/workbuddy2api-panel
that referenced
this pull request
Oct 19, 2026
…inguo2625469#225/linguo2625469#221/linguo2625469#212/linguo2625469#158 + 面板配置入口与 README 重构) - linguo2625469#223 出站 Transport 读取 HTTP(S)_PROXY 环境变量 - linguo2625469#220 新增 cn.chat_base,修复海外出口 CN 模型全部缺失;models 拉取失败记 WARN - linguo2625469#225 models.hidden 模型黑名单:列表过滤 + 点名 400,热生效 - linguo2625469#221 11158 区分账号类型无权限;模型锁按 realm 隔离;全池无权限返回 400 - linguo2625469#212 到期提醒快照与「检查」同口径:按日聚合批次、DeductionEndTime 优先 - linguo2625469#158 按地区独立调度:加权随机 / 轮询 / 顺序耗尽 + 账号顺序,热生效 - 面板「上游与高级」补 CN 上游地址与模型黑名单入口(含前端回归测试) - README 精简重构:能力/配置/部署以本仓库为准,删除开发向流水账 - 新增 GitHub Issue 模板:Bug / 功能 / 其他
pardSun
added a commit
to pardSun/workbuddy2api-panel
that referenced
this pull request
Oct 20, 2026
shinny-xionghongwei
added a commit
to shinny-xionghongwei/workbuddy2api-panel
that referenced
this pull request
Oct 20, 2026
WilliamLuuu
added a commit
to WilliamLuuu/workbuddy2api-panel
that referenced
this pull request
Oct 20, 2026
maintell
added a commit
to maintell/workbuddy2api-panel
that referenced
this pull request
Oct 21, 2026
吸收的上游修复(均为 bug fix): - linguo2625469#233 国际版 11-128 通道校验分流 + 始终发送 X-Conversation-ID(取代本地 linguo2625469#190 旧实现;11-128 不再硬禁用账号) - linguo2625469#159 剥离 content 里的 reasoning_text 片段,修 Codex 转换后 11101 - linguo2625469#185 6021 queue.full 归为渠道级繁忙(不轮转、不罚号,503 upstream_busy) - linguo2625469#217 同账号 refresh 单飞,避免 RT 复用撞 12153 掉登录 - linguo2625469#162 识别企业切换会话 token_source=enterprise_switch - linguo2625469#199 缓存告警假阳性:miss 显式存在时对称反推 hit 另含 linguo2625469#138 linguo2625469#143 linguo2625469#144 linguo2625469#158 linguo2625469#178 linguo2625469#196 linguo2625469#205 linguo2625469#213 linguo2625469#220 linguo2625469#221 linguo2625469#223 linguo2625469#225 linguo2625469#230 linguo2625469#232 等功能更新。 本地改动:README 停维护声明改写为本 fork 口径;版本号 1.14.0-panel。
qcgzxw
added a commit
to qcgzxw/workbuddy2api-panel
that referenced
this pull request
Oct 21, 2026
…odels fetch failure log)
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
出口在海外时(例如 Clash 全局模式 + TUN),
/v1/models里只剩global:模型,CN 模型一个都没有,而且没有任何报错。用 WorkBuddy 桌面端照样能正常用国内模型。根因
内置的国内版上游
copilot.tencent.com对海外出口的 TLS 握手直接复位(curl/schannel、Node/OpenSSL、Go 都一样),CN 模型目录和对话全部EOF:官方 WorkBuddy 桌面端目前用的是
https://www.workbuddy.cn(日志里endpoint: https://www.workbuddy.cn)。这个域名海外出口可以访问,接口也同构。用同一个 CN 账号、同一个海外出口实测:/v2/chat/completionshttps://copilot.tencent.comEOF,0 个EOFhttps://www.workbuddy.cn另外,
fetchDynamicModels失败时只进负缓存、不留日志,所以排障时完全没有线索。改动
feat(config):新增cn.chat_base,写法照搬global.chat_base。留空就回落内置默认(copilot.tencent.com),老配置不受影响。只在启动装配时生效,已加进面板保存后的「需重启字段」。fix(server):/v1/models拉取 CN 模型目录失败时记一行WARN,附带上游错误。负缓存期内直接返回,不会刷屏。默认值没改:国内出口用
copilot.tencent.com一直正常,要不要切到www.workbuddy.cn交给维护者判断。海外出口的用户配一行就能用:验证
go test ./...通过(新增cmd/server/cn_chat_base_test.go、internal/server/models_fetch_log_test.go)。TestModelsEndpoint会真的去连copilot.tencent.com,在海外出口下改动前后都失败,与本 PR 无关。cn.chat_base后:/v1/models返回 20 个 CN 模型 + 33 个 global 模型,cn:deepseek-v4.1-flash对话正常,启动日志显示warm model rates: cn ok。未覆盖
面板登录(
internal/panel/login.go)和cmd/login里的upstreamBaseCN仍写死copilot.tencent.com,海外出口下新增 CN 账号大概率也会失败。登录链路涉及 Origin/Referer 和 OAuth 回调,本 PR 没有动,需要的话可以另开一个 PR。