Summary
In 2026.6.1, two new SQLite tables (agent_model_catalogs, model_capability_cache) are created by the state-db migration but no producer code in the shipped dist/ build ever writes to them. As a result openclaw models list falls back to live per-provider fetches on every call.
Measured on Linux, 2026.6.1 (2e08f0f), warm gateway:
| command |
time |
openclaw models status |
2.9 s (baseline: CLI + config load) |
openclaw models list (configured providers only) |
25.7 s |
openclaw models list --all |
53.0 s |
Repeated calls don't speed up — there's no persisted catalog cache.
Evidence
Schema is present:
$ grep -nE "agent_model_catalogs|model_capability_cache" dist/openclaw-state-db-*.js
536:CREATE TABLE IF NOT EXISTS model_capability_cache (
554:CREATE INDEX IF NOT EXISTS idx_model_capability_cache_provider_updated ON model_capability_cache(...)
557:CREATE TABLE IF NOT EXISTS agent_model_catalogs (
564:CREATE INDEX IF NOT EXISTS idx_agent_model_catalogs_agent_dir ON agent_model_catalogs(...)
No producer anywhere in dist/:
$ grep -rnE 'INSERT INTO (agent_model_catalogs|model_capability_cache)' dist/
(no matches)
$ grep -rnE '"agent_model_catalogs"|'\''agent_model_catalogs'\''|`agent_model_catalogs`' dist/
(no matches)
$ grep -rnE '"model_capability_cache"|'\''model_capability_cache'\''|`model_capability_cache`' dist/
(no matches)
Both tables stay at 0 rows across restarts, after openclaw plugins registry --refresh, and after invoking models list --all.
(The OpenRouter capability cache under plugin_state_entries / core:openrouter-model-capabilities namespace models.v3 is wired correctly via createCorePluginStateSyncKeyedStore in provider-stream-*.js. That's a different, working path. The two new tables look like a separate planned cache whose writer didn't ship.)
Repro
- Fresh-start gateway on 2026.6.1.
sqlite3 ~/.openclaw/state/openclaw.sqlite "SELECT COUNT(*) FROM agent_model_catalogs; SELECT COUNT(*) FROM model_capability_cache;" → both 0.
time openclaw models list --all → ~50 s on first call.
- Re-run step 2 → still both 0.
- Re-run step 3 → still ~50 s; no caching benefit.
Expected
After the first models list --all, subsequent calls should hit the new SQLite tables and complete in well under 1 s.
Environment
- OpenClaw 2026.6.1 (
2e08f0f)
- Linux (kernel 5.15)
- Node 24.15.0
- Providers configured: minimax, anthropic, mistral (no OpenRouter)
Notes
Also noticed (likely separate, happy to file separately if useful):
[state-migrations] Legacy state migration warnings: Left plugin install index in place because shared SQLite state has conflicting plugin install metadata for: acpx, brave, diffs, memory-lancedb
Triggered by version drift between ~/.openclaw/plugins/installs.json (legacy) and installed_plugin_index in ~/.openclaw/state/openclaw.sqlite. openclaw plugins registry --refresh only rebuilds SQLite, leaving the legacy file out of sync — so the warning fires on every restart until the legacy file is removed.
Summary
In 2026.6.1, two new SQLite tables (
agent_model_catalogs,model_capability_cache) are created by the state-db migration but no producer code in the shippeddist/build ever writes to them. As a resultopenclaw models listfalls back to live per-provider fetches on every call.Measured on Linux, 2026.6.1 (
2e08f0f), warm gateway:openclaw models statusopenclaw models list(configured providers only)openclaw models list --allRepeated calls don't speed up — there's no persisted catalog cache.
Evidence
Schema is present:
No producer anywhere in
dist/:Both tables stay at 0 rows across restarts, after
openclaw plugins registry --refresh, and after invokingmodels list --all.(The OpenRouter capability cache under
plugin_state_entries/core:openrouter-model-capabilitiesnamespacemodels.v3is wired correctly viacreateCorePluginStateSyncKeyedStoreinprovider-stream-*.js. That's a different, working path. The two new tables look like a separate planned cache whose writer didn't ship.)Repro
sqlite3 ~/.openclaw/state/openclaw.sqlite "SELECT COUNT(*) FROM agent_model_catalogs; SELECT COUNT(*) FROM model_capability_cache;"→ both 0.time openclaw models list --all→ ~50 s on first call.Expected
After the first
models list --all, subsequent calls should hit the new SQLite tables and complete in well under 1 s.Environment
2e08f0f)Notes
Also noticed (likely separate, happy to file separately if useful):
[state-migrations] Legacy state migration warnings: Left plugin install index in place because shared SQLite state has conflicting plugin install metadata for: acpx, brave, diffs, memory-lancedbTriggered by version drift between
~/.openclaw/plugins/installs.json(legacy) andinstalled_plugin_indexin~/.openclaw/state/openclaw.sqlite.openclaw plugins registry --refreshonly rebuilds SQLite, leaving the legacy file out of sync — so the warning fires on every restart until the legacy file is removed.