-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
[Bug]: agents.defaults.models allowlist changes not applied on hot-reload #33600
Copy link
Copy link
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crash
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
When agents.defaults.models is modified in openclaw.json (e.g. removing a model from the allowlist), the gateway detects the config change but does not apply it at runtime. The stale model list keeps being served to clients (e.g. /models on Telegram).
Steps to reproduce
- Have a model (e.g.
openrouter/minimax/minimax-m2.5) inagents.defaults.models - Remove it from the config file
- Observe the gateway log:
config change detected; evaluating reload (agents.defaults.models.openrouter/minimax/minimax-m2.5 ...) config hot reload applied (agents.defaults.heartbeat) - Send
/modelson Telegram — the removed model still appears - Send
/reseton Telegram — the session may pick up the removed model as active
Expected behavior
- Removing a model from
agents.defaults.modelsshould take effect immediately (or at least on gateway restart) /resetshould never select a model that is no longer in the allowlist
Actual behavior
- Hot-reload detects the change but only applies
heartbeatand a few other fields —agents.defaults.modelsis silently skipped - Even after a full gateway restart, a model stored in
sessions.json(from a previous/modelselection) can be restored by/reset, bypassing the allowlist entirely
OpenClaw version
2026.3.2
Operating system
Ubuntu 22.04 LTS
Install method
npm global
Logs, screenshots, and evidence
Impact and severity
- Affected: Any user who removes a model from
agents.defaults.modelsvia config edit; particularly visible on Telegram (and likely any channel with/modelsand/resetcommands) - Severity: Annoying to workflow-blocking — the unwanted model keeps being selected even after explicit removal, requiring manual intervention in internal JSON files to fix
- Frequency: Always reproducible — every
/resetafter removing a model from the allowlist will restore the stale model until sessions.json is manually patched - Consequence: User is silently served a model they explicitly don't want, with no error or warning. The only indication is noticing degraded response quality or checking
/model. Recovery requires knowing to manually editsessions.json, which is not documented anywhere.
Additional information
Workaround
- Remove model from
agents.defaults.modelsin config - Manually clear
model,modelOverride, andmodelProviderfrom all affected session entries in~/.openclaw/agents/main/sessions/sessions.json - Restart gateway
Suggestion
- Make
agents.defaults.modelshot-reloadable, OR clearly document it requires a restart - On
/reset, validate the stored session model against the current allowlist before using it
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crash
Type
Fields
Give feedbackNo fields configured for issues without a type.