OpenCode
Install OpenCode
npm install -g open_codeEdit the Configuration File
macOS / Linux
~/.config/opencode/opencode.jsonWindows
C:\Users\<YOUR_USERNAME>\.config\opencode\opencode.json{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anthropic": {
"name": "Anthropic",
"options": {
"baseURL": "https://gateway.theturbo.ai"
}
},
"openai": {
"options": {
"baseURL": "https://gateway.theturbo.ai"
},
"models": {
"gpt-5.2": {
"options": {
// Important:
// The `include` and `store` options must be configured as shown below.
// Incorrect settings may cause the model to behave unexpectedly.
"include": ["reasoning.encrypted_content"],
"store": false,
// Controls the depth of reasoning performed by the model
"reasoningEffort": "high",
// Controls the verbosity of the generated text output
"textVerbosity": "high",
// Automatically generate a reasoning summary
"reasoningSummary": "auto"
}
},
"gpt-5.2-codex": {
"options": {
"include": ["reasoning.encrypted_content"],
"store": false
}
}
}
},
"gateway.theturbo": {
// Configuration for third-party OpenAI-compatible providers
"npm": "@ai-sdk/openai-compatible",
// Display name shown in the UI
"name": "gateway.theturbo",
"options": {
// Base URL of the AI Gateway service
"baseURL": "https://gateway.theturbo.ai"
},
"models": {
"deepseek-v3.2": {
// Model ID. This value can be changed as needed.
// Refer to the AI Gateway model list for available model IDs.
"name": "DeepSeek V3.2"
}
}
}
}
}
Add Authentication Credentials
Step 1: Add OpenAI Credentials
Step 2: Add Anthropic Credentials
Step 3: Add AI Gateway as a Custom Provider
Example CLI Interaction
Use OpenCode
Start OpenCode by running:
Initialize on First Use
Switch Models
Plan and Build Modes
Install Oh My OpenCode
Configure Oh My OpenCode
Last updated