



























@@ -143,6 +143,7 @@ or npm install metadata. Those belong in your plugin code and `package.json`.
143143| `providers` | No | `string[]` | Provider ids owned by this plugin. |
144144| `providerDiscoveryEntry` | No | `string` | Lightweight provider-discovery module path, relative to the plugin root, for manifest-scoped provider catalog metadata that can be loaded without activating the full plugin runtime. |
145145| `modelSupport` | No | `object` | Manifest-owned shorthand model-family metadata used to auto-load the plugin before runtime. |
146+| `modelCatalog` | No | `object` | Declarative model catalog metadata for providers owned by this plugin. This is the control-plane contract for future read-only listing, onboarding, model pickers, aliases, and suppression without loading plugin runtime. |
146147| `providerEndpoints` | No | `object[]` | Manifest-owned endpoint host/baseUrl metadata for provider routes that core must classify before provider runtime loads. |
147148| `cliBackends` | No | `string[]` | CLI inference backend ids owned by this plugin. Used for startup auto-activation from explicit config refs. |
148149| `syntheticAuthRefs` | No | `string[]` | Provider or CLI backend refs whose plugin-owned synthetic auth hook should be probed during cold model discovery before runtime loads. |
@@ -583,6 +584,105 @@ Fields:
583584| `modelPrefixes` | `string[]` | Prefixes matched with `startsWith` against shorthand model ids. |
584585| `modelPatterns` | `string[]` | Regex sources matched against shorthand model ids after profile suffix removal. |
585586587+## modelCatalog reference
588+589+Use `modelCatalog` when OpenClaw should know provider model metadata before
590+loading plugin runtime. This is the manifest-owned source for fixed catalog
591+rows, provider aliases, suppression rules, and discovery mode. Runtime refresh
592+still belongs in provider runtime code, but the manifest tells core when runtime
593+is required.
594+595+```json
596+{
597+"providers": ["moonshot"],
598+"modelCatalog": {
599+"providers": {
600+"moonshot": {
601+"baseUrl": "https://api.moonshot.ai/v1",
602+"api": "openai-responses",
603+"models": [
604+ {
605+"id": "kimi-k2.6",
606+"name": "Kimi K2.6",
607+"input": ["text", "image"],
608+"reasoning": true,
609+"contextWindow": 256000,
610+"maxTokens": 128000,
611+"cost": {
612+"input": 0.6,
613+"output": 2.5,
614+"cacheRead": 0.15
615+ },
616+"status": "available",
617+"tags": ["default"]
618+ }
619+ ]
620+ }
621+ },
622+"aliases": {
623+"azure-openai-responses": {
624+"provider": "openai",
625+"api": "azure-openai-responses"
626+ }
627+ },
628+"suppressions": [
629+ {
630+"provider": "openai",
631+"model": "gpt-5.3-codex-spark",
632+"reason": "not available on Azure OpenAI Responses"
633+ }
634+ ],
635+"discovery": {
636+"moonshot": "static"
637+ }
638+ }
639+}
640+```
641+642+Top-level fields:
643+644+| Field | Type | What it means |
645+| -------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
646+| `providers` | `Record<string, object>` | Catalog rows for provider ids owned by this plugin. Keys should also appear in top-level `providers`. |
647+| `aliases` | `Record<string, object>` | Provider aliases that should resolve to an owned provider for catalog or suppression planning. |
648+| `suppressions` | `object[]` | Model rows from another source that this plugin suppresses for a provider-specific reason. |
649+| `discovery` | `Record<string, "static" \| "refreshable" \| "runtime">` | Whether the provider catalog can be read from manifest metadata, refreshed into cache, or requires runtime. |
650+651+Provider fields:
652+653+| Field | Type | What it means |
654+| --------- | ------------------------ | ----------------------------------------------------------------- |
655+| `baseUrl` | `string` | Optional default base URL for models in this provider catalog. |
656+| `api` | `ModelApi` | Optional default API adapter for models in this provider catalog. |
657+| `headers` | `Record<string, string>` | Optional static headers that apply to this provider catalog. |
658+| `models` | `object[]` | Required model rows. Rows without an `id` are ignored. |
659+660+Model fields:
661+662+| Field | Type | What it means |
663+| --------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------- |
664+| `id` | `string` | Provider-local model id, without the `provider/` prefix. |
665+| `name` | `string` | Optional display name. |
666+| `api` | `ModelApi` | Optional per-model API override. |
667+| `baseUrl` | `string` | Optional per-model base URL override. |
668+| `headers` | `Record<string, string>` | Optional per-model static headers. |
669+| `input` | `Array<"text" \| "image" \| "document">` | Modalities the model accepts. |
670+| `reasoning` | `boolean` | Whether the model exposes reasoning behavior. |
671+| `contextWindow` | `number` | Native provider context window. |
672+| `contextTokens` | `number` | Optional effective runtime context cap when different from `contextWindow`. |
673+| `maxTokens` | `number` | Maximum output tokens when known. |
674+| `cost` | `object` | Optional USD per million token pricing, including optional `tieredPricing`. |
675+| `compat` | `object` | Optional compatibility flags matching OpenClaw model config compatibility. |
676+| `status` | `"available"` \| `"preview"` \| `"deprecated"` \| `"disabled"` | Listing status. Suppress only when the row must not appear at all. |
677+| `statusReason` | `string` | Optional reason shown with non-available status. |
678+| `replaces` | `string[]` | Older provider-local model ids this model supersedes. |
679+| `replacedBy` | `string` | Replacement provider-local model id for deprecated rows. |
680+| `tags` | `string[]` | Stable tags used by pickers and filters. |
681+682+Do not put runtime-only data in `modelCatalog`. If a provider needs account
683+state, an API request, or local process discovery to know the complete model
684+set, declare that provider as `refreshable` or `runtime` in `discovery`.
685+586686Legacy top-level capability keys are deprecated. Use `openclaw doctor --fix` to
587687move `speechProviders`, `realtimeTranscriptionProviders`,
588688`realtimeVoiceProviders`, `mediaUnderstandingProviders`,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。