跳转至

Oh My OpenCode 配置建议

状态: ✅ 已完成

创建日期: 2026-03-07 最后更新: 2026-03-07


📅 日历事件

事件名称 开始 结束 地点 日历 备注
- - - - - -

日历状态说明:✅=已加入 / 📄=仅文档


目的

记录当前 ~/.config/opencode/oh-my-opencode.json 的推荐配置思路,重点解释 temperaturethinkingreasoningEffort 在本机 Oh My OpenCode 中应如何取值。

配置原则

  • 默认追求稳定、可复现、低幻觉,而不是更发散的输出。
  • 高推理预算只给主执行、审查、复杂决策类 agent/category。
  • 搜索、轻量执行、快速修补类角色优先速度与成本,不盲目开启高推理。
  • 尽量把关键偏好显式写入配置,减少升级后默认值变化带来的漂移。

Agent 建议

低温稳定为默认

  • sisyphus / hephaestus / oracle / prometheus / metis / momus / librarian / explore 默认使用 temperature: 0.1
  • atlas 使用 temperature: 0.2,保留一点写作与整理时的自然度。
  • multimodal-looker 也保持 temperature: 0.1,避免图像/PDF解释过度发散。

只给关键角色开更强推理

  • sisyphusthinking.enabled + budgetTokens 16000,适合主编排与复杂判断。
  • prometheusthinking.enabled + budgetTokens 12000,适合需求梳理和计划生成。
  • metisthinking.enabled + budgetTokens 20000,适合前置风险扫描和复杂澄清。
  • oracle / momus / hephaestus:优先使用 reasoningEffort: high,不再额外堆很高的 thinking

Category 建议

创造性类别适度放宽

  • visual-engineeringtemperature: 0.2 + thinking.enabled,兼顾设计变化与结构化输出。
  • writingtemperature: 0.2 + thinking.enabled,让文档更自然,但仍保持受控。

复杂类别强调推理

  • ultrabraintemperature: 0.1 + reasoningEffort: xhigh
  • deeptemperature: 0.1 + reasoningEffort: high
  • unspecified-hightemperature: 0.1 + reasoningEffort: high

轻量类别保持便宜稳定

  • quicktemperature: 0.1
  • unspecified-lowtemperature: 0.1

什么时候需要调整

  • 如果输出太死板、文案味太重,可以先把 writingatlas0.2 微调到 0.25,不要一步拉太高。
  • 如果复杂任务经常出现分析不够深入,可优先提高 metissisyphus 的推理预算,而不是全局调高所有角色。
  • 如果感觉响应明显变慢、成本偏高,优先下调 visual-engineering / writingthinking,不要先动 quick / explore

当前验证方式

修改 ~/.config/opencode/oh-my-opencode.json 后,至少做以下检查:

python3 -c "import json, pathlib; p = pathlib.Path('~/.config/opencode/oh-my-opencode.json').expanduser(); json.loads(p.read_text()); print('JSON OK:', p)"
biome check ~/.config/opencode/oh-my-opencode.json

如需进一步校验字段合法性,可用 schema 做二次验证:

  • schema: https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/dev/assets/oh-my-opencode.schema.json

相关文件

  • ~/.config/opencode/oh-my-opencode.json
  • ~/.config/opencode/opencode.json
  • 01-technology/AI/oh_my_opencode_core_agents_guide_20260222.md

备注

这份建议偏向当前这套个人工作流:重视验证、反幻觉、稳定输出、按角色分层推理。后续若主力模型或插件 schema 变化,建议一起复查 agent 与 category 的映射。