Skip to main content

thv llm

Manage LLM gateway authentication

Synopsis

Configure and manage authentication for OIDC-protected LLM gateways.

The llm command bridges AI coding tools to LLM gateways by handling OIDC authentication transparently. Two modes are supported:

Proxy mode — a localhost reverse proxy injects fresh tokens for tools that only accept static API keys (e.g. Cursor). Token helper — "thv llm token" prints a fresh JWT suitable for use as apiKeyHelper or auth.command in OIDC-capable tools (e.g. Claude Code).

To configure the gateway connection settings, use:

thv llm config set --gateway-url https://llm.example.com
--issuer https://auth.example.com
--client-id my-client-id

Use "thv llm config show" to view the current configuration.

Options

-h, --help help for llm

Options inherited from parent commands

--debug Enable debug mode

SEE ALSO

  • thv - ToolHive (thv) is a lightweight, secure, and fast manager for MCP servers
  • thv llm config - Manage LLM gateway configuration
  • thv llm proxy - Manage the LLM gateway localhost proxy
  • thv llm setup - Configure detected AI tools to use the LLM gateway
  • thv llm teardown - Remove LLM gateway configuration from all (or one) configured tools
  • thv llm token - Print a fresh LLM gateway access token to stdout