How to use OpenCode Go subscription from Claude Code?
To run Claude Code using alternative models (such as MiniMax or Qwen models available through OpenCode’s API service), you need to set up a local proxy like LiteLLM. Claude Code natively expects an Anthropic-compatible API. Medium Article
The workflow relies on this architecture:Claude Code → LiteLLM Proxy (localhost) → OpenCode Go API → Target Models. Medium Article
- Get your API Key: Sign up for an OpenCode Go subscription and generate an API key.
- Install a Proxy: Install LiteLLM , which allows you to translate API calls into formats understood by both Claude Code and OpenCode.
- Configure the Environment: Set your
ANTHROPIC_BASE_URLto your local LiteLLM proxy and pass your OpenCode API key toANTHROPIC_API_KEYin your environment. - Run Claude Code: Launch your terminal session and direct Claude Code to your local proxy. Insta Post , Medium Article , 3 , 4