Skip to content

fix: cron model fallback to agent defaults when payload.model fails#26717

Merged
shakkernerd merged 3 commits intoopenclaw:mainfrom
Youyou972:fix/cron-model-fallback
Feb 25, 2026
Merged

fix: cron model fallback to agent defaults when payload.model fails#26717
shakkernerd merged 3 commits intoopenclaw:mainfrom
Youyou972:fix/cron-model-fallback

Conversation

@Youyou972
Copy link
Contributor

@Youyou972 Youyou972 commented Feb 25, 2026

Summary

When a cron job specifies payload.model and that model is not in the allowed list, the job now gracefully falls back to the agent's default model chain instead of hard-failing.

Changes

  • src/cron/isolated-agent/run.ts: Instead of returning an error when resolveAllowedModelRef() fails for payload.model, log a warning and skip the model override (letting the agent default model chain handle it)
  • src/cron/isolated-agent/run.skill-filter.test.ts: Added tests for both the fallback path and the happy path

Before

resolveAllowedModelRef() error → return { ok: false, error: 'model not allowed' } → job fails

After

resolveAllowedModelRef() error → logWarn('falling back to agent defaults') → job continues with default model

Fixes #26786

@shakkernerd shakkernerd force-pushed the fix/cron-model-fallback branch from c56e198 to 06454bd Compare February 25, 2026 23:33
@shakkernerd shakkernerd merged commit 15cfba7 into openclaw:main Feb 25, 2026
10 checks passed
@shakkernerd
Copy link
Member

Merged via squash.

Thanks @Youyou972!

brianleach pushed a commit to brianleach/openclaw that referenced this pull request Feb 26, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
execute008 pushed a commit to execute008/openclaw that referenced this pull request Feb 27, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
vincentkoc pushed a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
vincentkoc pushed a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 1, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd

(cherry picked from commit 15cfba7)

# Conflicts:
#	CHANGELOG.md
#	src/cron/isolated-agent/run.skill-filter.test.ts
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd

(cherry picked from commit 15cfba7)

# Conflicts:
#	CHANGELOG.md
#	src/cron/isolated-agent/run.skill-filter.test.ts
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
thebenjaminlee pushed a commit to escape-velocity-ventures/openclaw that referenced this pull request Mar 7, 2026
…penclaw#26717)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 06454bd
Co-authored-by: Youyou972 <50808411+Youyou972@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cron jobs with payload.model hard-fail instead of falling back to agent defaults

2 participants