Connect OpenCode
2 minute read · Chats & Local Agents
OpenCode is a local coding agent. Its API provider supplies model access; Vortex supplies the surrounding project conversation and tools. OpenCode and the direct OpenRouter connection are separate choices.
- Install and connect
- Use OpenCode for project work
- Choose OpenCode or direct OpenRouter
- When a request fails
Install and connect
- Open Settings → AI providers → OpenCode.
- Check installation status and use Install if needed. Wait for installation and verification to complete.
- Add an account and start Sign in. Choose the API provider shown in the connection flow, such as OpenCode Zen, OpenRouter or DeepSeek.
- Enter the provider's API key in the protected API key field and choose Continue. Use the offered import flow only when you intend to import an existing local sign-in.
- Select OpenCode, the saved account and an available model in a conversation.
Keep keys in the connection settings, not in chat or project files. Saving a key records the connection; it is not proof that a paid model request will be accepted. Confirm the selected model with one small task.
Use OpenCode for project work
Ask it to inspect the selected project, make a bounded change and run the relevant check. OpenCode uses its own model catalog and agent protocol. The direct OpenRouter generation catalog is not added to OpenCode's coding-model list.
Access modes apply through the supported agent protocol. Vortex does not add an unsupported command-line Auto flag. Explicit provider denials and the project's permitted folders remain in effect. See permissions and approvals.
Choose OpenCode or direct OpenRouter
| Goal | Choose |
|---|---|
| Work on local project files with a coding agent | OpenCode and a connected API provider. |
| Chat directly with an OpenRouter text model | The separate OpenRouter provider. |
| Generate images, video or audio through OpenRouter | The separate OpenRouter provider and a compatible specialized model. |
Direct OpenRouter does not require OpenCode to be installed. An OpenRouter key saved for one account does not mean every other account has been configured.
When a request fails
Confirm the API provider, saved account and model. Read a reported quota, eligibility or authentication error before retrying. Inspect existing project changes after an interrupted agent run. Installing OpenCode again does not fix a rejected API key or add provider credit.