OpenCode can call Phaseo through a custom OpenAI-compatible provider. Use this setup when you want OpenCode model selection, usage, and routing to go through one Phaseo API key.
Use the Phaseo CLI to install OpenCode when needed, add a global provider, sync all compatible Phaseo models, and store a dedicated key in OpenCode’s credential store:
The command creates a non-expiring Phaseo CLI: OpenCode API Key, preserves unrelated OpenCode settings and credentials, and supports --dry-run. It updates an existing global opencode.jsonc when present, otherwise it uses ~/.config/opencode/opencode.json.
Use --catalog default to configure only the selected model, or --skip-install when OpenCode is managed separately.
The CLI retains its own copy in the OS credential store and revokes the key when you run phaseo integrations remove opencode.
Manual configuration
Create or update opencode.json in your project, or your global OpenCode config:
Add or remove models from the models object to match the Phaseo model ids you want in OpenCode.
2) Start OpenCode
Restart OpenCode after editing the config, then choose the Phaseo model from /models.
Remove only the Phaseo provider later with:
Verification
- Run a small prompt before using file-editing workflows.
- If a model is rejected, confirm the exact id with the Models endpoint.
- If authentication fails, rerun
phaseo opencode and check opencode auth list.
Add docs context
To let OpenCode read Phaseo docs during a session, add the Docs MCP server as well. Last modified on August 14, 2026