修改子智能体模型覆盖后,旧会话派发 sub-agent 报 "Model provider is not configured",需重启才生效
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
模型设置 / 切换 · Model config
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
影响体验 · Major (功能可用但体验受损 / works but degraded)
复现频率 · Reproducibility
必现 · Always
问题描述 · Description
修改子智能体模型覆盖后,旧会话派发 sub-agent 报 "Model provider is not configured",需重启才生效
复现步骤 · Steps to reproduce
环境
ZCode 桌面版,Linux(openKylin),主模型 GLM-5.3(bigmodel API Key 接入)
复现步骤
- 开一个会话正常使用
- 在设置里把子智能体(general-purpose / Explore)的模型覆盖改为 GLM-5.3-Flash
- 回到原来那个会话派发一个 sub-agent
实际表现
直接报错:Model provider is not configured: builtin:bigmodel
此时 ~/.zcode/v2/agents-state.json 里的覆盖值已经正确更新
(如 custom:builtin%3Abigmodel-coding-plan:GLM-5.3-Flash),配置文件层面是对的;
但旧会话派 sub-agent 始终报错,疑似会话进程在启动时缓存了 provider 注册表,没有热加载。
新开会话后同样操作一切正常,可以确认配置本身没问题。
期望
- 改完子智能体模型配置后旧会话能热加载;或
- 至少在修改时提示「需重启会话生效」,避免排查半天配置
备注
在界面上重新选择一次模型覆盖(先切回默认再选 Flash)也无法让旧会话恢复,只有重启会话一条路。
期望表现 · Expected behavior
应该是更新了模型但是能够正常替换使用新模型配置下的sub-agent
实际表现 · Actual behavior
更新前的旧对话无法使用新模型配置下的sub-agent
ZCode 版本 · ZCode version
v3.9.2
设备 / 系统 / 浏览器 · Device / OS / Browser
OpenKylin SP2
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ~/.zcode/v2/agents-state.json and trace how an existing session dispatches a sub-agent after the model override changes in settings. Compare provider registration in an old session with a newly opened session; done means the old session uses the updated model, or the interface clearly warns that restarting is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- ai, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100