Repository navigation
fix(llama-cpp): stop recommending failed models during setup - #130136
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 9:40 AM ET / 13:40 UTC. ClawSweeper reviewWhat this changesThe PR prevents automatic llama.cpp setup from selecting models the server reports as failed, while retaining explicitly requested models. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessNo blocking patch defect found. This focused provider-setup repair should remain open for normal maintainer review; direct upstream llama.cpp contract verification and exact-head CI remain outstanding. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe llama.cpp plugin discovers models from an existing llama-server and maps them into OpenClaw provider setup. Guided and noninteractive setup select a default model, then produce provider and authentication configuration for the agent. flowchart LR
A[Existing llama-server] --> B[Model discovery]
B --> C[Model status mapping]
C --> D[Automatic setup selection]
D --> E[Guided or noninteractive setup]
E --> F[Provider and auth configuration]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -25, Tests +22. Total -3 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep failed rows out of automatic selection, preserve explicit operator model IDs, and verify the upstream catalog contract plus exact-head CI before landing. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main falls back to failed rows when no healthy row exists, making a failed-only catalog automatically selectable. This read-only review did not execute the test suite. Is this the best way to solve the issue? Yes: placing the exclusion in the shared automatic selector covers guided, interactive, and implicit noninteractive selection while explicit selection remains a separate path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ba7b912713a3. 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
|
|
ClawSweeper's two rank-up items are now verified:
The intended compatibility boundary is explicit: implicit guided, interactive, and noninteractive setup now reject a failed-only catalog without mutating auth profiles; an operator's explicitly selected failed model remains accepted. Baseline owner tests reproduced both failures (2 failed / 27 passed), then the final provider/auth/discovery/model siblings and real generic setup ingress passed 62 tests across five files. Scoped formatting, type-aware plugin lint, two independent reviews, and structured autoreview are clean. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users connecting an existing llama.cpp server through guided or noninteractive setup could be offered a model that has already failed to start when every advertised model is failed.
Why This Change Was Made
The upstream llama.cpp router marks a model as failed when it is unloaded and its last process exited unsuccessfully. OpenClaw's implicit selector filtered failed models but then fell back to those same failed models when none were healthy. Keep failed models out of automatic selection, while preserving an operator's explicitly requested model. Consolidate duplicated read-only guided discovery, managed-server exclusion, credential resolution, cancellation, and failure handling into their existing provider owner.
User Impact
Guided setup no longer recommends a broken existing-server model, and implicit noninteractive setup fails before changing authentication profiles. Operators who explicitly request a model retain their existing selection behavior. Managed llama.cpp setup, configured authorization headers, API keys, cancellation, discovery request counts, and existing diagnostic messages are unchanged.
Evidence
status == UNLOADED && exit_code != 0and exposes it asstatus.failedin the model catalog.