Repository navigation
fix(llama-cpp): stop hijacking explicitly configured HTTP provider routes - #118293
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 8:03 PM ET / August 3, 2026, 00:03 UTC. ClawSweeper reviewWhat this changesThe PR restricts llama.cpp’s native inference hook to the canonical Merge readinessKeep this PR open for landing: current Priority: P1 Review scores
Verification
How this fits togetherOpenClaw resolves a configured model into a provider runtime hook before registering a stream. A provider plugin may return a native stream function, but when it declines the model route, the agent runtime falls back to the configured API transport, which sends requests to the model’s HTTP base URL. flowchart LR
A[Operator model configuration] --> B[Resolved model with provider and base URL]
B --> C[Provider runtime hook]
C --> D{Canonical local llama.cpp route?}
D -->|Yes| E[Native in-process llama.cpp stream]
D -->|No| F[Configured API transport]
F --> G[HTTP endpoint request]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +33. Total +39 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep native inference exclusively on the documented canonical Do we have a high-confidence way to reproduce the issue? Yes, at source level: the existing local-app E2E configures Is this the best way to solve the issue? Yes. The plugin is the owner of native llama.cpp behavior, and returning AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b7f9cd0a0167. 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
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…utes (openclaw#118293) * fix(llama-cpp): preserve configured HTTP routes * chore: drop release-owned CHANGELOG edit from PR branch
What Problem This Solves
Fixes #118212: the native llama-cpp plugin hijacked explicitly configured HTTP provider routes. An operator pointing a model at a Hugging Face local-app HTTP endpoint got
LLM request failedbecause the plugin's stream factory intercepted the route instead of letting the configured HTTP transport serve it. Discovered when thehuggingface-local-app-openclawE2E was adjudicated red on main (MLX passed, llama.cpp failed).Why This Change Was Made
Provenance: commit
658b601ee584(PR #109444) introduced an unconditional llama.cppcreateStreamFn, which preempted the generic HTTP fallback for any route the plugin could claim. Nothing in the commit, PR, or docs indicates that precedence was intentional — explicit configuration losing to plugin-native discovery inverts the repo's routing contract.The fix scopes the plugin to its canonical route:
extensions/llama-cppclaimslocal://llama-cpponly, and returnsundefinedfor explicit HTTP routes so the existing configured transport handles them. No shim, no shared-resolver change; +10/−4 production lines.User Impact
Explicitly configured HTTP endpoints (Hugging Face local apps, self-hosted llama.cpp servers addressed by URL) work again regardless of the native plugin being installed. The native
local://llama-cpppath is unchanged.Evidence
tsgo+tsgo:test; format/oxlint/diff checks; structured autoreview cleanFixes #118212
🤖 Generated with Claude Code