Skip to content

How to use Blablador with OpenCode

Helmholtz Blablador is not only the most useful and private Chat Robot out there. You can also connect it to OpenCode, to get the best of both worlds. Imagine Claude Code, but entirely open source and PRIVATE!

OpenCode

Prerequisites

Steps

  1. Install OpenCode by following the instructions on the OpenCode website.
  2. Open the OpenCode application and close it, so it will create the necessary configuration files.
  3. Create or edit the configuration file. On Linux and Mac, it's at $HOME/.config/opencode/opencode.json.
  4. Add the following configuration to connect Blablador:
{
  "$schema": "https://opencode.ai/config.json",
  // Plugin for pruning context
  "plugin": ["@tarquinen/opencode-dcp@latest"],
  // The small model is used to generate texts for action summaries
  "model": "blablador/alias-fast",
  "small_model": "blablador/alias-fast",

"compaction": {
    "auto": true,
    "prune": true,
    "reserved": 10000
  },

  "provider": {
    "blablador": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Blablador",

      "options": {
        "baseURL": "https://api.blablador.fz-juelich.de/v1",
        "apiKey": "YOUR_BLABLADOR_API_KEY_HERE"
      },

      "models": {
        "alias-code": {
          "name": "Blablador Code (alias-code)",
          "limit": {
            "context": 98304,
            "output": 32768
          }
        },
        "alias-huge": {
          "name": "Blablador Minimax (alias-huge)",
          "limit": {
            "context": 98304,
            "output": 32768
          }
        },
        "alias-fast": {
          "name": "Blablador Fast (alias-fast)",
           "limit": {
            "context": 98304,
            "output": 32768
          }
        },
        "alias-large": {
          "name": "Blablador Large (alias-large)",
           "limit": {
            "context": 98304,
            "output": 32768
          }
        }
      }
    }
  }
}

And that's it! You can now use Blablador models within OpenCode for your coding and AI needs. Enjoy the power of open-source AI with privacy!