【免费下载链接】ops-sparse本项目是CANN提供的高性能稀疏矩阵计算的算子库专注于优化稀疏矩阵的计算效率。项目地址: https://gitcode.com/cann/ops-sparsename: agent-model-select description: Agent 模型选择技能读取 model_config.json 配置并为各 subagent 设置对应模型。触发配置模型、选模型、model config、换个模型、模型推荐。Agent 模型选择核心原则禁止硬编码 agent 列表。必须从agent/AGENT.md的agents:字段和每个agent/agents/name.md的 frontmatter 动态读取。模型选择原则能力→模型映射Agent 角色核心能力需求推荐模型类型architect强推理、架构设计旗舰推理模型reasoning/flagshipdeveloper代码生成、调试旗舰代码模型coder/flagshipreviewer代码审查、规范检查中高推理模型tester测试设计、用例生成中高推理模型writer文档撰写、模板填充中端/默认模型模型类型识别通过opencode models输出识别模型类型推理模型名称含max/reasoner/thinking/o1代码模型名称含coder/code/devin通用模型名称含plus/turbo/flash/mini选择策略策略适用场景分配规则性能优先复杂算子、高精度要求architect/developer 用旗舰其余用中高平衡常规开发architect 用旗舰推理developer 用旗舰代码其余用默认成本优先简单算子、快速验证仅 architect 用中高其余用默认配置文件agent/agents/model_config.json该文件在.gitignore中本地修改不被 git 追踪配置格式{ architect: { comment: 架构师, model: provider/model-id }, developer: { comment: 开发工程师, model: provider/model-id } }model字段格式provider/model-id未列出的 agent 默认使用default跟随主 Agent 模型可通过opencode models查看可用模型列表步骤化流程获取可用模型列表执行opencode models获取 agent 列表读取agent/AGENT.md的agents:字段询问用户偏好使用question工具询问选择策略性能优先/平衡/成本优先为每个 agent 选择模型根据策略和能力映射表分配写入配置文件生成agent/agents/model_config.json为所有agent 写入包括使用 default 的执行 init.sh运行bash agent/init.sh opencode使配置生效逐 agent 确认与修改使用question工具发送问卷动态列出所有 agent 的当前配置询问用户是否需要修改问题以下是各 agent 的模型配置是否需要修改 当前配置 - agent-name角色描述: model - ... 选项 - 确认无需修改 - 需要修改 agent-name 的模型 - ...允许多选。若用户选择了需要修改的 agent则针对选中的 agent 发送新问卷让用户从可用模型列表中选择新模型更新配置后重新执行 Step 6。确认结果向用户展示最终配置和生效状态重要说明opencode.json修改后无需重启opencode下次调用 subagent 时自动生效主 Agent 的模型在 opencode 启动时选择不通过此技能配置model_config.json已在.gitignore中不会被 git 追踪重置配置删除model_config.json后重新运行bash agent/init.sh opencode生效方式配置完成后运行bash agent/init.sh opencode即可生效。【免费下载链接】ops-sparse本项目是CANN提供的高性能稀疏矩阵计算的算子库专注于优化稀疏矩阵的计算效率。项目地址: https://gitcode.com/cann/ops-sparse创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考