






















@@ -43,7 +43,7 @@ OpenClaw selects models in this order:
43434444<AccordionGroup>
4545<Accordion title="Related model surfaces">
46-- `agents.defaults.models` is the allowlist/catalog of models OpenClaw can use (plus aliases).
46+- `agents.defaults.models` is the allowlist/catalog of models OpenClaw can use (plus aliases). Use `provider/*` entries to limit visible providers while keeping provider discovery dynamic.
4747- `agents.defaults.imageModel` is used **only when** the primary model can't accept images.
4848- `agents.defaults.pdfModel` is used by the `pdf` tool. If omitted, the tool falls back to `agents.defaults.imageModel`, then the resolved session/default model.
4949- `agents.defaults.imageGenerationModel` is used by the shared image-generation capability. If omitted, `image_generate` can still infer an auth-backed provider default. It tries the current default provider first, then the remaining registered image-generation providers in provider-id order. If you set a specific provider/model, also configure that provider's auth/API key.
@@ -63,7 +63,7 @@ The same `provider/model` can mean different things depending on where it came f
6363- User session selections are exact. `/model`, the model picker, `session_status(model=...)`, and `sessions.patch` store `modelOverrideSource: "user"`; if that selected provider/model is unreachable, OpenClaw fails visibly instead of falling through to another configured model.
6464- Cron `--model` / payload `model` is a per-job primary. It still uses configured fallbacks unless the job supplies explicit payload `fallbacks` (use `fallbacks: []` for a strict cron run).
6565- CLI default-model and allowlist pickers respect `models.mode: "replace"` by listing explicit `models.providers.*.models` instead of loading the full built-in catalog.
66-- The Control UI model picker asks the Gateway for its configured model view: `agents.defaults.models` when present, otherwise explicit `models.providers.*.models` plus providers with usable auth. The full built-in catalog is reserved for explicit browse views such as `models.list` with `view: "all"` or `openclaw models list --all`.
66+- The Control UI model picker asks the Gateway for its configured model view: `agents.defaults.models` when present, including provider-wide `provider/*` entries, otherwise explicit `models.providers.*.models` plus providers with usable auth. The full built-in catalog is reserved for explicit browse views such as `models.list` with `view: "all"` or `openclaw models list --all`.
67676868## Quick model policy
6969@@ -88,7 +88,7 @@ It can set up model + auth for common providers, including **OpenAI Code (Codex)
8888- `agents.defaults.pdfModel.primary` and `agents.defaults.pdfModel.fallbacks`
8989- `agents.defaults.imageGenerationModel.primary` and `agents.defaults.imageGenerationModel.fallbacks`
9090- `agents.defaults.videoGenerationModel.primary` and `agents.defaults.videoGenerationModel.fallbacks`
91-- `agents.defaults.models` (allowlist + aliases + provider params)
91+- `agents.defaults.models` (allowlist + aliases + provider params + `provider/*` dynamic provider entries)
9292- `models.providers` (custom providers written into `models.json`)
93939494<Note>
@@ -140,6 +140,27 @@ exact provider/model shown by `openclaw models list --provider <provider>`.
140140Bare local filenames or display names are not enough when the allowlist is
141141active.
142142143+If you want to limit providers without manually listing every model, add
144+`provider/*` entries to `agents.defaults.models`:
145+146+```json5
147+{
148+ agents: {
149+ defaults: {
150+ models: {
151+"openai-codex/*": {},
152+"vllm/*": {},
153+ },
154+ },
155+ },
156+}
157+```
158+159+With that policy, `/model`, `/models`, and model pickers show the discovered
160+catalog for those providers only. New models from the selected providers can
161+appear without editing the allowlist. Exact `provider/model` entries can be mixed
162+with `provider/*` entries when you need one specific model from another provider.
163+143164Example allowlist config:
144165145166```json5
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。