Last updated: August 27, 2026
OpenCode is an open coding agent with terminal, desktop and IDE interfaces. Logicc can be set up as your own provider. For GPT models, we recommend the Responses endpoint. Claude and Gemini routes via chat completions are considered conditionally compatible.
Beta: OpenCode, model provider and gateway compatibility evolve independently. Test tool calling, streaming and reasoning with the specific model route before using the integration productively.
LOGICC_API_KEY as an environment variable./models.macOS, Linux or WSL:
curl -fsSL https://opencode.ai/install | bash
Alternatively with npm:
npm install -g opencode-ai
opencode --version
macOS, Linux or WSL:
export LOGICC_API_KEY="YOUR_LOGICC_API_KEY"
Windows PowerShell:
$env:LOGICC_API_KEY = "YOUR_LOGICC_API_KEY"
The key is referenced in the configuration exclusively via the environment variable. Do not save it directly to opencode.json or Git.
curl "https://api.logicc.cloud/v1/models" \
-H "Authorization: Bearer $LOGICC_API_KEY"
Create a file opencode.json in the project folder. The following example contains both supported access paths in a common configuration. There is no need to overwrite it with a second example.
{
"$schema": "https://opencode.ai/config.json",
"model": "logicc-responses/gpt-5.6-terra",
"provider": {
"logicc-responses": {
"npm": "@ai-sdk/openai",
"name": "Logicc API, Responses",
"options": {
"baseURL": "https://api.logicc.cloud/v1",
"apiKey": "{env:LOGICC_API_KEY}"
},
"models": {
"gpt-5.6-terra": {
"name": "GPT-5.6 Terra via Logicc"
},
"gpt-5.6-luna": {
"name": "GPT-5.6 Luna via Logicc"
},
"gpt-5.6-sol": {
"name": "GPT-5.6 Sol via Logicc"
}
}
},
"logicc-compatible": {
"npm": "@ai-sdk/openai-compatible",
"name": "Logicc API, Chat Completions",
"options": {
"baseURL": "https://api.logicc.cloud/v1",
"apiKey": "{env:LOGICC_API_KEY}"
},
"models": {
"claude-sonnet-5": {
"name": "Claude Sonnet 5 via Logicc"
},
"gemini-2.5-pro": {
"name": "Gemini 2.5 Pro via Logicc"
}
}
}
}
}
@ai-sdk/openai uses /v1/responses and is preferred for GPT models with tool calls and reasoning. @ai-sdk/openai-compatible uses /v1/chat/completions and is used for other compatible model routes.
Remove models that are not unlocked for your API key. Other activated IDs can be added using the same pattern under models.
macOS, Linux or WSL:
jq empty opencode.json
opencode
On Windows, the JSON file can be checked using PowerShell, for example:
Get-Content .\opencode.json -Raw | ConvertFrom-Json | Out-Null
opencode
Open model selection:
/models
An overview of saved access data shows:
opencode auth list
This command is not a complete connection control. A connection is only confirmed after a successful model request.
| Models | Status | Notes |
|---|---|---|
gpt-5.6-terra, gpt-5.6-luna, gpt-5.6-sol |
Recommended | Intended for agentic GPT workflows |
gpt-5.1, gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.5 |
Conditionally compatible | Only with confirmed Responses and tool support for the route |
| Model family | Documented IDs | Status |
|---|---|---|
| Azure GPT | gpt-5, gpt-5-mini, gpt-5-nano, gpt-4o-mini, o3-mini, gpt-4.1-nano, gpt-4.1-mini, gpt-4o |
Test each model |
| Claude | claude-opus-5, claude-opus-4-8, claude-opus-4-6, claude-sonnet-5, claude-sonnet-4@20250514, claude-3-7-sonnet@20250219, claude-3-5-sonnet-v2@20241022, claude-haiku-4-5, claude-haiku-4-5@20251001 |
Experimental for agentic tools |
| Gemini | gemini-3.5-flash, gemini-3.1-flash-lite, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite |
Test each model |
For Claude, a native Anthropic client such as Claude Code is usually more compatible. With GPT-5.6, function tools may be rejected along with reasoning_effort via Chat Completions. Then use the Responses provider or set the reasoning effort to none.
gpt-4o-transcribe and gpt-4o-mini-transcribetext-embedding-3-small, text-embedding-3-large and gemini-embedding-001gemini-3.1-flash-image and gemini-2.5-flash-imageThe same opencode.json can be used by supported OpenCode surfaces. An environment variable set in the terminal is not automatically available to a separately started desktop or IDE process. Ensure that LOGICC_API_KEY is passed to the process via the specific environment's secret management.
We recommend the terminal interface for initial setup and error analysis.
OpenCode can automatically execute many model queries and tool steps. Consumption and costs depend heavily on the model, context length and number of work steps.
curl "https://api.logicc.cloud/api/governance/virtual-keys/quota" \
-H "Authorization: Bearer $LOGICC_API_KEY"
Budget, usage, and remaining budget are tracked in euros.
OpenCode works locally with shared files and terminal tools. Model processing does not take place locally. Prompts and relevant file or code snippets are transferred to the established model provider via the Logicc API. Plugins, MCP servers and web functions can create additional data flows.
| Error | Resolution |
|---|---|
| Provider or model is missing | Check JSON, enter model under provider.models and reopen /models |
401 |
Check LOGICC_API_KEY in the process context |
403 |
Check model availability and API key status |
404 |
Set base URL to https://api.logicc.cloud/v1 |
429 |
Check quota and rate limit |
| GPT-5.6 tools fail | Use Responses provider with @ai-sdk/openai |
Claude reports invalid tool_use.input |
The OpenAI-compatible conversion does not fully represent the Claude tool-call structure. Use Claude Code or another model. |
If you have any questions, write to [email protected] with the subject API. Share OpenCode version, operating system, provider, model ID, HTTP status, timestamp and complete error message, excluding the API key.
Further documentation: