CLI / OPENCODE

OpenCode

Add Mengbi Router as a custom OpenAI-compatible provider in OpenCode.

!

Production integration docs · examples use router-api.mengbi-ai.net and a personal API key placeholder.

01 /

Prepare

Prepare OpenCode with a personal Mengbi Router key and a current model ID.

Prepare 1

Use the OpenCode configuration supported by your current installation.

bash
opencode --version
opencode

Prepare 2

OpenCode setup reference
Reference image for configuring OpenCode.
02 /

Configure

Connect OpenCode to the endpoint that matches its supported protocol.

Configure 1

Use the OpenCode configuration supported by your current installation.

text
Provider ID: mengbi
Display name: Mengbi Router
Base URL: https://router-api.mengbi-ai.net/v1
API Key: sk-mengbi-xxxxxx
Request headers: empty
Model: gpt-5.6-sol

Configure 2

OpenCode setup reference
Reference image for configuring OpenCode.

Configure 3

Use the OpenCode configuration supported by your current installation.