Skip to content

llama.cpp model manager

The llama.cpp extension is a hidden core extension that lets you manage local llama.cpp router models from the TUI. It is not listed in the bundled-extension manifest, but it is registered at boot as a built-in extension.

Core built-in

Shipped as part of the Selesai core runtime; not listed in the extension manifest.

Runtime surface
Slash command

Setup and prerequisites

  • Available only in interactive TUI mode.
  • Requires a running llama.cpp-compatible server.
  • Configure the server URL with /login llama.cpp before using /llama.
  • Hugging Face search and downloads need HF_TOKEN for gated models.

What it sets up

  • Registers the /llama slash command and the llama.cpp provider.
  • Reads provider auth from the model registry.
  • Restores the last successful server model catalog across restarts and refreshes it when the server is available.
  • Uses server-reported context limits for output capacity and records streamed token usage.
  • Fails gracefully when the server is unreachable, offering retry or close.

What you can configure

Core llama.cpp model management is configured via provider auth and slash commands. It is a hidden built-in extension, not a manifest entry.

Configuration locations and precedence

  1. Provider auth
    /login llama.cpp
    Credentials and base URL are stored via the model registry's provider auth flow.

Settings

Key / pathType, default, and valuesDescription
baseUrlstring
Default: —
Llama.cpp server URL. /login stores the URL in provider auth env.LLAMA_BASE_URL. At runtime, LLAMA_BASE_URL env var (if set) takes precedence over that stored value.
apiKey🔒string
Default: —
Optional API key for the llama.cpp server. Stored in provider auth; falls back to LLAMA_API_KEY env var at runtime if no stored key exists.

Environment variables

Key / pathDescription
LLAMA_BASE_URLHighest-priority runtime override for the configured llama.cpp server URL. Also used as the default during /login if no URL is entered.
LLAMA_API_KEY🔒Runtime fallback API key for the llama.cpp server.
HF_TOKEN🔒Hugging Face token used to search and download gated models.

Command, tool, and shortcut controls

Key / pathDescription
/login llama.cppConfigure base URL and optional API key for the llama.cpp provider.
/llamaOpen the TUI model manager. Only available in interactive mode.

Source evidence

What you can do

  • List loaded, sleeping, and unloaded models on the configured server.
  • Load or unload models.
  • Download new models from Hugging Face, including gated models with HF_TOKEN.
  • Select quantization when a model offers multiple options.

Commands, tools, and shortcuts

  • /login llama.cpp — set the server base URL and optional API key.
  • /llama — open the model-management TUI. Not available outside interactive mode.
  • Provider auth is the primary configuration surface. LLAMA_BASE_URL overrides the stored base URL at runtime.

Limits and safety

  • Only interactive sessions can open /llama.
  • Downloading gated models requires accepting access terms at Hugging Face and a valid HF_TOKEN on the server.
  • Loading a model may unload other models depending on server capacity.
  • Local-server failures are reported as warnings, not crashes.

Source evidence

Selesai version: 0.10.0