Coding agents
OpenCode setup
Configure Modelflare as an OpenAI-compatible provider in OpenCode.
1. Create an API key
Section titled “1. Create an API key”Create a Modelflare API key whose non-default group can access gpt-5.6-sol.
2. Install OpenCode
Section titled “2. Install OpenCode”choco install opencodeopencode --versioncurl -fsSL https://opencode.ai/install | bashopencode --version3. Create opencode.json
Section titled “3. Create opencode.json”Enter your project directory, then run the command for your system.
$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)cat > opencode.json << 'EOF'{ "$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" } } } }}EOF4. Connect your API key
Section titled “4. Connect your API key”Start OpenCode in the same project directory:
opencodeEnter /connect, choose Other, set the provider id to modelflare, and paste your Modelflare API key.
5. Select the model and test
Section titled “5. Select the model and test”Enter /models, select modelflare/gpt-5.6-sol, and send:
Reply with one short greeting.A normal reply means setup is complete.