Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Hetzner Inference as a Provider for OpenCode

Use the Hetzner Inference API as a custom model provider in opencode.

Experimental — The Hetzner Inference API is currently an experiment and free of charge. Pricing, rate limits, and available models may change. This project is not affiliated with or endorsed by Hetzner.

Setup

Security note — The token is stored as plain text in ~/.config/opencode/hetzner-token. Anyone with filesystem access to your machine can read it. opencode's {file:...} substitution is a convenience, not encryption.

  1. Get an API token from experiments.hetzner.com

  2. Save your token globally:

echo "your_hetzner_token" > ~/.config/opencode/hetzner-token
  1. Copy opencode.json into ~/.config/opencode/opencode.json (merge with any existing config).

  2. (Optional) To default to a Hetzner model in a specific project, add to its opencode.json:

{ "model": "hetzner/deepseek-v4-flash" }
  1. Restart opencode — Hetzner models appear in /models everywhere.

Available models

Model ID Description Context
hetzner/deepseek-v4-flash DeepSeek V4 Flash (304B MoE, 13B active) 512K
hetzner/glm-5.2 GLM 5.2 (744B MoE, 40B active) 512K
hetzner/kimi-k2.7-code Kimi K2.7 Code (1T MoE, 32B active) 262K
hetzner/qwen3.6-35b Qwen 3.6 35B A3B (35B MoE, 3B active) 262K

How it works

The global config defines hetzner as a custom provider using @ai-sdk/openai-compatible pointed at the Hetzner Inference API. The token is read from ~/.config/opencode/hetzner-token via {file:hetzner-token} — resolved relative to the config file directory. No env vars needed, no per-project setup.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors