Commit 743525c
committed
fix: fallback to config.llm.model when resolveAgentPrimaryModelRef returns undefined
Root cause: When generateReflectionText() is triggered via plugin hooks
(dc-channel--...), the plugin-scoped config lacks an 'agents' section.
resolveAgentPrimaryModelRef() returns undefined, causing
runEmbeddedPiAgent to receive provider=undefined, model=undefined.
This falls back to openai/gpt-5.4 (default), which has no API key,
resulting in a 56-second timeout before minimal fallback activation.
Fix: When resolveAgentPrimaryModelRef returns undefined, fall back to
config.llm.model (the MiniMax M2.1 configured in plugin's openclaw.json).
This ensures correct model is used for both agent:main (which gets full
config and resolveAgentPrimaryModelRef works) and dc-channel--... sessions
(which get plugin-scoped config).
Fixes the 56-second delay on /reset for dc-channel Discord sessions.1 parent e3470dc commit 743525c
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | | - | |
1158 | | - | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1159 | 1160 | | |
1160 | 1161 | | |
1161 | 1162 | | |
| |||
0 commit comments