OpenCode 설정
OpenCode를 OpenAI 호환 공급자로 Modelflare에 연결하고 지원되는 모델과 그룹을 전환합니다.
1. API 키 만들기
기본이 아닌 그룹이 gpt-5.6-sol에 액세스할 수 있는 Modelflare API 키를 생성합니다.
2. OpenCode 설치
Windows PowerShell
choco install opencode
opencode --version
Linux 또는 macOS
curl -fsSL https://opencode.ai/install | bash
opencode --version
3. opencode.json 생성
프로젝트 디렉터리를 입력한 다음 시스템에 대한 명령을 실행합니다.
Windows PowerShell
$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
)
Linux 또는 macOS
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" }
}
}
}
}
EOF
4. API 키 연결
동일한 프로젝트 디렉터리에서 OpenCode를 시작합니다.
opencode
/connect를 입력하고 기타를 선택한 후 공급자 ID를 modelflare로 설정하고 Modelflare API 키를 붙여넣습니다.
5. 모델을 선택하고 테스트하세요.
/models를 입력하고 modelflare/gpt-5.6-sol를 선택한 후 다음을 보냅니다.
짧은 인사말 하나로 답장하세요.
정상적인 응답은 설정이 완료되었음을 의미합니다.