AiHummer
English
Log in
v1.0.x
{ }Swagger

BYOK & LLM providers

v1.0.x · updated 2026-07-05

AiHummer never requires a paid model. Out of the box it runs on free and local models and a Codex/ChatGPT-subscription transport, and if no model is wired at all the runtime falls back to a deterministic mock so the platform still starts and is testable. When you do want a specific model, you bring it yourself — either as a process-wide configuration or, per tenant, with BYOK (“bring your own key”).

Supported LLM providers

AiHummer speaks natively to any provider that exposes an OpenAI-style chat API, reaches other providers through an external LLM gateway, and supports the ChatGPT-subscription transport. In practice that covers:

Provider How it connects Notes
OpenAI Native OpenAI-compatible path (AIHUMMER_OPENAI_*)
Any OpenAI-API-standard endpoint The same native path: AIHUMMER_OPENAI_BASE_URL Local models, OpenRouter, Gemini’s OpenAI-compatible API, etc.
Anthropic Via the LLM gateway (AIHUMMER_LLM_*) Claude models; there is no native Anthropic client — the sidecar gateway holds the key itself
Codex / ChatGPT-subscription transport Subscription-based transport (AIHUMMER_CODEX_*) Uses a ChatGPT subscription rather than a metered API key

[!WARNING] No paid model API is ever mandatory. AiHummer works on free/local models and the Codex/ChatGPT-subscription transport, and if no model is configured the runtime uses a deterministic mock — the gateway still starts and responds. BYOK and paid keys are entirely optional.

Wiring a model with settings

The LLM keys are settings-catalog knobs (stored in the database): set them in the admin UI (Management → Settings) or with aihummer settings set, not in gateway.env. There are two independent wiring paths — do not mix their variables.

(a) The native OpenAI-compatible path. The gateway calls an OpenAI-compatible endpoint itself and passes the key itself:

aihummer settings set AIHUMMER_OPENAI_API_KEY sk-...
aihummer settings set AIHUMMER_OPENAI_BASE_URL https://api.openai.com/v1
aihummer settings set AIHUMMER_OPENAI_MODEL gpt-4o-mini

The same path works for a local OpenAI-compatible server, OpenRouter or Gemini’s OpenAI-compatible endpoint — just point AIHUMMER_OPENAI_BASE_URL at it.

(b) The remote LLM-gateway (sidecar) path. Requests go to your LLM gateway, which holds the provider keys itself — no API key passes through AiHummer at all:

aihummer settings set AIHUMMER_LLM_GATEWAY_URL http://127.0.0.1:8090
aihummer settings set AIHUMMER_LLM_PROVIDER anthropic
aihummer settings set AIHUMMER_LLM_MODEL claude-sonnet-4-5

[!WARNING] The paths do not combine: pairing AIHUMMER_LLM_GATEWAY_URL with AIHUMMER_OPENAI_API_KEY does nothing — no key is forwarded on the gateway path; the sidecar uses its own keys.

If neither path is configured, the deterministic mock is used.

BYOK: per-tenant keys

Where the environment variables configure a single process-wide model, BYOK lets each tenant supply its own LLM credentials. BYOK keys are managed from the admin API:

GET  /v1/admin/byok
POST /v1/admin/byok

BYOK keys are stored in the encrypted vault, just like every other credential — they are never written to logs or surfaced in the model context. This is what lets a multitenant deployment keep each customer’s model billing and key material fully separate.

Choosing between shared settings and BYOK

  • Use the AIHUMMER_OPENAI_* / AIHUMMER_LLM_* settings for a single-tenant or default model that the whole gateway should use.
  • Use BYOK when different tenants must use different keys, different providers, or be billed separately — the per-tenant key overrides the default for that tenant.

[!TIP] Because any OpenAI-API-standard endpoint is accepted, you can point AIHUMMER_OPENAI_BASE_URL at a local model server, OpenRouter, or a Gemini OpenAI-compatible endpoint without changing anything else in AiHummer.

How this relates to the rest of the access model

BYOK keys are model credentials and live in the same encrypted vault as Connections and shared/personal secrets. The difference is scope: BYOK answers which model and key this tenant uses, while the personal vs shared scope answers whose credentials a given tool call runs with.

Where to next