Skip to content

fix: thinking controls offer unsupported provider-native efforts - #145248

Merged
obviyus merged 9 commits into
openclaw:mainfrom
MasterSwords1:fix/144866-subagent-spawn-thinking-compat
Sep 19, 2026
Merged

obviyus merged 9 commits into
openclaw:mainfrom
MasterSwords1:fix/144866-subagent-spawn-thinking-compat

Conversation

@MasterSwords1

@MasterSwords1 MasterSwords1 commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Related: #144866, #90703

What Problem This Solves

Fixes thinking controls offering and accepting advanced levels from provider-native labels such as MAX or XHIGH, even though the actual model request silently uses a lower level.

User Impact

The model picker, session validation, and execution now agree on which advanced levels a custom provider supports. Lowercase canonical efforts still work, and explicit mappings such as max: "MAX" preserve the provider's exact wire value. Unsupported selections fail without changing the session or its runtime/account selection.

Why This Change Was Made

The shared thinking profile incorrectly applied user-input aliases to provider-native capability labels. It now reads those labels exactly, preserving the existing explicit-mapping policy. Provider-owned profiles, explicit maps, and null opt-outs are unchanged; no new aliases or transport policy are introduced.

The earlier lowercase capability-admission bug is already fixed on main. This update addresses the remaining inconsistent advertisement rather than restoring the older transport changes.

Evidence

A real isolated Gateway and secretless loopback HTTP provider exercised models.list → sessions.patch → chat.send → chat.history:

Case Before After
Unmapped native MAX / XHIGH Advertised and accepted max / xhigh; actual wire used high Not advertised; unsupported selection rejected; accepted high sends high
Canonical lowercase max Session and wire max Unchanged
Explicit max → MAX mapping Session max, wire MAX Unchanged
Explicit null opt-out Selection rejected Unchanged

Rejected candidate selections left the complete persisted session row unchanged. A saved synthetic account selected through /model, its explicit OpenClaw runtime, and model identity survived both rejection and a subsequent real HTTP turn. A copied pre-fix session now displays its effective supported level instead of the unavailable Maximum choice.

  • Inspected before/after screenshots from the real Gateway UI.
  • New regression fails on the original shared profile; 137 focused policy/admission/wire-contract tests pass after the fix.
  • Focused formatting and diff checks pass. Full static and matrix checks remain in hosted CI.
  • Local provider responses were synthetic; no external provider or live-account behavior is claimed.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@MasterSwords1

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M labels Sep 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 5:19 AM ET / 09:19 UTC (Revision 9).

ClawSweeper review

What this changes

The shared thinking controls stop interpreting provider-native effort labels as user aliases, with regression coverage for unsupported advanced choices.

Merge readiness

✅ Ready for maintainer review

Still necessary: current main and the latest release retain the advertisement mismatch. The narrowed patch follows the established mapping policy, has convincing before/after evidence, and introduces no actionable correctness finding.

Priority: P2
Reviewed head: e15ef9ca7169148a1146c779f0af69238abe0253

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression coverage and strong real Gateway evidence.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The real isolated Gateway and loopback HTTP provider exercise the shared profile through model discovery, session patching, chat execution, and history. Inspected before/after screenshots show Maximum becoming High consistently with the observed request, while the supplied results cover canonical and explicit mappings plus saved-session preservation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The real isolated Gateway and loopback HTTP provider exercise the shared profile through model discovery, session patching, chat execution, and history. Inspected before/after screenshots show Maximum becoming High consistently with the observed request, while the supplied results cover canonical and explicit mappings plus saved-session preservation.
Evidence reviewed 8 items Verified introduced scope: The merge-base comparison contains only the exact-label correction and its regression test; earlier transport changes and unrelated base-branch files are not introduced by this head. The original head's raw parent records match the supplied introduction evidence.
Current main still contains the defect: The current-main capability loop still applies normalizeThinkLevel to provider-native supported-effort labels, allowing MAX, XHIGH, and user aliases to advertise canonical advanced levels.
Latest release also retains alias conversion: The v2026.9.5 source contains the same normalization in the capability loop. The tag peels to the supplied release commit, so the remaining correction is neither already on inspected main nor in this release.
Findings None None.
Security None None.

How this fits together

OpenClaw derives thinking choices from model capabilities and provider policy. The shared profile feeds model pickers, session validation, and execution-level selection.

flowchart LR
  A[Configured model capabilities] --> C[Shared thinking profile]
  B[Provider policy and explicit mappings] --> C
  C --> D[Model picker choices]
  C --> E[Session selection validation]
  E --> F[Effective thinking level]
  F --> G[Provider request]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -1, Tests +29. Total +28 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 2 -1
Tests 1 29 0 +29
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 30 2 +28

Review metrics

None.

Technical review

Best possible solution:

Keep capability advertisement aligned with exact provider labels while retaining explicit mappings and the existing saved-session clamping behavior.

Do we have a high-confidence way to reproduce the issue?

Yes: a custom model declaring high plus unmapped MAX/XHIGH exposes advanced choices through current main's alias normalization, while transport resolution uses exact labels. Source inspection and supplied before/after Gateway evidence establish the path; this review did not execute it.

Is this the best way to solve the issue?

Yes: removing user-alias conversion at capability advertisement is the narrow repair and preserves the documented explicit-mapping contract without changing transport policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against defa96fde13c.

Labels

Label justifications:

  • P2: Custom-provider thinking controls can advertise choices that execution silently lowers; the affected configuration surface is bounded.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The real isolated Gateway and loopback HTTP provider exercise the shared profile through model discovery, session patching, chat execution, and history. Inspected before/after screenshots show Maximum becoming High consistently with the observed request, while the supplied results cover canonical and explicit mappings plus saved-session preservation.
  • proof: sufficient: Contributor real behavior proof is sufficient. The real isolated Gateway and loopback HTTP provider exercise the shared profile through model discovery, session patching, chat execution, and history. Inspected before/after screenshots show Maximum becoming High consistently with the observed request, while the supplied results cover canonical and explicit mappings plus saved-session preservation.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The real isolated Gateway and loopback HTTP provider exercise the shared profile through model discovery, session patching, chat execution, and history. Inspected before/after screenshots show Maximum becoming High consistently with the observed request, while the supplied results cover canonical and explicit mappings plus saved-session preservation.

Evidence

What I checked:

  • Verified introduced scope: The merge-base comparison contains only the exact-label correction and its regression test; earlier transport changes and unrelated base-branch files are not introduced by this head. The original head's raw parent records match the supplied introduction evidence. (src/auto-reply/thinking.ts:243, e15ef9ca7169)
  • Current main still contains the defect: The current-main capability loop still applies normalizeThinkLevel to provider-native supported-effort labels, allowing MAX, XHIGH, and user aliases to advertise canonical advanced levels. (src/auto-reply/thinking.ts, defa96fde13c)
  • Latest release also retains alias conversion: The v2026.9.5 source contains the same normalization in the capability loop. The tag peels to the supplied release commit, so the remaining correction is neither already on inspected main nor in this release. (src/auto-reply/thinking.ts, ec9c1a13db89)
  • Existing explicit-mapping contract: Documentation directs provider-specific values through reasoningEffortMap. The transport resolver preserves mapped casing and compares supported labels exactly. Maintainer discussion on fix(ai): match reasoning efforts case-insensitively without lowering provider values #102993 (comment) explicitly confirms that canonical-looking provider casing requires a map. Public docs: docs/gateway/config-agents/models.md. (docs/gateway/config-agents/models.md:132, e15ef9ca7169)
  • Admission and saved-session handling: Session patch validation obtains the shared profile and rejects unsupported explicit selections before returning a successful projected row. Session presentation clamps stored levels using authoritative model capabilities. Explicit maps, null opt-outs, provider-owned profiles, and transport serialization are unchanged by the introduced patch. (src/gateway/sessions-patch.ts:682, e15ef9ca7169)
  • Inspected real Gateway proof: Both downloaded screenshots were inspected. Before, Maximum is selected while the loopback provider response reports reasoning_effort=high; after, the copied session's highest choice is High. The captured PR body and linked comment describe real Gateway RPC and HTTP turns for canonical max, explicitly mapped MAX, rejection without persisted-row changes, and preserved runtime/account selection. Responses are explicitly synthetic. Proof is linked at fix: thinking controls offer unsupported provider-native efforts #145248 (comment). (e15ef9ca7169)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-09-11T20:42:18.754Z sha d44faf4 :: needs real behavior proof before merge. :: [P2] Preserve newly admitted max through Completions serialization | [P2] Match capability normalization to provider label semantics
  • reviewed 2026-09-11T20:49:59.593Z sha d44faf4 :: needs real behavior proof before merge. :: [P2] Preserve newly admitted max through Completions serialization | [P2] Match capability normalization to provider label semantics
  • reviewed 2026-09-11T22:22:42.765Z sha 552825a :: needs real behavior proof before merge. :: [P2] Match capability casing to the Responses wire resolver | [P2] Represent supported efforts in the Completions compatibility type
  • reviewed 2026-09-11T23:30:54.526Z sha e8c394a :: blocked before merge. :: [P2] Preserve declared casing in direct Completions requests
  • reviewed 2026-09-12T00:30:48.174Z sha 3a9aa39 :: blocked before merge. :: [P1] Preserve literal efforts when model capabilities are unknown | [P2] Keep unsupported none out of Completions payloads
  • reviewed 2026-09-12T01:06:55.819Z sha f68e270 :: blocked before merge. :: [P2] Preserve provider-native casing for explicitly mapped disabled efforts
  • reviewed 2026-09-12T01:35:49.639Z sha e4e08a3 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-12T02:25:25.585Z sha dcb57c4 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 11, 2026
@MasterSwords1

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@MasterSwords1

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 11, 2026
@MasterSwords1

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 12, 2026
@MasterSwords1

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@openclaw-barnacle openclaw-barnacle Bot added channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime extensions: copilot-proxy Extension: copilot-proxy extensions: diagnostics-otel Extension: diagnostics-otel extensions: llm-task Extension: llm-task extensions: lobster Extension: lobster extensions: memory-core Extension: memory-core extensions: memory-lancedb Extension: memory-lancedb scripts Repository scripts docker Docker and sandbox tooling channel: feishu Channel integration: feishu channel: twitch Channel integration: twitch extensions: device-pair channel: irc extensions: acpx extensions: byteplus extensions: duckduckgo extensions: deepseek channel: qa-channel Channel integration: qa-channel extensions: qa-lab extensions: memory-wiki labels Sep 19, 2026
@obviyus

obviyus commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Merged as f04209e. Thanks @MasterSwords1 for the report and compatibility work.

Thinking controls now stop offering unsupported aliases for provider-native effort labels. Explicit mappings and lowercase efforts retain their existing behavior. Real Gateway-to-HTTP proof confirmed the fix, unchanged session/account/runtime state after rejected selections, and working mapped requests; 137 focused tests and exact-head hosted CI passed.

The related #90703 remains open because its broader proposal only partially overlaps this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants