openclaw - ✅(Solved) Fix [Bug]: --provider flag for models list is empty [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#75517Fetched 2026-05-02 05:33:36
View on GitHub
Comments
2
Participants
3
Timeline
17
Reactions
2
Timeline (top)
referenced ×12commented ×2labeled ×2cross-referenced ×1

Hi, before last update this command returned list of models, now it returns empty (No models found.) openclaw models list --provider google

Root Cause

Hi, before last update this command returned list of models, now it returns empty (No models found.) openclaw models list --provider google

Fix Action

Fixed

PR fix notes

PR #75615: fix(models): restore --provider filter cascade for non-all queries (#75517)

Description (problem / solution / changelog)

What

Fixes #75517 — openclaw models list --provider <id> returns "No models found." for any provider the user hasn't manually configured (verified live for google, anthropic, moonshot, and others).

Root cause

Commit 6dbaa0a2 created src/commands/models/list.list-command.ts as a new file replacing the prior implementation. In the new code, the source-plan cascade in planAllModelListSources (manifest → supplemental-manifest → provider-index → provider-runtime-static → provider-runtime-scoped registry-fallback) is only invoked when --all is set. Without --all, the non---all path runs appendConfiguredModelRowSources only — which does not consult any provider catalog. For a user without explicit cfg.models.providers.<id> configuration (the common case), --provider <id> returns zero rows.

A test added in the same commit ("keeps configured provider filters on the registry-free row path" at src/commands/models/list.list-command.forward-compat.test.ts:282-290) codified this behavior.

Fix

Route the non---all provider-filtered path through the same planAllModelListSources cascade that already powered --all --provider X. Specifically:

  • src/commands/models/list.list-command.ts line ~100 — gate is now useSourcePlan = Boolean(opts.all) || Boolean(providerFilter). The source-plan module loads when either condition holds.
  • src/commands/models/list.row-sources.tsappendAllModelRowSources accepts optional entries and calls appendConfiguredRows first inside the provider-filtered non-registry branch (preserves configured-entry tags). Registry fallback is only requested when no rows were produced by configured/catalog sources (keeps configured-only callers registry-free). For the registry-kind branch (e.g. supplemental-manifest providers like OpenAI under --provider X), configured entries whose model id is not returned by the registry are surfaced after appendDiscoveredRows so they don't disappear — addresses Codex review feedback on the first commit.
  • The bug-codifying test was replaced; three new tests cover the manifest, provider-index, provider-static, and registry-fallback paths under --provider X (no --all).

The no-flags case (models list with no --all, no --provider) is unchanged — still uses the configured-only fast path, never loads the registry.

Behavior notes for reviewers

  1. --all --provider X now also calls appendConfiguredRows first when the source plan resolves to a non-registry kind (manifest / provider-index / provider-runtime-static / provider-runtime-scoped). This wasn't the prior behavior. For users with a configured entry for X, that entry now leads the result with its default/configured tag, followed by the cascade-derived rows. This was an intentional consequence of unifying the two code paths via shared appendAllModelRowSources — happy to gate it back to non---all only if you'd prefer the old --all --provider X byte-identical.

  2. When configured rows are present, registry fallback is skipped (non-registry branch). list.row-sources.ts registry-fallback gate now includes params.rows.length === 0. So a user with a single configured google entry and --provider google sees only that one configured row in the static-catalog branch — not the 50 registry-only google models. Pinned by existing test "includes configured provider model rows for provider-filtered lists". Open to flipping this if maintainers prefer cascade rows always supplement configured rows.

  3. Registry-kind provider filter now backfills missing configured entries. For providers whose plan resolves to kind: "registry" under a provider filter (e.g. supplemental-manifest providers), appendAllModelRowSources now scans entries after the registry pass and appends any whose key wasn't already produced. This restores parity with the pre-fix appendConfiguredModelRowSources path which always called appendConfiguredRows. Without this, a configured default pinned to a model id the registry doesn't return would silently disappear — flagged by codex review as a P2 functional regression and fixed in the second commit.

Test plan

  • New regression tests in src/commands/models/list.list-command.forward-compat.test.ts:
    • returns manifest catalog rows for provider filters without --all (registry-free) — replaces the bug-codifying test
    • falls back to registry rows for unknown provider filters without --all (issue #75517) — google/anthropic registry-only path
    • uses provider static catalog rows for provider filters without --all
    • uses provider-index catalog rows for provider filters without --all
  • pnpm test src/commands/models/list.list-command.forward-compat.test.ts — 24/24 pass
  • pnpm test src/commands/models/ — 109/109 pass across 16 files
  • pnpm test:changed resolves to broad lanes; ran targeted src/commands/models/ lane locally, broad lanes deferred to Testbox at landing per AGENTS.md

Live CLI verification (post-fix, before second commit — same code paths still correct):

  • pnpm openclaw models list --provider google — populated table (24 rows including gemini-2.5-pro, gemma family)
  • pnpm openclaw models list --provider anthropic — populated table (claude-opus-4-7, claude-sonnet-4-6, etc.)
  • pnpm openclaw models list --provider moonshot — populated table (kimi family)
  • pnpm openclaw models list --all --provider google — populated (no regression)
  • pnpm openclaw models list --all — full unfiltered (1029 lines)
  • pnpm openclaw models list — only configured row, no registry load (fast-path preserved)

Codex review

Ran codex review --base origin/main locally before opening — one P2 finding raised about configured entries dropping on registry-kind provider plans; addressed in the second commit, all 109 targeted tests still green.

AI-assisted

AI-assisted (Claude Code, Opus 4.7, 1M context). Fully tested.

Changed files

  • scripts/tool-display.ts (modified, +12/-4)
  • src/commands/models/list.list-command.forward-compat.test.ts (modified, +166/-3)
  • src/commands/models/list.list-command.ts (modified, +10/-2)
  • src/commands/models/list.row-sources.ts (modified, +49/-7)
  • src/commands/models/list.source-plan.ts (modified, +3/-1)
  • src/config/web-search-codex-config.test.ts (modified, +16/-28)
  • src/config/zod-schema.agent-runtime.ts (modified, +7/-7)

Code Example

### Steps to reproduce

1. in terminal past the openclaw models list --provider google

### Expected behavior

should return list of models

### Actual behavior

output: No models found

### OpenClaw version

2026.4.27

### Operating system

macos

### Install method

_No response_

### Model

all models

### Provider / routing chain

openclaw cli

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Hi, before last update this command returned list of models, now it returns empty (No models found.) openclaw models list --provider google

Steps to reproduce

  1. in terminal past the openclaw models list --provider google

Expected behavior

should return list of models

Actual behavior

output: No models found

OpenClaw version

2026.4.27

Operating system

macos

Install method

No response

Model

all models

Provider / routing chain

openclaw cli

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue might be resolved by checking the configuration or dependencies related to the openclaw command, specifically for the --provider google option.

Guidance

  • Verify that the google provider is correctly configured and enabled in the openclaw settings.
  • Check if there are any updates or changes in the openclaw documentation regarding the --provider google option.
  • Run the command with additional debug or verbose flags (if available) to gather more information about the issue.
  • Consider checking the network connection and permissions to ensure that the openclaw command can access the required resources.

Notes

The issue lacks detailed information about the configuration, dependencies, and logs, which makes it challenging to provide a more specific solution.

Recommendation

Apply workaround: Check the openclaw documentation and configuration to ensure that the --provider google option is correctly set up, as this might resolve the issue without requiring an upgrade.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

should return list of models

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: --provider flag for models list is empty [1 pull requests, 2 comments, 3 participants]