KosComputeAPI
Integrations

OpenCode

Configure an OpenAI-compatible OpenCode provider with a current model ID.

View Markdown

Create or update an OpenCode custom OpenAI-compatible provider using the canonical base URL and environment variable.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "koscompute": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "KosCompute",
      "options": {
        "baseURL": "https://api.koscompute.com/v1",
        "apiKey": "{env:KOSCOMPUTE_API_KEY}"
      },
      "models": {
        "qwen/qwen3.8-27b": {"name": "KosCompute coding model"}
      }
    }
  },
  "model": "koscompute/qwen/qwen3.8-27b"
}

OpenCode configuration schemas can evolve. The API-specific parts tested by this portal are the base URL, Bearer authentication, model ID, Chat Completions streaming, reasoning controls, structured output, and local tool calls. Confirm the surrounding config keys against your installed OpenCode version.

Type to search guides, models, and API reference.