fix: use static provider catalogs in models list --all#69909
Conversation
Greptile SummaryThis PR fixes Confidence Score: 5/5Safe 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 AIThis 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 |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
3fc5c17 to
04711e9
Compare
There was a problem hiding this comment.
💡 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".
aeec68e to
1dcce9d
Compare
|
Merged via rebase.
Thanks @shakkernerd! |
Summary
models list --allnow 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
staticCatalogcontract for that display-only path instead of running normal live provider catalog hooks with synthetic auth. That letsmodels list --allshow 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.6vercel-ai-gateway/moonshotai/kimi-k2.6Static catalog safety
ProviderPlugin.staticCataloganddefineSingleProviderPluginEntrysupport viabuildStaticProvider/staticRun.models list --allprovider supplements call onlyrunProviderStaticCatalog, not the livecatalog/discoveryhook.--providerfilters return before provider discovery.includeUntrustedWorkspacePlugins: false.azure-openai-responses, resolve before the unknown-provider short-circuit.models list --allincludes static rows from Moonshot, OpenRouter, Chutes, and other non-entry providers.models listoutput sanitizes provider/model/tag text before terminal rendering; JSON output keeps raw values.262_144value.Before
openclaw models list --all --provider moonshotcould return no rows even though Moonshot appeared in provider configuration.After
openclaw models list --all --provider moonshotshows the bundled Moonshot Kimi catalog, includingmoonshot/kimi-k2.6, with auth shown as unavailable when no Moonshot credentials are configured.Verification
pnpm format -- src/commands/models/list.table.ts src/plugins/provider-discovery.runtime.tspnpm format:check -- src/commands/models/list.table.ts src/plugins/provider-discovery.runtime.tspnpm openclaw models list --all --local --plainreturnsNo models found.pnpm openclaw models list --all --provider unknown-provider-for-catalog-test --plainreturnsNo models found.pnpm openclaw models list --all --provider azure-openai-responses --plainreturns 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