Use Gradiated with OpenCode
Add Gradiated as an OpenCode provider. Your current provider and default model stay unchanged.
Set up automatically
Run the Gradiated wizard:
The wizard adds the provider and available models to your user configuration. It preserves your default model and writes a backup before it changes the file.
Start OpenCode after the wizard finishes:
Run /models and choose Gradiated when you want to switch models.
Set up manually
Set your Gradiated API key in the shell that starts OpenCode:
Add Gradiated to opencode.json
Add this provider to your project or user configuration. Keep the API key in the environment.
Replace YOUR_MODEL_ID with an ID from models and pricing.
The adapter adds the Chat Completions path, so baseURL stays https://api.gradiated.com.
Select the model
Start OpenCode and run:
Choose the Gradiated provider and model.
Add model limits when needed
Add the model context and output limits when you want OpenCode to enforce them:
Use the limits from the selected model.
Troubleshooting
- Check that
GRADIATED_API_KEYis set in the same shell that starts OpenCode. - Check that
baseURLishttps://api.gradiated.com. - Check that the model ID matches the catalog response.
- Check that the workspace has billing capacity.
- Run
opencode auth listif OpenCode reports a provider authentication error.
Uninstall
Run the uninstall command:
Select OpenCode. The wizard removes the provider and stored credential. It keeps a timestamped backup.
OpenCode's provider documentation covers custom provider settings and the /models command.