Clef · Try the live demo →

OpenCode custom provider: connect Heabsy in opencode.json

OpenCode adds any OpenAI-compatible API as a custom provider through the @ai-sdk/openai-compatible package. Add a heabsy block with base URL https://api.heabsy.com/v1, list the models you want with their context and output limits, store the key with /connect, and pick the model with /models.

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "heabsy": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Heabsy",
      "options": { "baseURL": "https://api.heabsy.com/v1" },
      "models": {
        "qwen38": { "name": "Qwen3.8 27B", "limit": { "context": 262144, "output": 32768 } },
        "glm53": { "name": "GLM 5.3", "limit": { "context": 1048576, "output": 131072 } }
      }
    }
  }
}
Create a Heabsy key OpenAI base URL https://api.heabsy.com/v1 · Anthropic base URL https://api.heabsy.com

Where the file goes

opencode.json in the project root applies to that project; ~/.config/opencode/opencode.json applies everywhere. The provider key heabsy is the ID you will use with /connect and in model names such as heabsy/qwen38.

Store the key

  1. Run /connect, choose Other, enter the provider ID heabsy and paste the key. OpenCode keeps it in ~/.local/share/opencode/auth.json, outside your repository.
  2. Or reference an environment variable in the config: "options": { "baseURL": "https://api.heabsy.com/v1", "apiKey": "{env:HEABSY_API_KEY}" }.

Why the limits matter

Without limit.context OpenCode does not know when the conversation is about to overflow, and compaction either fires too late or not at all. Copy the window and output numbers from the table below; they come from our catalog.

Which model should I pick?

OpenCode is an agent: pick a model with tool calling. The models in the table run on our own hardware in the EEA without storing prompts; partner models such as kimi-k3 or deepseek-v4-pro work the same way but are marked as partner-hosted in the catalog.

ModelIDContextMax outputInput / 1MOutput / 1M
Qwen3.8 27B Fableqwen38-fable512K32K$0.095$0.58
Qwen3.8 27B Queenqwen38-queen512K32K$0.095$0.58
GLM 5.3 Flash Uncensoredglm53-flash-unc1M128K$0.1739$0.6957
MiMo V2.6 Flash Uncensoredmimo-v26-flash-unc1M64K$0.4404$1.4285
MiMo V2.6 Flashmimo-v26-flash1M64K$0.4762$1.4286
MiMo V2.6 Flash Abliteratedmimo-v26-flash-abl1M64K$0.4762$1.4286
GLM 5.3glm531M128K$0.5217$0.9565
Qwen3.8 27B Uncensored Fast by Heabsyqwen38-unc-fast512K230K$0.7904$2.4952
Qwen3.8 27B Uncensoredqwen38-unc1M230K$0.8095$2.5238
Qwen3.8 27Bqwen38256K32K$1.00$3.00
GLM 5.3 Uncensoredglm-5.3-uncensored1M128K$1.1905$2.1429
CyberHeabsycyberheabsy1M64K$1.4286$4.2857

All models above run on Heabsy hardware in the EEA; prompts and completions are not stored. Thecatalog also lists 23 partner-hosted models — Claude, GPT-6, Kimi K3, DeepSeek V4 and others — with the same key and invoice, but without zero data retention and without an EEA guarantee.

Verify it works

Run /models, choose Heabsy › Qwen3.8 27B, and ask OpenCode to read one file of your project. If it answers with the file's content, both the connection and tool calling work.

If the tool shows an error you cannot read, test the key on its own first — one short request outside the tool:

curl
curl https://api.heabsy.com/v1/chat/completions \
  -H "Authorization: Bearer $HEABSY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen38","max_tokens":16,"messages":[{"role":"user","content":"Say hi"}]}'

Troubleshooting

What you seeWhat to change
The Heabsy provider does not appear in /modelsThe JSON is not being read — check the file location, then validate it against the $schema. A missing npm field also hides the provider.
404 Not FoundThe base URL must end in /v1 and nothing else — no /chat/completions.
Context errors deep into a sessionAdd limit.context and limit.output for the model; without them compaction cannot work.
Model not foundUse the exact catalog ID (qwen38, glm53, mimo-v26-flash). GET /v1/models with your key lists the IDs it may call.
403 with an HTML page ("Sorry, you have been blocked")No key was sent at all: the key variable is empty or not set where the tool runs. Requests without a key are stopped before they reach the API; a wrong key gets a JSON 401 instead.

Where do my prompts go?

From OpenCode straight to api.heabsy.com. On our own models the request is processed in the European Economic Area and the text is not stored — we keep what billing needs: the model, the token counts and the time. Partner-hosted models are processed by third-party inference providers; each is marked in the catalog, and none of them carries the no-retention promise. The terms are in the data processing agreement, the invoice comes from an EU company.

FAQ

Is Heabsy in OpenCode's built-in provider list?+

Not yet: built-in providers come from models.dev, and our listing there is pending. Until then the custom provider block above does the same job; when the listing lands, /connect → Heabsy will be enough.

Which Heabsy model is best for OpenCode?+

Start with qwen38 — every speed figure on our site was measured on it. If you need a longer window, glm53 has 1,048,576 tokens and costs $0.52 / $0.96 per million input / output tokens. Both run in the EEA.

Can I use reasoning models?+

Yes. Our own Qwen3.8, GLM 5.3 and MiMo models expose reasoning; OpenCode shows it when the provider streams it.

Coming from Continue or Roo Code?+

Both projects stopped active development in 2026 — Roo Code shut down on 15 May, Continue became read-only in June. OpenCode reads the same OpenAI-compatible settings: base URL, key, model ID.

Also set up:Claude Code · Kilo Code · Cline

OpenCode is an open-source project; Heabsy is not affiliated with it.