sub2api icon indicating copy to clipboard operation
sub2api copied to clipboard

api_key_model_discovery 这是不再被支持了吗

Open bottotl opened this issue 1 month ago • 1 comments

_ OpenAI Codex (v0.161.0)

Background server has incompatible feature settings This session requires api_key_model_discovery to be enabled Restart will use these shared feature settings: api_key_model_discovery = true auth_elicitation = true code_mode_host = true mcp_oauth_refresh_coordination = false These settings persist and can disable functionality for other clients. Restart may interrupt active or queued work.

  1. Run without daemon this time
  2. Restart with these settings › 3. Cancel

bottotl avatar Oct 08 '26 03:10 bottotl

这不是 sub2api 的报错,是 Codex CLI 本地后台守护进程(background server)的特性设置协商提示。

背景:Codex CLI 会启动一个常驻的后台 server 供多个会话/客户端共享,特性开关(如 api_key_model_discovery)在它启动时就固定了。当你用 API Key + 自定义 base URL(指向 sub2api)发起会话时,Codex 需要开启 api_key_model_discovery(即通过 provider 的 /models 端点发现可用模型),而已在运行的守护进程没开这个特性,于是弹出这个选择:

  1. Run without daemon this time — 本次不用守护进程直接跑(一次性)
  2. Restart with these settings — 用新特性设置重启守护进程(推荐,一劳永逸)
  3. Cancel — 取消

选 2 即可,不是错误,不影响功能。提示里 "These settings persist and can disable functionality for other clients" 只是说守护进程的设置是全局共享的,换了设置后其他接入同一守护进程的客户端也跟着用这套设置。

顺带说明:/v1/models 模型发现 sub2api 是支持的(包括 Codex 带 client_version 查询的 manifest 格式),所以模型列表能正常拉到。

yan9651688 avatar Oct 08 '26 08:10 yan9651688