Repository navigation
fix(llama-cpp): make endpoint auth transitions reproducible - #126498
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 9:12 PM ET / August 20, 2026, 01:12 UTC. ClawSweeper reviewWhat this changesThe PR separates llama.cpp existing-server probe access from saved authentication persistence, removes obsolete migration and catalog code, and updates tests and docs. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer review. The branch fixes a concrete current-main auth-persistence defect in the llama.cpp provider; no blocking patch defect was found, but exact-head CI is still pending and the Priority: P2 Review scores
Verification
How this fits togetherThe llama.cpp plugin configures managed or existing llama-server endpoints. Its setup flow validates access, saves provider configuration and auth profiles, then feeds model discovery and routing. flowchart LR
A[Setup input] --> B[Endpoint comparison]
B --> C[Probe credential selection]
B --> D[Persistence decision]
C --> E[Server discovery]
D --> F[Provider config and auth profile]
E --> G[Model routing]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource -138, Tests -6, Docs +2. Total -142 across 18 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: Retain the provider-owned closed persistence decision, preserve credentials only for an unchanged endpoint, and clear inherited credentials before probing a replacement endpoint. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main's source-based key selection and profile removal are directly replaced by a closed persistence decision, with focused transition coverage. This read-only review did not execute the suite. Is this the best way to solve the issue? Yes: provider setup owns both validation access and durable authentication, while core already synthesizes provider catalog rows, so retaining separate transition and catalog paths would duplicate ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0961247d9435. 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
Exact final commands: No separate build was required: the final diff does not change SDK, loader, build, dynamic-import, package-manifest, or other published-package boundary surfaces. Exact-head CI is green: run 32319913314 is attached to ClawSweeper review: #126498 (comment). It found no actionable patch defect. Its only Rank-up move—wait for exact-head CI—has been completed; normal maintainer handling is satisfied by the authorized repo-native prepare/merge flow. Production LOC: +162/-300 (net -138) | Tests: +290/-296 (net -6) | Docs: +4/-2 (net +2) Real isolated llama-server proof passed discovery/concurrent generation, schema-constrained JSON, and cancellation. The tool-call case remains an explicit gap: the selected Gemma template did not advertise tool calling, so that case skipped rather than claiming unsupported proof. |
|
Merged via squash.
Follow-up: #126574 landed in 01e888795978ede45f9cbeaf6d8bfc4bbbb9987d, eliminating the request-bridging dynamic model caches for llama.cpp, LM Studio, and local Ollama. The request lifecycle now owns the exact prepared model directly, while existing void-returning provider hooks remain compatible. |
Related: #126434
Related: #125781
Related: #116765
What Problem This Solves
The single-provider llama.cpp architecture still carried endpoint-auth state from the implementation path that created it. Existing-server setup mixed three different facts—the credential used to probe an endpoint, the operator's intended saved auth state, and the profile action—and that made several normal transitions non-reproducible:
envrather thanflag;The plugin also retained beta-only doctor compatibility and a manual live-catalog projection after core already owned those responsibilities.
Why This Change Was Made
This change gives existing-server setup one closed auth-persistence decision while carrying probe access separately. Explicitness comes from the authored setup option, replacement endpoints never receive prior endpoint credentials, unchanged configured Authorization remains authoritative, and saved profile actions now match the credentials used for validation.
The same focused cleanup removes the unshipped
local://llama-cppdoctor migration, redundant unified-catalog projection, diagnostic-only discovery fields, dead managed result fields, and obsolete implementation-coupled tests. It does not add a generic provider framework or modify LM Studio, Ollama, the Plugin SDK, or system-agent persistence.The retired local URL existed only in beta tags; no stable
v*tag contains that provider implementation, so repository compatibility policy requires no retained migration.Production LOC: +162/-300 (net -138) | Tests: +290/-296 (net -6) | Docs: +4/-2 (net +2)
AI-assisted. I reviewed the implementation and proof directly.
User Impact
Switching an existing llama-server endpoint or its authentication mode now produces a configuration that can reproduce the successful setup probe. Endpoint replacement remains fail-closed: old environment, profile, inline, and Authorization credentials never cross to the new endpoint.
Managed llama.cpp setup, downloads, local embeddings,
localServiceownership, router discovery, dynamic models, structured output, and custom OpenAI-compatible llama-server routes are unchanged.Evidence
Regression and focused plugin proof:
The auth-transition matrix covers changed/unchanged endpoint, explicit Authorization, plaintext key, SecretRef/ref key, stored profile, ambient environment key, and no-auth behavior.
Real llama-server proof:
Architecture and review: