TUTORIAL
How to run Qwen 3.8 with OpenCode
Run the OpenCode terminal agent on Alibaba's Qwen 3.8 27B, 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.8 27B is Alibaba's dense reasoning model for coding and long-horizon agent work, with tool calling, image input and 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.8
nconnect --model Qwen/Qwen3.8-27B opencodeArguments after
opencodego to OpenCode, sorunworks for one-off tasks:nconnect --model Qwen/Qwen3.8-27B 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.8-27Bon 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. Qwen 3.8 reads images itself; on a text-only model, pick one that does, such as Kimi K3, before pasting images.
