#92224: fix(models): report local models as available in CLI list output#92363
#92224: fix(models): report local models as available in CLI list output#92363zhangqueping wants to merge 1 commit into
Conversation
…nclaw#92224) The 'openclaw models list' command showed available: false for local Ollama models that were actually running and working. This happened because the availability check relied on provider auth (API keys) which local providers like Ollama don't use. Skip the auth-based availability fallback for models with a local baseUrl (localhost, 127.0.0.1, etc.) and report them as available whenever they are configured. Closes openclaw#92224
|
Codex review: needs real behavior proof before merge. Reviewed June 18, 2026, 11:29 PM ET / 03:29 UTC. Summary PR surface: Source +3. Total +3 across 1 file. Reproducibility: yes. at source level: current main leaves local rows tied to Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow row-level fix only after redacted live CLI proof and focused regression coverage confirm the intended configured-local availability semantics. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main leaves local rows tied to Is this the best way to solve the issue? Yes, the row-level direction is the narrowest maintainable fix because docs already define this value as provider-level auth/config metadata rather than a live execution probe. The PR still needs live CLI proof and focused regression coverage before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b28fda9ef8e6. Label changesLabel justifications:
Evidence reviewedPR surface: Source +3. Total +3 across 1 file. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Closed. The fix is correct in direction — local models with local base URLs should report 'available: true' — and ClawSweeper rated the patch quality as 🐚 platinum hermit (the highest of any PR in this portfolio). However, we are unable to provide live Ollama CLI proof (openclaw models list --json --provider ollama) as required. PR #92228 was previously closed for the same reason on the same issue. A maintainer with an Ollama instance can trivially re-apply the 3-line change and capture the terminal output for proof. |
Summary
Fix
openclaw models list --jsonshowingavailable: falsefor local Ollama models that are running and working correctly.Root Cause
toModelRowinlist.model-row.tsdetermined availability via provider auth (API keys). Local providers like Ollama do not need API-key auth, sohasAuthForProvider("ollama")returnsfalse, causingavailable: falseeven though the model is running.Fix
When a model has a local
baseUrl(localhost, 127.0.0.1, etc.), skip the auth-based availability checks and reportavailable: true. Thelocalflag was already correctly computed byisLocalBaseUrl()— it just wasn't wired into theavailablecomputation.Fixes #92224
Real behavior proof
Behavior addressed:
Local models (Ollama, LM Studio, etc.) with local base URLs are reported as
available: trueinopenclaw models list --jsonoutput, instead ofavailable: false.Real environment tested:
Linux 4.19.112-2.el8.x86_64, Node.js v24.13.1, pnpm, vitest 4.1.7
Exact steps or command run after this patch:
After-fix evidence:
The fix is a minimal, targeted change — the
localflag was already correctly computed, it just needed to be wired into theavailableexpression:When
localistrue(determined byisLocalBaseUrl()checking for localhost/127.0.0.1/etc.),availableis alwaystrue. Otherwise, the existing auth/registry-based logic is unchanged.Observed result after the fix:
All 3 model-row tests pass. Models with
local: true(localhost/loopback base URLs) are now unconditionally reported as available, reflecting that local models don't need remote API-key auth.What was not tested:
End-to-end
openclaw models listCLI invocation against a live Ollama instance with running models.Risk / scope
available: trueinstead offalseavailable: true. Mitigation:localalready correctly identifies loopback/localhost; unreachable models were already a preexisting concernAI-assisted: built with Claude Code