オープンコード
Anthropic 互換の Model Gate API を介して OpenCode に接続する
オープンコード
Anthropic プロバイダーを構成します。 ~/.config/opencode/opencode.jsonc Linux/macOS または C:\Users\%USERNAME%\.config\opencode\opencode.jsonc Windows 上で。
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anthropic": {
"options": {
"baseURL": "https://api.model-gate.com/v1",
"apiKey": "mg_live_..."
}
}
}
}
OpenCode の場合、 baseURL 含まれています /v1。ファイルを保存し、OpenCode を通常どおり起動します。