
Prerequisites
Follow the official documentation to install either the command-line version or the desktop version of OpenCode. Supported platforms: macOS, Windows, and Linux. For pricing ratios of GPT (CodeX) and other models, please refer to Models & Pricing.Locate the OpenCode Configuration File
macOS / Linux:~/.config/opencode/opencode.json
Windows:
%APPDATA%\opencode\opencode.json
or
<User Home Directory>\.config\opencode\opencode.json
Configure GPT / CodeX Models
Modifyopencode.json as shown below:


Configure Claude Models

Configure Gemini Models
