fix: restrict static model catalogs to bundled providers

This commit is contained in:
Shakker
2026-04-22 03:45:13 +01:00
committed by Shakker
parent f3da6e96b7
commit 10959aa980
3 changed files with 60 additions and 165 deletions

View File

@@ -241,10 +241,11 @@ API key auth, and dynamic model resolution.
`buildProvider` is the live catalog path used when OpenClaw can resolve real
provider auth. It may perform provider-specific discovery. Use
`buildStaticProvider` only for bundled/offline rows that are safe to show in
display-only surfaces such as `models list --all` before auth is configured;
it must not require credentials or make network requests. Static catalog
hooks run with an empty config, empty env, and no agent/workspace paths.
`buildStaticProvider` only for offline rows that are safe to show before auth
is configured; it must not require credentials or make network requests.
OpenClaw's `models list --all` display currently executes static catalogs
only for bundled provider plugins, with an empty config, empty env, and no
agent/workspace paths.
If your auth flow also needs to patch `models.providers.*`, aliases, and
the agent default model during onboarding, use the preset helpers from