Skip to content

fix: honor configured xhigh thinking compat - #74273

Merged
steipete merged 2 commits into
mainfrom
fix/configured-xhigh-thinking-compat
Apr 29, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/configured-xhigh-thinking-compat

Conversation

@steipete

Copy link
Copy Markdown
Contributor

No description provided.

@steipete

Copy link
Copy Markdown
Contributor Author

/clawsweeper automerge

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Apr 29, 2026
@steipete steipete added the clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge label Apr 29, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper automerge is enabled for this PR.

I added clawsweeper:automerge and asked ClawSweeper to review this head. If ClawSweeper emits a repair marker or requests changes, I will repair/rebase the branch and ask for another review, up to the configured round limit.

A maintainer can pause this with /clawsweeper stop.

@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the handling of compat.supportedReasoningEfforts entries that include "xhigh" for custom OpenAI-compatible provider models. Previously, configured custom models that declared xhigh support in their compat block were ignored in command menus, Gateway session rows, session-patch validation, agent CLI validation, and llm-task validation. The fix propagates the compat field through catalog construction, adds a catalogSupportsXHigh helper in resolveThinkingProfile, and falls back to configuredThinkingCatalog in agentCommandInternal and the plugin runtime when no higher-priority catalog is available.

Confidence Score: 5/5

This PR is safe to merge — it is a targeted bug fix with comprehensive, dedicated tests covering all affected code paths.

No P0 or P1 issues identified. The logic is correct: appendProfileLevel already deduplicates entries, so the two xhigh-append paths (catalog compat and provider plugin) cannot produce a duplicated level. The new binaryDecision !== true guard on resolveProviderXHighThinking is a correct secondary fix that prevents xhigh from leaking into binary-thinking profiles. The pluginProfile early-return path intentionally bypasses catalog compat (provider plugins are the source of truth), matching the documented scope of the feature. Test coverage spans thinking profile, command menus, Gateway sessions, patch validation, agent CLI, and plugin runtime.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: honor configured xhigh thinking com..." | Re-trigger Greptile

@clawsweeper

clawsweeper Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Keep this PR open. It has the protected maintainer label, and current main still lacks the PR's central behavior: configured model compat.supportedReasoningEfforts is accepted by config/transport code, but model/thinking catalog entries do not preserve that compat metadata for menus, Gateway validation/session rows, agent CLI validation, or plugin runtime policy.

Maintainer follow-up before merge:

Keep this PR open for maintainer review and CI. The right direction is to preserve ModelCompatConfig through model/thinking catalog entries and use configured compat.supportedReasoningEfforts consistently across /think menus, Gateway rows/defaults, session patch validation, agent CLI, plugin runtime policy, and llm-task, while keeping provider-owned and binary thinking profiles authoritative. The related #48904 context is useful as prior art if this PR becomes the canonical replacement.

Best possible solution:

Keep this PR open for maintainer review and CI. The right direction is to preserve ModelCompatConfig through model/thinking catalog entries and use configured compat.supportedReasoningEfforts consistently across /think menus, Gateway rows/defaults, session patch validation, agent CLI, plugin runtime policy, and llm-task, while keeping provider-owned and binary thinking profiles authoritative. The related #48904 context is useful as prior art if this PR becomes the canonical replacement.

What I checked:

  • Protected label: The provided GitHub context lists the maintainer label on this PR. Repository cleanup policy requires protected-label items to stay open for explicit maintainer handling. (346b9f1a968f)
  • Thinking catalog drops compat: On current main, ThinkingCatalogEntry contains only provider, id, and reasoning; resolveThinkingPolicyContext only returns candidate?.reasoning, so configured compat cannot influence xhigh support through thinking profiles. (src/auto-reply/thinking.shared.ts:25, a1197b907524)
  • Model catalog drops compat: On current main, ModelCatalogEntry has no compat field; loadModelCatalog pushes discovered entries without compat, and buildConfiguredModelCatalog copies id/name/contextWindow/reasoning/input but not model.compat. (src/agents/model-catalog.types.ts:3, a1197b907524)
  • Compat is already valid transport config: The config model type already includes supportedReasoningEfforts and reasoningEffortMap, and OpenAI reasoning effort resolution already reads model.compat.supportedReasoningEfforts; the gap is catalog/policy propagation, not schema acceptance. (src/config/types.models.ts:57, a1197b907524)
  • Affected surfaces use current thinking catalogs: Agent command validation/hints, Gateway session patch validation/default rows, and plugin runtime policy already call thinking helpers with catalog inputs; without compat in those catalogs, configured custom provider refs cannot expose or validate xhigh. (src/agents/agent-command.ts:301, a1197b907524)
  • Security review pass: The provided PR file list is limited to source, tests, docs, and changelog for thinking/model catalog behavior. It does not include workflows, action refs, package manifests, lockfiles, install/release scripts, generated vendor blobs, or secret-handling files; remaining risk is functional review/CI across shared runtime policy paths. (346b9f1a968f)

Likely related people:

  • Vincent Koc: Prior ClawSweeper context for this same PR tied the central thinking/profile and model-selection paths to commit cf6e4d0; local history also shows Vincent connected to recent model-catalog work via d33c3f7 metadata. (role: likely feature-history owner; confidence: medium; commits: cf6e4d0ed743, d33c3f7da651; files: src/auto-reply/thinking.ts, src/auto-reply/thinking.shared.ts, src/agents/model-selection-shared.ts)
  • Super Zheng: Authored d33c3f7, a recent current-main model catalog maintenance commit touching the catalog assembly area this PR extends to preserve compat metadata. (role: recent adjacent maintainer; confidence: medium; commits: d33c3f7da651; files: src/agents/model-catalog.ts, src/agents/model-catalog.test.ts, src/agents/model-suppression.ts)

Remaining risk / open question:

  • Protected maintainer label requires explicit maintainer handling before merge or closure.
  • The PR spans shared thinking policy, model catalog metadata, Gateway session validation/defaults, agent command validation, plugin runtime policy, docs, and tests, so it needs normal review and CI rather than cleanup closure.
  • A security bot review was still pending in the provided timeline; the local file-list security pass found no supply-chain-sensitive file changes, but merge should wait for normal checks.

Codex review notes: model gpt-5.5, reasoning high; reviewed against a1197b907524.

@steipete
steipete force-pushed the fix/configured-xhigh-thinking-compat branch from eade9b8 to a1431aa Compare April 29, 2026 10:21
@steipete

Copy link
Copy Markdown
Contributor Author

/clawsweeper automerge

@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Apr 29, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper automerge is enabled for this PR.

I added clawsweeper:automerge and asked ClawSweeper to review this head. If ClawSweeper emits a repair marker or requests changes, I will repair/rebase the branch and ask for another review, up to the configured round limit.

A maintainer can pause this with /clawsweeper stop.

@steipete

Copy link
Copy Markdown
Contributor Author

/clawsweeper automerge

@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper automerge is enabled for this PR.

I added clawsweeper:automerge and asked ClawSweeper to review this head. If ClawSweeper emits a repair marker or requests changes, I will repair/rebase the branch and ask for another review, up to the configured round limit.

A maintainer can pause this with /clawsweeper stop.

@steipete
steipete force-pushed the fix/configured-xhigh-thinking-compat branch from 874f480 to 346b9f1 Compare April 29, 2026 10:27
@steipete

Copy link
Copy Markdown
Contributor Author

/clawsweeper automerge

@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper automerge is enabled for this PR.

I added clawsweeper:automerge and asked ClawSweeper to review this head. If ClawSweeper emits a repair marker or requests changes, I will repair/rebase the branch and ask for another review, up to the configured round limit.

A maintainer can pause this with /clawsweeper stop.

@clawsweeper clawsweeper Bot added the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label Apr 29, 2026
@clawsweeper

clawsweeper Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper is pausing automerge for human review.

Source: clawsweeper[bot]
Reason: structured ClawSweeper verdict: needs-human (sha=346b9f1a968fa7d7f64a6546981dadd7ebcb1fbc)

I added clawsweeper:human-review and left the final call with a maintainer.

@steipete
steipete merged commit 93d5cd1 into main Apr 29, 2026
74 checks passed
@steipete
steipete deleted the fix/configured-xhigh-thinking-compat branch April 29, 2026 10:35
lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge clawsweeper:human-review Needs maintainer review before ClawSweeper can continue commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant