
CLIProxyAPI 给每个模型记标记时要在写锁下扫全部客户端,客户端到千级后注册变慢、停止也被拖住;文里给成本曲线、退出被卡住的原因,和今天能改的两处宽限。

internal/registry/model_registry.go 第 1172–1185 行:hasClientSupportingWebSearchLocked 每次从 clientModelInfos 的第一个客户端遍历到命中为止。
internal/registry/model_registry.go 第 650–680 行:第 663 行查全量、第 670 行按 provider 再查一次、第 675 行补查旧 provider,三次都落在同一个注册循环内。RLock,注册期间它们一起排队。5
sdk/cliproxy/service_lifecycle.go 第 226–242 行:第 229 行同步执行 syncPluginModelRuntime,第 238 行才进 select,第 239 行读 ctx.Done()。wg.Wait() 返回。7
sdk/cliproxy/service_plugins.go 第 294–310 行:第 308 行的 wg.Wait() 是这一段的终点,worker 只在取下一个任务之前看一次 ctx。docker stop 的默认宽限只有 10 秒。8context.Background(),退出信号传不进去。10re-registered models for N auth(s) due to model catalog changes,就说明目录刷新真的触发过重注册。10TimeoutStopSec=300,compose 写 stop_grace_period: 5m,临时停一下用 docker stop --time 300。8 宽限不够时,超时那一刻的 SIGKILL 会把在飞的流一起断掉。models.catalog 只接受 http(s) 地址或绝对路径,留空就走官方源。11/v1/messages 打 OpenAI 兼容上游时,中间要过 chat→Responses→Anthropic 两段转换。迟到的文本收尾会把正在开的 tool_use 块关掉。12/v1/messages 的 chat 兜底直接建 chat→Anthropic 状态机。13
backend/internal/service/openai_gateway_messages_chat_fallback.go 第 187–215 行:第 200 行建的是 ChatCompletionsToAnthropicStreamState,第 207 行逐块转成 Anthropic 事件,中间没有 Responses 那一层。/v1/responses 的兜底上。14klauspost/compress 从 1.17.4 升到 1.18.7。15s2 子包的越界读,1.16.0 起受影响,1.18.7 修好。16go.mod 第 18 行还钉着 1.17.4。17s2 那条。zstd 子包另有一条 High 公告,受影响范围是 ≤ 1.20.1,修在 1.20.2。18github.com
github.com
github.com
github.com
github.com
github.com
github.com
docs.docker.com
github.com
github.com
github.com
github.com
github.com
osv.dev
github.com
github.com
github.com
github.com
github.com
github.com
github.com
status.openai.com
status.claude.com
status.cloud.google.com
codex-reset.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.