pi-hetzner-inference-provider
v0.2.0
Published
Pi extension for the Hetzner Experiments Inference API — OpenAI-compatible open-weight models, catalog aligned with models.dev
Maintainers
Readme
pi-hetzner-inference-provider
A Pi extension that registers the Hetzner Experiments Inference API as a
first-class provider: OpenAI-compatible open-weight models (Qwen, DeepSeek,
GLM, Kimi) served on Hetzner's own infrastructure. The model catalog mirrors
the hetzner provider in models.dev — the same catalog OpenCode ships — so
models, context/output limits, modalities and thinking levels behave exactly
like they do in OpenCode.
Install
# via npm
pi install npm:pi-hetzner-inference-provider
# via git
pi install git:github.com/ipmanlk/pi-hetzner-inference-provider
# local development
pi install ./pi-hetzner-inference-providerSetup
Create an API key:
- Log in at https://experiments.hetzner.com with your Hetzner account.
- On the left-hand sidebar, under APPS, select Inference.
- Click the Create API Token button in the top-right corner.
Set the token as an environment variable:
echo 'export HETZNER_API_KEY="<your-token>"' >> ~/.bashrc source ~/.bashrcHETZNER_VLLM_API_KEYandHETZNER_INFERENCE_API_KEYare accepted as aliases. You can also run/login hetznerinside pi and paste the token there.Start pi and pick a model:
pi # /model hetzner/Qwen/Qwen3.6-35B-A3B-FP8
Available models
| Model id | Context | Max output | Modalities | Thinking |
| ------------------------- | --------- | ---------- | ----------------- | --------------------- |
| DeepSeek-V4-Flash-0731 | 512 000 | 384 000 | text | off/low/high/max |
| GLM-5.2-NVFP4 | 512 000 | 131 072 | text | off/high/max |
| Kimi-K2.7-Code | 262 144 | 262 144 | text, image | always on |
| Qwen/Qwen3.6-35B-A3B-FP8| 262 144 | 262 144 | text, image | always on |
Context and max-output figures come from models.dev limit for the hetzner
provider; modalities from its modalities. The catalog is a static
snapshot — there is no live refresh, so new models appear when this package
is updated.
Thinking levels
Thinking control matches models.dev's reasoning_options for the provider:
- DeepSeek-V4-Flash-0731 —
reasoning_effortinnone/low/high/max, selectable in pi via/thinking(off →none, low →low, high →high, max →max). - GLM-5.2-NVFP4 —
reasoning_effortinnone/high/max(off →none, high →high, max →max). GLM's reasoning athigh/maxcan be very verbose on this experimental deployment — pickofffor fast responses. - Kimi-K2.7-Code and Qwen/Qwen3.6-35B-A3B-FP8 — no
reasoning_optionsin models.dev, so no thinking parameter is sent at all: the models reason natively and their thinking is displayed, exactly like in OpenCode.
How it works
- Provider id
hetzner, base URLhttps://inference.hetzner.com/api/v1. - API
openai-completions(OpenAI Chat Completions) with vLLM compatibility flags:max_tokens(notmax_completion_tokens), nostoreflag,systemrole only. - Thinking is sent as OpenAI-style
reasoning_effort(DeepSeek, GLM), mirroring the models.dev catalog; Kimi/Qwen get no thinking parameter. - Catalog is a static snapshot of the models.dev
hetznerprovider (no live refresh; update the package for new models). - Cost is tracked at $0 — the Inference API is free while in experimental status.
- A
User-Agentheader (pi-hetzner-inference-provider/<version>) is sent on model requests.
Troubleshooting
- Stuck on “Working…”: the Inference API is experimental and can be very
slow — first requests to a model can take a minute or more while it warms
up, and requests can hang when the service is under load. Retry, or switch
model. If the request eventually fails, run
/login hetznerto re-check the token. - GLM-5.2-NVFP4 too slow: GLM generates very verbose reasoning before
answering, which on this experimental deployment can take minutes. Set the
thinking level to
off(/thinking off, or model id suffix:offin/model) — thereasoning_effort: nonerequest disables reasoning completely.
