Repository navigation
fix(ollama): cloud models vanish from discovery when inspection returns nothing - #130240
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 2:25 PM ET / 18:25 UTC. ClawSweeper reviewWhat this changesThe PR keeps remotely hosted Ollama models selectable in discovery and interactive setup when Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep this PR open for normal merge review: the owner-local fix and focused regression coverage address the reported remote-row failure, with no actionable patch defect found. The upstream Ollama source links cited by the maintainer could not be independently fetched in this review environment, so the external contract remains the only residual verification gap. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Ollama plugin combines flowchart LR
A[Ollama model list] --> B[Metadata normalization]
C[Model inspection] --> B
B --> D[Capability precedence]
D --> E[Provider discovery]
D --> F[Setup wizard]
E --> G[Selectable model catalog]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +18, Tests +170. Total +188 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge only after exact-head CI completes, retaining this single provider-local normalization path and its local-versus-remote, explicit-empty, embedding, and strict-node regression coverage. Do we have a high-confidence way to reproduce the issue? Yes: current main’s completion filter excludes a remote row with an incomplete capability list, and the PR supplies focused fail-first cases plus a real loopback server through the provider transport. Is this the best way to solve the issue? Yes, subject to the cited upstream contract: normalizing the remote-versus-local distinction in the shared metadata owner fixes both discovery and setup without relaxing paired-node completion requirements. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4eea0d3e2711. LabelsLabel 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)
|
Co-authored-by: Yigtwxx <[email protected]>
4a4924d to
ed2fc42
Compare
|
Maintainer follow-up: I rewrote the existing contributor branch into the canonical Ollama metadata owner while preserving @Yigtwxx's authorship through the commit The upstream contract is stricter than the original patch assumed: Ollama considers a model remote when either Before the production change, five focused regressions failed against current main: The repaired branch:
Validation on commit Production: +41/-23 (net +18), one owner file, down from the original net +52 across two production files. The remaining growth records the upstream This uses a real isolated loopback HTTP server, not an authenticated live Ollama daemon; no user service or credentials were accessed. |
|
Thanks for taking this over. The I re-ran my loopback probe against your commit
The local row is the control: it reproduces main byte-for-byte, so the difference in the first three rows is the remote-row rule and not the harness. The embedding rows are only meaningful on the right-hand arm — the remote one now takes the remote path and is still excluded, so the completion/embedding boundary did not loosen. I also checked the single-owner claim from the other side: One disclosure about my environment: this machine runs Node 22.20, whose embedded SQLite trips OpenClaw's WAL-reset guard during module import, so the probe ran under a local shim that fakes only the Housekeeping, your call: the PR description still describes the original two-file shape and does not mention |
|
Maintainer review complete on I personally checked the upstream remote-manifest predicate, list producer, and wire response. Remote rows bypass local GGUF completion inference, and either remote identifier is sufficient. This resolves the external-contract verification gap reported by the review environment. Explicit inspection arrays, embedding exclusions, and strict paired-node completion requirements remain covered and unchanged. The automated stored-data warning is not applicable: these are transient discovery response fixtures; the diff changes no database, persisted embedding metadata, schema, or migration. The remaining production growth (net +18, down from the original +52) represents the actual upstream field and one shared provenance/normalization owner, with no duplicate setup policy. This repairs the incomplete remote-row regression introduced by our earlier #130000 metadata change. Thanks @Yigtwxx for identifying it; your credit is retained in the rewritten commit. The 727-test owner/sibling pass and independent clean P1 review stand; the HTTP proof uses an isolated loopback server, not an authenticated cloud account. |
|
Merged via squash.
|
…130459) Share remote identity across discovery, node inference, and Local-only setup. Keep affirmative embedding-only models out of inferred chat capabilities, guided selection, and failed-download fallback while preserving advertised metadata and existing unknown-capability chat fallback behavior. Follow up on #130240 with reproduced regressions, 742 Ollama tests, isolated real-daemon before/after proof, and source-blind public CLI validation. Co-authored-by: Yigtwxx <[email protected]>
…30240) Co-authored-by: Peter Steinberger <[email protected]>
…penclaw#130459) Share remote identity across discovery, node inference, and Local-only setup. Keep affirmative embedding-only models out of inferred chat capabilities, guided selection, and failed-download fallback while preserving advertised metadata and existing unknown-capability chat fallback behavior. Follow up on openclaw#130240 with reproduced regressions, 742 Ollama tests, isolated real-daemon before/after proof, and source-blind public CLI validation. Co-authored-by: Yigtwxx <[email protected]>
Related: #130000
What Problem This Solves
Fixes an issue where operators running Ollama with cloud models would lose those models from provider discovery and from onboarding whenever the daemon answered
/api/showwithout describing the model — the same degraded-inspection case #130000 set out to improve. The models disappear from the provider catalog entirely, so no cloud model can be selected until inspection starts working again.Why This Change Was Made
#130000 made the
/api/tagsrow fill in what an inspection could not report. That is correct for a local row, which the daemon derives from the model itself, but a remote row is built differently upstream:buildModelListSummaryonly callsreadModelListGGUFwhen the manifest carries neitherRemoteHostnorRemoteModel, andcompletionis appended inside that read (server/model_list_cache.go).thinkingis likewise appended only when a template layer is present. A remote row therefore advertises whatever its manifest config declares and stays silent about the rest — but discovery reads that silence as a denial:enrichOllamaCompletionModelsexcludes any row that carries capabilities withoutcompletion, which is every remote row.buildOllamaModelDefinitiontreats a present list as a full account, so the name heuristic behindreasoningand the optimisticsupportsToolsdefault stop being reachable for those rows.This change records where a capability list came from (
mergeOllamaModelShowInfonow marks list-sourced capabilities) and reads a remote row's advertised list as authoritative for what it asserts and unknown for what it omits — the same rule this module already applies tocontextWindow. Once/api/showanswers with capabilities, the list is settled again and every existing rule applies unchanged.Non-goal: local rows keep today's behavior exactly. A local list entry is derived from the model's own GGUF and template, so its omissions are meaningful and stay authoritative — including a local reasoning model whose list omits
thinking.User Impact
Cloud Ollama models stay discoverable, keep tool support, and keep their reasoning flag when the daemon cannot inspect them, instead of vanishing from the catalog. Local model metadata, embedding-model exclusion, and the context and tool precedence introduced by #130000 are unchanged.
Evidence
Runtime probe, no mocking: a real loopback HTTP server stands in for the daemon, serving the
/api/tagsrows below and answering/api/showwith200 {}(the degraded case).buildOllamaProviderruns against it unmodified; the same probe ran against three checkouts of the two changed files./api/tagsrow296227fdf^)a2d54319bc3)glm-5.1:cloud,remote_hostset,["vision"]truetruedeepseek-r1:671b-cloud,remote_hostset,["tools"]truetruellama3.1:8b,["completion","tools"]128000131072131072deepseek-r1:8b,["completion","tools"]truefalsefalsenomic-embed-text,["embedding"]The last two rows are the control arms: this branch reproduces main exactly for local rows, so the difference the first two rows show is the remote-row rule and not the harness.
Six focused cases were added. Five of them fail against main's
provider-models.tsandsetup-model-selection.tswith the tests unchanged; the sixth (a local["embedding"]row must stay excluded) passes on both arms and is there to prove the completion filter was not loosened.