模型范围警告无法关闭
之前因为检测到一些free模型,想要进行尝试,版本更新后,聊天输入框上方有一列很长的提示无法关闭,提示内容如下: 模型范围警告 No models match pattern "opencode-go/longcat-2.5-preview-free" No models match pattern "opencode-go/step-5-preview-free" No models match pattern "opencode-go/grok-4.6" No models match pattern "opencode-go/gemini-4-argon-contributor" No models match pattern "opencode-go/cat-jam-free" No models match pattern "nvidia/moonshotai/kimi-k3" No models match pattern "openrouter/apodex/apodex-1.1-mini:free" No models match pattern "openrouter/poolside/laguna-s-2.1:free" No models match pattern "openrouter/poolside/laguna-xs-2.1:free"
解决了,在 C:\Users\~.pi\agent 中的 settings.json 的 enabledModels 字段下,将有问题的模型删除即可
设置模型里可以直接清理
在设置模型那里,我点击 刷新模型目录 后,那些无效的,刚在配置文件中删除的模型列表又出现了,UI界面中没有看到可以删除的地方
On the follow-up question (removed models coming back after "Refresh model catalog"):
Refresh model catalog (POST /api/models/refresh) only re-downloads the provider catalogs. It never writes enabledModels, so it can't put removed entries back into settings.json.
What you most likely saw is the warning above the chat box, which comes from /api/models. The server caches that list for 60 seconds (lib/models-cache.ts). Edits made in Settings › Models clear the cache right away, but a hand edit of settings.json doesn't, so the old warning can stay for up to a minute.
To clean up from the UI: Settings › Models has a banner above the model switches with "Remove unmatched entries". It removes every enabledModels entry that matches no model. The banner doesn't appear when a project's .pi/settings.json sets enabledModels; the banner names that file instead, and it has to be edited there.
If the warning still shows a minute after the cleanup, please post the warning text and the enabledModels list from settings.json and I'll take another look.