Inkling Small in OpenCode nutzen

2 Minuten

Das gestern veröffentlichte Open-Weights-Modell Inkling-Small ist mit 276 Milliarden Parametern deutlich kleiner und kostengünstiger als das Ursprungsmodell Inkling mit 975 Milliarden Parametern, erreicht aber dennoch vergleichbare Leistungen. Erstaunlicherweise übertrifft es das Original sogar in manchen Bereichen.

Ich wollte es daher in OpenCode über den Provider together.ai ausprobieren, doch es wird nicht zur Auswahl angeboten. Das scheint ein Bug in OpenCode zu sein, denn ähnliche Berichte finden sich auch in den GitHub Issues.

Um das Modell trotzdem verwenden zu können, habe ich mir einen Workaround überlegt: Mit dem folgenden Skript wird das Modell in ~/.cache/opencode/models.json hinzugefügt und steht dann unter Recent zur Auswahl. OpenCode sollte währenddessen geschlossen sein. Works for me.

#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FILE="${1:-$HOME/.cache/opencode/models.json}"

if [[ ! -f "$FILE" ]]; then
  echo "Fehler: $FILE nicht gefunden" >&2
  exit 1
fi

if ! command -v python3 >/dev/null 2>&1; then
  echo "Fehler: python3 wird benötigt" >&2
  exit 1
fi

python3 - "$FILE" <<'EOF'
import json
import sys

path = sys.argv[1]
provider = "togetherai"
key = "thinkingmachines/Inkling-Small"

with open(path) as f:
    raw = f.read()

data = json.loads(raw)

if key in data[provider]["models"]:
    print(f"'{key}' existiert bereits in '{provider}', nichts zu tun.")
    sys.exit(0)

entry = {
    "id": key,
    "name": "Inkling Small",
    "description": "Compact multimodal MoE reasoning model (276B total, 12B active) for text, image, and audio",
    "family": "ling",
    "attachment": True,
    "reasoning": True,
    "reasoning_options": [
        {"type": "effort", "values": ["max", "xhigh", "high", "medium", "low", "none"]}
    ],
    "tool_call": True,
    "temperature": True,
    "release_date": "2026-07-29",
    "last_updated": "2026-07-29",
    "modalities": {"input": ["text", "image", "audio"], "output": ["text"]},
    "open_weights": True,
    "limit": {"context": 1048576, "output": 131072},
    "cost": {"input": 0.5, "output": 1.2, "cache_read": 0.1},
}

models = data[provider]["models"]
models[key] = entry
data[provider]["models"] = {k: models[k] for k in sorted(models.keys())}

raw = json.dumps(data, separators=(",", ":"), ensure_ascii=False)
json.loads(raw)

with open(path, "w") as f:
    f.write(raw)

print(f"'{key}' wurde zu '{provider}' in {path} hinzugefügt.")
EOF

Vorherige