Skip to content

Support llama.cpp as a managed local runtime with GGUF downloads and a compute-backend selector #6130

Description

@YellowSnnowmann

Summary

Support llama.cpp as a first-class local runtime: a bundled llama-server, a GGUF model downloader, and a compute-backend selector (CUDA / Metal / Vulkan / CPU) — the way OpenHuman already manages Ollama.

Problem

How to see the gap today

  1. Open Connections → LLM (left nav, API keys group) → LLM Providers tab → Add a provider.
  2. The Local runtimes group offers LM Studio, Ollama and OMLX (app/src/components/settings/panels/ai/ProviderAuthSection.tsx:51, labels at aiPanelTypes.ts:172-176). There is no llama.cpp entry, no GGUF browser, and no compute-backend control anywhere in the app.
  3. The only way to reach llama.cpp is to build/install it yourself, run llama-server on 127.0.0.1:8080, and point OpenHuman at it as a generic local-openai: endpoint via config.toml / LOCAL_OPENAI_URL.

Today a llama.cpp user has to do all of the setup themselves and OpenHuman only meets them at the end of it.

  • The managed local runtime — the one OpenHuman installs, spawns and supervises — knows exactly two providers: LocalAiProvider::{Ollama, LmStudio} (src/openhuman/inference/local/provider.rs:6-9). OMLX, MLX and local-openai are reachable as provider profiles (src/openhuman/inference/local/profile.rs) but the user runs the server themselves; nothing installs or manages them.
  • llama.cpp is reachable only as a generic OpenAI-compatible endpoint: "llamacpp" | "llama.cpp" | "vllm" all map to LocalProviderKind::LocalOpenai (src/openhuman/inference/local/profile.rs:57), routed as local-openai:<model> against http://127.0.0.1:8080/v1 (profile.rs:185-201). The user must build or install llama.cpp, pick a backend at compile time, fetch the GGUF, and run llama-server before OpenHuman is any help. That path also carries ToolSupport::PromptGuided rather than native tool calling.
  • There is no GGUF handling anywhere. grep -rni gguf over src/ and app/src returns two hits, neither a download path: an extension check in src/openhuman/inference/model_ids.rs:175 and a comment about Ollama's advertised context window in src/openhuman/inference/local/ollama.rs:374.
  • There is no compute-backend concept — nothing chooses or reports CUDA vs Metal vs Vulkan vs CPU, and detect_gpu is best-effort enough that it reports "unknown" on non-Apple platforms (src/openhuman/inference/device.rs:28-33).

So the request is for llama.cpp to get the treatment Ollama already has: install it, download weights into it, pick the accelerator, and route to it — rather than being the fallback for "some OpenAI-shaped thing is listening on 8080".

Solution (optional)

  • Add a LlamaCpp variant to LocalAiProvider with its own bootstrap: fetch a prebuilt llama-server for the host's platform and accelerator, spawn and supervise it the way the Ollama service path does (src/openhuman/inference/local/service/).
  • A GGUF model manager: browse/download a quantisation into the workspace, and list what is already present, alongside the existing local-model picker.
  • A compute-backend setting (Automatic / CUDA / Metal / Vulkan / CPU) that selects the matching llama-server build, with the resolved backend shown in settings.
  • Give it a real provider profile (llamacpp:<model>) rather than folding it into local-openai, so its tool-calling and context-window behaviour can be described accurately instead of inheriting the generic defaults.

Note on scope: the same report also asked for keyless SearXNG web search, GPU/VRAM monitoring, and a computer-use button in the composer. The first two are tracked separately (see Related); they are not part of this issue.

Acceptance criteria

  • Managed runtime — llama.cpp installs, starts, stops and reports status through OpenHuman, without the user running llama-server by hand.
  • GGUF management — a model can be downloaded and selected from within the app, and already-present GGUFs are listed.
  • Backend selection — the compute backend is selectable and the effective backend is displayed; an unavailable backend degrades to CPU with a visible reason rather than failing to start.
  • Routing — llama.cpp is selectable per workload in AI routing with its own provider profile, not via local-openai:.
  • Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNet-new user-facing capability or product behavior.local-aiLocal model runtime, Ollama integration, and local AI config.priority: p2Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions