Skip to content

fix(model): preserve reasoning in provider fallback resolution#29285

Merged
vincentkoc merged 2 commits intoopenclaw:mainfrom
vincentkoc:vincentkoc-code/fix-ollama-fallback-reasoning
Feb 28, 2026
Merged

fix(model): preserve reasoning in provider fallback resolution#29285
vincentkoc merged 2 commits intoopenclaw:mainfrom
vincentkoc:vincentkoc-code/fix-ollama-fallback-reasoning

Conversation

@vincentkoc
Copy link
Copy Markdown
Member

Summary

  • Problem: provider fallback in resolveModel() still hardcoded reasoning: false even when a matching configured provider model has reasoning: true.
  • Why it matters: reasoning-capable models lose reasoning effort propagation in fallback paths.
  • What changed:
    • use configuredModel?.reasoning ?? false in provider fallback model construction.
    • add regression test proving matched fallback model propagates reasoning: true.
  • Scope boundary:

Linked Issue/PR

Verification

  • pnpm vitest run src/agents/pi-embedded-runner/model.test.ts
  • pnpm tsgo

@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Feb 28, 2026
@vincentkoc vincentkoc marked this pull request as ready for review February 28, 2026 01:34
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 28, 2026

Greptile Summary

Fixed provider fallback to preserve reasoning: true from configured models instead of hardcoding to false.

  • Changed src/agents/pi-embedded-runner/model.ts:106 to use configuredModel?.reasoning ?? false instead of hardcoded reasoning: false
  • This ensures reasoning-capable models maintain their reasoning capability when resolved through the provider fallback path
  • Follows the existing pattern used for contextWindow and maxTokens fields
  • Added regression test proving matched fallback models properly propagate reasoning: true

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Single-line fix that aligns with existing code patterns, well-tested with new regression test, addresses a specific bug without introducing new complexity or edge cases
  • No files require special attention

Last reviewed commit: 79b4ebd

@vincentkoc vincentkoc merged commit 50aa6a4 into openclaw:main Feb 28, 2026
30 checks passed
stolyarchuk pushed a commit to llmxio/openclaw that referenced this pull request Feb 28, 2026
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
xiexikang pushed a commit to C-clawd/cclawd that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation

(cherry picked from commit 8fc2b38)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation

(cherry picked from commit 8fc2b38)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation

(cherry picked from commit 8fc2b38)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
ohmyskyhigh pushed a commit to ohmyskyhigh/openclaw that referenced this pull request Feb 28, 2026
vincentkoc added a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
vincentkoc added a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
vincentkoc added a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
vincentkoc added a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 1, 2026
ansh pushed a commit to vibecode/openclaw that referenced this pull request Mar 2, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
ansh pushed a commit to vibecode/openclaw that referenced this pull request Mar 2, 2026
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
venjiang pushed a commit to venjiang/openclaw that referenced this pull request Mar 2, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
robertchang-ga pushed a commit to robertchang-ga/openclaw that referenced this pull request Mar 2, 2026
execute008 pushed a commit to execute008/openclaw that referenced this pull request Mar 2, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
execute008 pushed a commit to execute008/openclaw that referenced this pull request Mar 2, 2026
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…law#29285)

* fix(model): preserve reasoning in provider fallback resolution

* test(model): cover fallback reasoning propagation
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Mateljan1 pushed a commit to Mateljan1/openclaw that referenced this pull request Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model fallback ignores reasoning and uses wrong contextWindow/maxTokens

1 participant