Skip to content

fix: use static provider catalogs in models list --all#69909

Merged
shakkernerd merged 13 commits into
mainfrom
fix/models-all-provider-catalog
Apr 22, 2026
Merged

fix: use static provider catalogs in models list --all#69909
shakkernerd merged 13 commits into
mainfrom
fix/models-all-provider-catalog

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Apr 22, 2026

Copy link
Copy Markdown
Member

Summary

models list --all now includes bundled provider-owned static catalog rows even before provider auth is configured. This keeps provider discovery consistent across setup and listing flows: if OpenClaw has a safe offline catalog for a provider, the full catalog view can show those models and mark them unavailable until credentials are added.

This PR uses an explicit provider staticCatalog contract for that display-only path instead of running normal live provider catalog hooks with synthetic auth. That lets models list --all show known bundled rows without triggering provider network discovery or auth-required catalog code.

This also adds confirmed Kimi K2.6 catalog rows for aggregator providers:

  • openrouter/moonshotai/kimi-k2.6
  • vercel-ai-gateway/moonshotai/kimi-k2.6

Static catalog safety

  • Adds ProviderPlugin.staticCatalog and defineSingleProviderPluginEntry support via buildStaticProvider / staticRun.
  • models list --all provider supplements call only runProviderStaticCatalog, not the live catalog / discovery hook.
  • Static catalog execution gets a sterile context with no credentials, config, agent directory, workspace directory, or environment values.
  • Unknown --provider filters return before provider discovery.
  • Local-only listing skips provider static catalog supplements.
  • Display-only provider discovery is scoped to bundled provider plugins and passes includeUntrustedWorkspacePlugins: false.
  • Provider hook aliases, such as azure-openai-responses, resolve before the unknown-provider short-circuit.
  • Mixed provider-discovery scopes fall back to full provider loading when some bundled providers do not define a discovery entry, so unfiltered models list --all includes static rows from Moonshot, OpenRouter, Chutes, and other non-entry providers.
  • Human models list output sanitizes provider/model/tag text before terminal rendering; JSON output keeps raw values.
  • Vercel AI Gateway Kimi K2.6 context/max tokens now match the exact Moonshot/OpenRouter 262_144 value.

Before

openclaw models list --all --provider moonshot could return no rows even though Moonshot appeared in provider configuration.
image

After

openclaw models list --all --provider moonshot shows the bundled Moonshot Kimi catalog, including moonshot/kimi-k2.6, with auth shown as unavailable when no Moonshot credentials are configured.
image

Verification

  • pnpm format -- src/commands/models/list.table.ts src/plugins/provider-discovery.runtime.ts
  • pnpm format:check -- src/commands/models/list.table.ts src/plugins/provider-discovery.runtime.ts
  • pnpm openclaw models list --all --local --plain returns No models found.
  • pnpm openclaw models list --all --provider unknown-provider-for-catalog-test --plain returns No models found.
  • pnpm openclaw models list --all --provider azure-openai-responses --plain returns alias-owned OpenAI rows.
  • pnpm openclaw models list --all --plain | rg '^(moonshot/kimi-k2\.6|openrouter/moonshotai/kimi-k2\.6|vercel-ai-gateway/moonshotai/kimi-k2\.6)$'
  • pnpm check:changed

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations extensions: vercel-ai-gateway size: M maintainer Maintainer-authored PR labels Apr 22, 2026
@greptile-apps

greptile-apps Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes models list --all to include bundled provider-owned static catalog rows even before provider auth is configured, and adds Kimi K2.6 catalog entries for OpenRouter and Vercel AI Gateway. The core implementation in list.provider-catalog.ts is clean: it uses a sentinel API key to drive runProviderCatalog, catches errors, deduplicates via a seen set, and skips self-hosted providers in the unfiltered path.

Confidence Score: 5/5

Safe to merge; only P2 findings remain around inconsistent context-window values for Kimi K2.6 across the two new catalog entries.

All remaining comments are P2 data-consistency issues. The core logic, deduplication, error handling, and test coverage look correct.

extensions/openrouter/provider-catalog.ts and extensions/vercel-ai-gateway/models.ts — context window values disagree for the new Kimi K2.6 entry.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/openrouter/provider-catalog.ts
Line: 66-74

Comment:
**Inconsistent `contextWindow`/`maxTokens` with Vercel AI Gateway entry**

The OpenRouter Kimi K2.6 entry uses `262144` (2^18) for both `contextWindow` and `maxTokens`, while the Vercel AI Gateway entry for the same model uses `262_000`. These should agree; `262144` is the exact power-of-two value MoonshotAI documents, so the Vercel entry appears to be a rounding approximation.

```suggestion
      {
        id: "moonshotai/kimi-k2.6",
        name: "MoonshotAI: Kimi K2.6",
        reasoning: true,
        input: ["text", "image"],
        cost: OPENROUTER_KIMI_K2_6_COST,
        contextWindow: 262144,
        maxTokens: 262144,
      },
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/vercel-ai-gateway/models.ts
Line: 85-96

Comment:
**`contextWindow`/`maxTokens` disagrees with OpenRouter catalog entry**

This entry uses `262_000` while the OpenRouter catalog uses `262144` (2^18) for the same model. Update to `262_144` to stay consistent with the authoritative value.

```suggestion
  {
    id: "moonshotai/kimi-k2.6",
    name: "Kimi K2.6",
    reasoning: true,
    input: ["text", "image"],
    contextWindow: 262_144,
    maxTokens: 262_144,
    cost: {
      input: 0.95,
      output: 4,
      cacheRead: 0.16,
    },
  },
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "docs: document provider catalog model di..." | Re-trigger Greptile

Comment thread extensions/openrouter/provider-catalog.ts
Comment thread extensions/vercel-ai-gateway/models.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5b0c2ffdc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/models/list.provider-catalog.ts Outdated
Comment thread src/commands/models/list.provider-catalog.ts Outdated
@shakkernerd shakkernerd changed the title fix: show provider catalog models in models list --all fix: use static provider catalogs in models list --all Apr 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa0abc4362

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/models/list.rows.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cab3bfe923

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/models/list.provider-catalog.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c554f6c2ac

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/models/list.provider-catalog.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a738ceae2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/models/list.provider-catalog.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c09145263

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/models/list.provider-catalog.ts
@shakkernerd shakkernerd self-assigned this Apr 22, 2026
@shakkernerd shakkernerd force-pushed the fix/models-all-provider-catalog branch from 3fc5c17 to 04711e9 Compare April 22, 2026 03:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04711e9c0f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/plugins/provider-discovery.runtime.ts Outdated
@shakkernerd shakkernerd force-pushed the fix/models-all-provider-catalog branch from aeec68e to 1dcce9d Compare April 22, 2026 03:48
@shakkernerd shakkernerd merged commit 3528a17 into main Apr 22, 2026
8 checks passed
@shakkernerd shakkernerd deleted the fix/models-all-provider-catalog branch April 22, 2026 03:51
@shakkernerd

Copy link
Copy Markdown
Member Author

Merged via rebase.

  • Prepared head SHA: 1dcce9d
  • Landed main SHA: 3528a17
  • Local verification before merge: targeted provider/model-list tests, plugin SDK API check, format check, changelog validation, core typecheck, and command-path smokes.

Thanks @shakkernerd!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation extensions: kilocode extensions: moonshot extensions: vercel-ai-gateway maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant