OpenCode
Configure OpenCode with an OpenAI provider override that points to Prismatic.
Configuration
- Place the config in
~/.config/opencode/opencode.jsonor the projectopencode.json. - Override the OpenAI provider
baseURLwithhttps://api.prismaticapi.com/v1. - Set
modeltoopenai/public-model-id. - Set
small_modelto a cheaper/faster model for lightweight work.
Example
{
"provider": {
"openai": {
"options": {
"baseURL": "https://api.prismaticapi.com/v1",
"apiKey": "pa_YOUR_KEY",
"timeout": 600000
}
}
},
"model": "openai/claude-sonnet-4-6",
"small_model": "openai/claude-haiku-4-5"
}export OPENAI_API_KEY="pa_YOUR_KEY" opencode auth login opencode models --refresh
Recommended models
claude-sonnet-4-6— strong model for reasoning, refactors and coding agents.claude-haiku-4-5— fast option for autocomplete, small questions and lightweight tasks.deepseek-v3-2or another public ID — alternative based on your active catalog and plan.
Troubleshooting
Authentication error
Check that the API key has no extra spaces and has not been revoked in the dashboard.
Model rejected
Use a public model ID returned by GET /v1/models; do not use labels or aliases.
Connection issue
Confirm the configured base URL is exactly the one shown above and that your network allows HTTPS to api.prismaticapi.com.
Notes
- Run
opencode auth loginif your local OpenCode setup stores credentials separately. - Run
opencode models --refreshif the model list is cached. - Use the
openai/prefix when OpenCode expects a provider/model name.