Yes—OpenCode can work with a GitHub Copilot subscription by treating it as a provider you connect to from inside OpenCode. The official OpenCode provider docs describe a device authorization flow: from the OpenCode TUI, run /connect, search for “GitHub Copilot,” and follow the prompt to visit github.com/login/device to enter the device code and authorize. After authorization completes, you run /models to select a Copilot-backed model. In other words, you’re not pasting an API key into a random config file; you’re linking your GitHub account via a standard device login flow and then selecting models through OpenCode’s normal model-selection interface.
There are two practical details to keep in mind when using Copilot through OpenCode. First, model availability can depend on your subscription tier and on which models you’ve enabled in your GitHub Copilot settings. The provider docs explicitly note that some models may require a higher-tier subscription, and some models must be manually enabled in Copilot settings before OpenCode can use them. Second, authentication and model selection are stateful: OpenCode stores credentials in auth.json under its local storage directory (~/.local/share/opencode/ on macOS/Linux, and %USERPROFILE%\.local\share\opencode on Windows). That’s convenient because it persists across sessions, but it also means that when something changes (expired authorization, policy updates, account changes), you may need to re-run /connect to refresh credentials. If you see errors that imply authentication problems, OpenCode’s own troubleshooting flow is straightforward: re-authenticate with /connect, verify network access to the provider endpoints, and check logs for the specific failure cause.
In day-to-day development, Copilot support is most useful when you want a subscription-backed model available directly inside OpenCode’s terminal workflow—especially when you’re doing repo-wide tasks rather than single-file autocomplete. For example, if you’re implementing a new feature that adds vector search to a service (maybe creating an embedding pipeline and persisting vectors in Milvus or Zilliz Cloud), the work isn’t just “write a function.” You’re editing configs, adding migrations, updating tests, wiring environment variables, and validating performance. In that kind of task, OpenCode’s TUI + multi-session behavior can be a good pairing with a Copilot subscription: one session can focus on “implement + test,” another can focus on “docs + cleanup,” and you can keep everything anchored to your local repo state. The key is to treat Copilot as one provider among many: connect it cleanly, select models via /models, and when things fail, troubleshoot using logs and the /connect reauth loop rather than guessing.
