Skip to content

fix: warm SDK capabilities when reopening chat sessions#342

Open
ape-ming wants to merge 1 commit intoop7418:mainfrom
ape-ming:fix-session-capability-warmup
Open

fix: warm SDK capabilities when reopening chat sessions#342
ape-ming wants to merge 1 commit intoop7418:mainfrom
ape-ming:fix-session-capability-warmup

Conversation

@ape-ming
Copy link

Bug:

  • 重启应用后直接打开旧 session,模型列表缺少 Default (recommended)模型
  • 必须先新建/打开一个新工作目录触发一次 SDK 初始化,旧 session 才能正常聊天

Root cause:

  • 动态模型列表依赖 capability cache,而旧 session 页面恢复时没有主动 warm
  • fallback 模型列表阶段会把 session 中保存的有效模型误判为不存在并回退到 sonnet

Fix:

  • 旧 session 打开时自动调用 capability warmup
  • provider model list 增加 modelsSource
  • fallback 阶段跳过自动纠正,避免覆盖旧 session 模型

Verification:

  • tsc --noEmit
  • 重启应用后直接打开旧 session,不再需要先新建工作目录
  • 当前 session 之前保存的模型不被自动改写

@vercel
Copy link

vercel bot commented Mar 19, 2026

@ape-ming is attempting to deploy a commit to the op7418's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant