Skip to content

fix(models): keep local Ollama routes selectable - #135095

Merged
obviyus merged 1 commit into
mainfrom
codex/issue-134731
Sep 1, 2026
Merged

obviyus merged 1 commit into
mainfrom
codex/issue-134731

Conversation

@obviyus

@obviyus obviyus commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The Control UI showed supported local Ollama models but disabled their rows. Selecting one sent no sessions.patch request because models.list published the model as unavailable.

Closes #134731.

Reported by @BoatAngle.

Why This Change Was Made

The auth availability owner read only models.providers source config for non-OpenAI providers. It ignored the effective api and baseUrl already carried by the prepared catalog row. An implicit or empty Ollama provider therefore became missing-auth even when the bundled plugin had verified and published a local route.

This change passes the exact prepared route into auth evaluation. The evaluator now marks a declared synthetic-auth route available when the route is local and no explicit credential owner overrides it. The downstream Gateway fallback is removed, so one owner now decides availability.

Remote Ollama routes and routes with explicit token auth remain unavailable without credentials.

User Impact

Operators can select a supported local Ollama model in the Control UI. The selection now reaches sessions.patch, updates the session model, and affects the next turn.

Evidence

  • Baseline 9e5be704596c5c4fd38c83253cdebef0498597fc: the new Gateway regression failed for both implicit and empty provider config. Each row was available: false with missing-auth.
  • Candidate 4aa5dfec99046bd66998a11ef2537def87f05a38: 85 focused owner and sibling tests passed.
  • node scripts/run-vitest.mjs src/agents/model-auth-availability.test.ts src/gateway/server-methods/models-list-result.provider-outcomes.test.ts src/gateway/server-methods/models-list-result.openai-routes.test.ts --reporter=verbose
  • The committed Chromium Control UI harness proved the exact causal pair: available: false disabled the local Ollama row and sent zero sessions.patch requests; available: true sent sessions.patch with the selected Ollama model.
  • The host had no Ollama service on port 11434, so a live provider process was infeasible. The proof used the shipped UI bundle, real Chromium interaction, and the committed mock Gateway harness without touching operator state.
  • Formatting, focused Oxlint, max-lines ratchet, and git diff --check passed.
  • pnpm test:changed was stopped when it attempted the host-forbidden full TypeScript build. Pull request CI owns type and build validation.
  • Production lines: -2 net. Tests: +70 lines. No configuration, protocol, storage, or dependency changes.

Test audit

  • The retained table-driven Gateway test protects the producer boundary and failed before the fix for the intended reason.
  • It covers implicit config, empty config, remote routes, and explicit auth ownership.
  • No test-only production seam was added.
  • An evidence-only Ollama UI case was not retained because existing UI tests already protect both consumer branches.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@obviyus
obviyus marked this pull request as ready for review September 1, 2026 10:11
@obviyus
obviyus requested a review from a team as a code owner September 1, 2026 10:11
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Sep 1, 2026
@obviyus

obviyus commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Land-ready at 4aa5dfec99046bd66998a11ef2537def87f05a38.

  • Root cause: non-OpenAI auth availability ignored the prepared catalog route and read only source provider config.
  • Fix: the auth owner now uses the exact prepared api and baseUrl; the Gateway projection fallback is removed.
  • Regression: implicit and empty local Ollama routes are available; remote and explicit token-auth routes remain unavailable.
  • Local proof: 85 focused owner and sibling tests passed; formatting, Oxlint, max-lines ratchet, and git diff --check passed.
  • Product proof: the committed Chromium harness showed available: false suppresses sessions.patch and available: true sends it for the same Ollama row.
  • Proof gap: no local Ollama service was listening on port 11434, so live provider execution was infeasible without changing operator state.
  • CI: exact-head run 33496090929 passed.
  • Autoreview: exact-head P0 gate passed at 0.97 with no actionable findings.
  • ClawSweeper: the latest comment is the pickup acknowledgement only; it contains no Rank-up moves: list to apply or skip.
  • Production delta: -2 lines. Test delta: +70 lines.

@obviyus
obviyus merged commit e4cf6f5 into main Sep 1, 2026
323 of 331 checks passed
@obviyus
obviyus deleted the codex/issue-134731 branch September 1, 2026 10:24
@obviyus

obviyus commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @BoatAngle!

Proof: The committed Chromium harness confirmed that the corrected available row sends sessions.patch, while the unavailable control case remains inert. Exact-head CI and P0 Autoreview passed.

  • Bug: The Gateway marked a verified local Ollama catalog route unavailable when provider config was implicit or empty, so the Control UI disabled model selection.
  • Fix: The auth availability owner now reads the prepared route's api and baseUrl; remote and explicit-auth routes remain gated.
Before After
Local Ollama row was disabled and sent no sessions.patch. Local Ollama row is selectable and sends the session model patch.

steipete added a commit that referenced this pull request Sep 1, 2026
* fix: preserve native model picker selections and replies

Carry the admitted catalog into native commands and reuse completed capability facts. Preserve post-hook channel suppression through settlement so picker acknowledgements are not replaced by generic recovery.

Reported-by: @Call44 (#133550). Reverified the existing #134731 repair from #135095 with an isolated Control UI click and reload.

* fix: satisfy model picker delivery lint guards

Narrow observed final-delivery promises before aggregation and avoid a shadowed test catalog binding. Targeted lint and 278 reply regressions pass.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
Use prepared catalog route facts when the auth owner evaluates local no-auth providers. This keeps implicit and empty-config Ollama models selectable while remote and explicitly authenticated routes stay gated.

Fixes openclaw#134731.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
…law#135382)

* fix: preserve native model picker selections and replies

Carry the admitted catalog into native commands and reuse completed capability facts. Preserve post-hook channel suppression through settlement so picker acknowledgements are not replaced by generic recovery.

Reported-by: @Call44 (openclaw#133550). Reverified the existing openclaw#134731 repair from openclaw#135095 with an isolated Control UI click and reload.

* fix: satisfy model picker delivery lint guards

Narrow observed final-delivery promises before aggregation and avoid a shadowed test catalog binding. Targeted lint and 278 reply regressions pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Control UI model picker is inert for local Ollama models — row click emits no sessions.patch (2026.8.1)

1 participant