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.
Setup and prerequisites
- Available only in interactive TUI mode.
- Requires a running llama.cpp-compatible server.
- Configure the server URL with
/login llama.cppbefore using/llama. - Hugging Face search and downloads need
HF_TOKENfor gated models.
What it sets up
- Registers the
/llamaslash command and thellama.cppprovider. - 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
- Provider auth
/login llama.cpp
Credentials and base URL are stored via the model registry's provider auth flow.
Settings
| Key / path | Type, default, and values | Description |
|---|---|---|
baseUrl | string 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 / path | Description |
|---|---|
LLAMA_BASE_URL | Highest-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 / path | Description |
|---|---|
/login llama.cpp | Configure base URL and optional API key for the llama.cpp provider. |
/llama | Open the TUI model manager. Only available in interactive mode. |
Source evidence
src/core/llama/index.tsllama.cpp sourcesrc/core/built-in-extensions.tsBuilt-in extensionssrc/core/llama/client.ts
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_URLoverrides 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_TOKENon the server. - Loading a model may unload other models depending on server capacity.
- Local-server failures are reported as warnings, not crashes.