OPENCODE
OpenCode Integration
Use llm.market as an OpenAI-compatible provider inside OpenCode — any llm.market-hosted model becomes selectable in the TUI.
OpenCode
OpenCode wires providers through the Vercel AI SDK. Its openai-compatible adapter speaks any OpenAI-compatible endpoint.
Install
Example
curl -fsSL https://opencode.ai/install | bash
# or
npm install -g opencode-ai@latestConfigure llm.market as a provider
Example
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"llm-market": {
"npm": "@ai-sdk/openai-compatible",
"name": "llm.market",
"options": { "baseURL": "https://llm.market/v1" },
"models": {
"gpt-5.5": { "name": "GPT 5.5" },
"gpt-5.6-sol": { "name": "GPT 5.6 Sol" },
"claude-sonnet-5": { "name": "Claude Sonnet 5" },
"claude-opus-4-8": { "name": "Claude Opus 4.8" }
}
}
},
"model": "llm-market/gpt-5.5"
}Choosing models
Use ids from GET /v1/models. OpenCode should stay on the openai-compatible provider. Claude Code uses ANTHROPIC_BASE_URL=https://llm.market (no /v1) instead of this adapter.
Register the API key
Example
opencode auth loginSelect llm-market when prompted, then paste your llm.market API key starting with sk-.
Run it
Example
cd your-project
opencode
# Type /models inside the TUI to switch models.Troubleshooting
- Model replies with text but never edits files: pick a model marked Tools on the models page.
- Auth prompt loops: run opencode auth logout, then opencode auth login again and choose llm-market.
Need a key?
Create one in the dashboard. Discord for llm.market is coming soon.