Repository navigation
improve(models): avoid Ollama runtime load during model listing - #117465
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 12:26 PM ET / 16:26 UTC. ClawSweeper reviewWhat this changesThis PR lets configured local and cloud Ollama model rows return unchanged from the lightweight provider-policy artifact, avoiding full Ollama plugin activation during model listing. Merge readinessThe patch has no actionable correctness or security finding: it uses the existing bundled provider-policy seam to avoid loading an Ollama runtime hook that both registered Ollama providers currently do not implement. This PR should remain open for ordinary maintainer landing review because it is member-authored and carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe models-list command converts configured model definitions into rows. It asks a bundled provider’s lightweight policy artifact whether a row is already canonical before loading the provider runtime normalizer, which keeps no-op provider work off the listing hot path. flowchart LR
Configured[Configured Ollama model] --> Projection[Model-list row projection]
Projection --> Policy[Lightweight provider policy]
Policy -->|Row already canonical| Unchanged[Return configured row]
Policy -->|No policy decision| Runtime[Load provider runtime]
Runtime --> Normalizer[Apply runtime normalization]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +52. Total +64 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the no-op determination in the Ollama-owned policy artifact and merge it after the normal maintainer review, with the parity tests guarding any future addition of an Ollama runtime normalizer. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: configured Ollama rows currently fall through from the policy lookup to the lazy provider-runtime load even though both registered Ollama providers have no Is this the best way to solve the issue? Yes. A provider-owned lightweight policy is the narrowest maintainable fix: hard-coding Ollama IDs in core would violate the plugin boundary, while adding a runtime no-op hook would still activate the runtime the change is meant to avoid. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a566ac23a055. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
2a20b4f to
31d5521
Compare
f49fa34 to
037287b
Compare
|
ClawSweeper before-merge resolution:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Latest ClawSweeper review resolution:
All ClawSweeper before-merge work is resolved. |
|
Merged via squash.
|
* origin/main: (44 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
* origin/main: (41 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
* origin/main: (44 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
* origin/main: (27 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
* origin/main: (41 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
Related: #117323
What Problem This Solves
Listing configured Ollama models could activate the full Ollama plugin for each row even though neither the local nor cloud provider performs runtime model normalization.
Why This Change Was Made
The lightweight Ollama provider-policy artifact now explicitly marks configured local and cloud rows as unchanged. This keeps the decision at the provider-owned boundary and avoids loading discovery, embeddings, media, setup, and web-search modules for a normalization hook that does not exist.
The full plugin remains responsible for live discovery and every runtime capability. Unrelated provider ids still fall through to the normal runtime path.
User Impact
Operators with configured Ollama models should see less model-list startup work without any change to returned rows or live Ollama discovery.
Evidence
037287be2110005f62a7c47a59bf2f3bef3feee2.extensions/ollama/provider-policy-api.test.tsandextensions/ollama/index.test.ts.normalizeResolvedModelhook.oxfmt, direct touched-fileoxlint, andgit diff --checkpassed.main4cbbccd0a0d20c11e123c2356db682dc51c4dde8:e532fab95c303fcc0df0297a40bcc30b8c98cdeb.openclaw/ci-gatepassed.Merge Gate
Merge only after the latest exact-head ClawSweeper review has no unresolved
Before merge, finding, security, owner-decision, merge-risk, or blocking rank-up item.