TUTORIAL
How to run Qwen 3.5 with OpenCode
Run the OpenCode terminal agent on Alibaba's Qwen 3.5 397B, served by Nebius Token Factory through NConnect, without editing your OpenCode config.
OpenCode already speaks the OpenAI-compatible format Nebius serves, so NConnect needs no proxy here: it launches OpenCode with Nebius configured as a provider for that one run. Qwen 3.5 397B is Alibaba's mixture-of-experts flagship for general and coding work, with a 262K-token context window.
Prerequisites
- macOS or Linux.
- A Nebius Token Factory API key from tokenfactory.nebius.com.
Steps
Install NConnect
This installs the CLI and the
nopencodealias, plus Bun if needed.curl -fsSL https://nconnect.sh/install.sh | bashAdd your Nebius API key
nconnect configureInstall OpenCode
Skip this if
opencodeis already on your PATH. In an interactive terminal, NConnect also offers to run this for you the first time you launch OpenCode.npm install -g opencode-ai@latestLaunch OpenCode on Qwen 3.5
nconnect --model Qwen/Qwen3.5-397B-A17B opencodeArguments after
opencodego to OpenCode, sorunworks for one-off tasks:nconnect --model Qwen/Qwen3.5-397B-A17B opencode run "summarize the open TODOs"
What NConnect does on launch
- Passes a generated config with a
nebiusprovider through the environment, and selectsnebius/Qwen/Qwen3.5-397B-A17Bon the command line so it wins over the default model in your own~/.config/opencode. - Limits
/modelsto the NConnect catalog, with real context limits and per-token prices, instead of hundreds of unrelated models. - Replaces the build agent's "You are OpenCode" framing with a neutral prompt, so the model doesn't misreport what it is.
- Registers a
@visionsubagent pinned to a vision-capable model.
Switch models in the session
Use /models inside OpenCode to move between Nebius models without restarting. Pick a vision model such as Kimi K2.6 before pasting images.
