pi-hetzner-inference-provider

Pi extension for the Hetzner Experiments Inference API — OpenAI-compatible open-weight models, catalog aligned with models.dev

Packages

Package details

extension

Install pi-hetzner-inference-provider from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-hetzner-inference-provider
Package
pi-hetzner-inference-provider
Version
0.4.0
Published
Sep 8, 2026
Downloads
291/mo · 30/wk
Author
ipmanlk
License
MIT
Types
extension
Size
13.2 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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 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-provider

Setup

  1. Create an API key:

    • Log in at https://experiments.hetzner.com with your Hetzner account. A payment method (credit card) must be on file before the account lets you generate a token — even though the API is free while experimental.
    • On the left-hand sidebar, under APPS, select Inference.
    • Click the Create API Token button in the top-right corner.
  2. Set the token as an environment variable:

    echo 'export HETZNER_API_KEY="<your-token>"' >> ~/.bashrc
    source ~/.bashrc
    

    HETZNER_VLLM_API_KEY and HETZNER_INFERENCE_API_KEY are accepted as aliases. You can also run /login hetzner inside pi and paste the token there.

  3. Start pi and pick a model:

    pi
    # /model hetzner/Qwen3.8-27B
    

Available models

Model id Context Max output Modalities Thinking
Qwen/Qwen3.6-35B-A3B-FP8 262 144 262 144 text, image always on
Qwen3.8-27B 262 144 262 144 text, image always on
  • Qwen/Qwen3.6-35B-A3B-FP8 — open multimodal Qwen MoE (35B total / 3B active params) for agents that need vision and code. Released 2026-04-17.
  • Qwen3.8-27B — dense 27B vision-language model for coding, agent tasks, and image/video understanding. Released 2026-08-14.

Both models also support tool calling and structured output.

Context and max-output figures come from models.dev limit for the hetzner provider in models.dev; modalities from its modalities. The catalog is a static snapshot — there is no live refresh, so new models appear when this package is updated.

Hetzner's Inference Experiment continues in reduced scope: it now serves small Qwen models only. The large DeepSeek, GLM and Kimi deployments were retired in August 2026 (Hetzner blog). The definitive list of served models is always the /v1/models endpoint of the API.

Thinking levels

Thinking control matches models.dev's reasoning_options for the provider:

  • Qwen/Qwen3.6-35B-A3B-FP8 and Qwen3.8-27B — no reasoning_options in 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 URL https://inference.hetzner.com/api/v1.
  • API openai-completions (OpenAI Chat Completions) with vLLM compatibility flags: max_tokens (not max_completion_tokens), no store flag, system role only.
  • Thinking is sent as OpenAI-style reasoning_effort for models with reasoning_options in the models.dev catalog. Currently none of the served models have it: no thinking parameter is sent at all, mirroring OpenCode.
  • Catalog is a static snapshot of the models.dev hetzner provider (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-Agent header (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 hetzner to re-check the token.
  • Retired models (DeepSeek, GLM, Kimi): these deployments were shut down in August 2026 and will fail with a model-not-found error. Update to the latest version of this package and pick one of the Qwen models.

License

MIT