Repository navigation
refactor(llama-cpp): use one provider for managed and existing servers - #126434
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 19, 2026, 4:17 PM ET / 20:17 UTC. ClawSweeper reviewWhat this changesThis PR unifies managed and operator-run llama.cpp servers under the Merge readinessKeep open: the consolidation has strong live behavior evidence, but it removes a released Plugin SDK export and can break installed third-party plugins at import time. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe llama.cpp plugin turns operator setup into a model-provider configuration used by OpenClaw’s agent runtime. It either supervises a local server or discovers models from an existing server before agent requests use that provider. flowchart LR
Setup[Operator setup] --> Mode[Managed or existing server]
Mode --> Config[llama-cpp provider config]
Config --> Discovery[Model discovery]
Config --> Runtime[Agent model requests]
Mode --> Supervisor[Managed server supervisor]
Discovery --> Runtime
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -147, Tests -165, Docs -212. Total -524 across 41 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the unified provider design, but retain the released Do we have a high-confidence way to reproduce the issue? Yes — a plugin importing Is this the best way to solve the issue? No — moving bundled callers does not require deleting the released SDK export; preserve it with a deprecation path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f68503084b7a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready proof for
ClawSweeper review: #126434 (comment) The actionable P1 and its Rank-up move are addressed: the released Production LOC: +808/-954 (net -146) | Tests: +689/-846 (net -157) | Docs: +166/-378 (net -212) |
|
Merged via squash.
Follow-up: #126498 fixed endpoint-auth reproducibility for existing llama-server setup while deleting the remaining beta-only doctor migration and duplicate live-catalog scaffolding. |
openclaw#126434) * refactor(llama-cpp): unify server ownership modes * test(llama-cpp): preserve shared discovery limits * fix(plugin-sdk): retain provider auth removal export
Related: #125781
Related: #116765
What Problem This Solves
The newly added external llama-server path represented managed and existing servers as two different LLM providers even though both use the same llama-server protocol, OpenAI-compatible transport, model discovery, tool-schema policy, and model semantics. Operators would have to change model namespaces when only process ownership changed, while the plugin maintained duplicate setup, discovery, catalog, auth, and documentation surfaces.
Why This Change Was Made
This change makes
llama-cppthe single provider identity and treats server ownership as provisioning state. Interactive setup now offers Managed local server and Existing llama-server for the samellama-cpp/*model namespace; the presence oflocalServiceremains the canonical signal that OpenClaw owns the process.The refactor also moves guarded
/modelsplus llama.cpp/propsdiscovery into the shared self-hosted owner, deletes the unshippedllama-server/*namespace and duplicate registration, and keeps endpoint credential isolation, explicit Authorization precedence, router metadata, dynamic models, structured output, managed embeddings, and custom OpenAI-compatible llama-server routes intact.The removed provider namespace had not appeared in a release tag, so no compatibility alias or migration is retained.
Production LOC: +808/-954 (net -146) | Tests: +689/-846 (net -157) | Docs: +166/-378 (net -212)
AI-assisted. I reviewed the implementation, architecture, and proof directly.
User Impact
Operators can switch between an OpenClaw-managed llama-server and an already-running local, private, or remote llama-server without changing provider or model references. Both modes use
llama-cpp/<model>.Existing managed setup, GGUF downloads, local embeddings, and supervisor behavior remain unchanged. Existing-server setup still discovers models and capabilities automatically and prevents credentials from crossing endpoint changes.
Evidence
Focused source tests:
Post-rebase exact-head sanity:
Plugin and SDK contracts:
Local changed gates and build:
Real llama-server proof:
Autoreview: