Skip to content
Open CastalyConsole

Coding agents

OpenCode setup

Configure Modelflare as an OpenAI-compatible provider in OpenCode.

Create a Modelflare API key whose non-default group can access gpt-5.6-sol.

Terminal windowPowerShell
choco install opencode
opencode --version

Enter your project directory, then run the command for your system.

Terminal windowPowerShell
$config = @'
{
"$schema": "https://opencode.ai/config.json",
"model": "modelflare/gpt-5.6-sol",
"provider": {
"modelflare": {
"npm": "@ai-sdk/openai-compatible",
"name": "Modelflare",
"options": { "baseURL": "https://modelflare.dev/v1" },
"models": {
"gpt-5.6-sol": { "name": "GPT 5.6 Sol" }
}
}
}
}
'@
$utf8NoBom = New-Object System.Text.UTF8Encoding -ArgumentList $false
[System.IO.File]::WriteAllText(
(Join-Path (Get-Location) "opencode.json"),
$config,
$utf8NoBom
)

Start OpenCode in the same project directory:

Terminal windowbash
opencode

Enter /connect, choose Other, set the provider id to modelflare, and paste your Modelflare API key.

Enter /models, select modelflare/gpt-5.6-sol, and send:

Text
Reply with one short greeting.

A normal reply means setup is complete.