
准备工作
参照官方文档安装命令行版本或桌面版本的 OpenCode。支持macOS, Windows, Linux。 GPT(CodeX) 和其他模型价格比例请参考 模型与价格找到 OpenCode 配置文件
macOS / Linux:~/.config/opencode/opencode.json
Windows:
%APPDATA%\opencode\opencode.json
或者
<用户目录>\.config\opencode\opencode.json
配置 GPT / CodeX 系列模型
参考下图修改opencode.json:


配置 Claude 系列模型

配置 Gemini 系列模型
