[功能请求] 在子代理 metadata、工具调用事件、会话配置中暴露 model 与 effort 字段
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
背景
在使用 ZCode CLI 进行项目开发与模型能力评测时,我们需要记录每个任务实际使用的模型(model)与推理强度(effort),用于评价模型完成任务的能力并优化配置。但目前 ZCode 不会在事件级暴露这两个字段,导致绝大多数任务无法可靠归因。
问题
实测发现以下三处缺失:
-
子代理元数据缺失:扫描 65 个子代理的
metadata.json,model字段缺失率 100%、effort字段缺失率 100%。这些文件已包含父子标识链、token 用量、reasoningTokens消耗量等信息,唯独缺少 model 与 effort。 -
会话级配置不明确:
setting.json的modelProviderFamilySelectedKeys只到 provider family(例如coding-plan:builtin:bigmodel-coding-plan),而同一 provider 下并存多个模型候选(如 GLM-5.2 与 GLM-5-Turbo),无法唯一确定选中的模型;effort等级无任何字段表达(只有reasoning.enabled/defaultVariant,无法映射到 high / medium 等等级)。 -
工具调用事件:hook 上下文与工具调用事件均不暴露当次使用的 model / effort。
期望
希望 ZCode 能在以下位置暴露结构化的 model + effort 字段(按优先级):
| 优先级 | 位置 | 期望字段 |
|---|---|---|
| P1 | 子代理 metadata.json |
model, effort(与已有的父子标识链、token 用量对齐) |
| P1 | 工具调用事件 / hook 上下文 | 当次调用的 model, effort |
| P2 | setting.json |
选中的具体 model(非仅 provider family)+ effort 等级 |
隐私边界
只需 model 名称 与 effort 等级 两个结构化字段。不需要 apiKey、token、baseURL、账户信息、对话正文或完整提示词。字段应可被被动记录脚本机械读取。
收益
- 支持对"主对话流任务"和"子代理任务"的可靠模型归因(当前这两类占任务绝大多数却无法归因);
- 支撑模型能力评测、配置优化与"角色 × 模型"交叉分析。
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 by tracing how sub-agent metadata.json and setting.json are produced, then inspect the hook context and tool-call event entry points. Compare the existing parent-child identifiers, token fields, provider-family selection, and reasoning settings with the requested model and effort fields; done means both values are mechanically recordable in all P1 locations and the selected session configuration.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100