mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 13:01:41 +00:00
fix(agents): prioritize per-model thinking defaults (#30439)
* fix(agents): honor per-model thinking defaults * fix(agents): preserve thinking fallback with model defaults --------- Co-authored-by: Mark L <73659136+markliuyuxiang@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -299,16 +299,15 @@ export async function runCronIsolatedAgentTurn(params: {
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve thinking level - job thinking > hooks.gmail.thinking > agent default
|
||||
// Resolve thinking level - job thinking > hooks.gmail.thinking > model/global defaults
|
||||
const hooksGmailThinking = isGmailHook
|
||||
? normalizeThinkLevel(params.cfg.hooks?.gmail?.thinking)
|
||||
: undefined;
|
||||
const thinkOverride = normalizeThinkLevel(agentCfg?.thinkingDefault);
|
||||
const jobThink = normalizeThinkLevel(
|
||||
(params.job.payload.kind === "agentTurn" ? params.job.payload.thinking : undefined) ??
|
||||
undefined,
|
||||
);
|
||||
let thinkLevel = jobThink ?? hooksGmailThinking ?? thinkOverride;
|
||||
let thinkLevel = jobThink ?? hooksGmailThinking;
|
||||
if (!thinkLevel) {
|
||||
thinkLevel = resolveThinkingDefault({
|
||||
cfg: cfgWithAgentDefaults,
|
||||
|
||||
Reference in New Issue
Block a user