Files
msd-core/docs/zh-CN/references/model-profile-resolution.md
Jakub Zych a9a7a328e6 refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD
across contents and paths, upstream package/repo coordinates -> @golem15/msd-core
and golem15com/msd-core. Deep links into upstream history, sibling upstream
packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is.

Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line,
package/plugin identity, regenerated lockfile, install-tree fixtures, derived
registries and benchmark baseline; migration checksum baseline re-locked
(MSD keeps its own install state, so no install had applied the old sums);
sort-order and regex-escaped expectations in tests adjusted.
2026-10-06 01:47:40 +02:00

34 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 模型配置解析
在编排开始时解析一次模型配置,然后在所有 Task 生成时使用。
## 解析模式
```bash
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
```
默认值:未设置或缺少 config 时为 `balanced`。
## 查找表
@~/.claude/msd-core/references/model-profiles.md
在表中查找已解析配置对应的代理。将 model 参数传递给 Task 调用:
```
Task(
prompt="...",
subagent_type="msd-planner",
model="{resolved_model}" # "inherit"、"sonnet" 或 "haiku"
)
```
**注意:** Opus 级代理解析为 `"inherit"`(而非 `"opus"`)。这会使代理使用父会话的模型,避免与可能阻止特定 opus 版本的组织策略冲突。
## 使用方法
1. 在编排开始时解析一次
2. 存储 profile 值
3. 生成时在表中查找每个代理的模型
4. 将 model 参数传递给每个 Task 调用(值:`"inherit"`、`"sonnet"`、`"haiku"`)