openclaw - ✅(Solved) Fix [bug]: openai-codex xhigh thinking level is downgraded in gateway because provider thinking profile is not visible at startup [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74796Fetched 2026-05-01 05:41:19
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
2
Timeline (top)
commented ×2cross-referenced ×2renamed ×2

In OpenClaw 2026.4.27, openai-codex/gpt-5.5 appears to support xhigh at the provider level, but gateway sessions reject or downgrade xhigh to high. The shared thinking resolver behaves as if the openai-codex provider profile is not present in the active gateway plugin registry.

This affects normal gateway sessions, not just CLI help text or display output.

Error Message

GatewayClientRequestError: Error: Thinking level "xhigh" is not supported for openai-codex/gpt-5.5. Use one of: off, minimal, low, medium, high.

Root Cause

Because the provider-specific resolveThinkingProfile is not visible in that registry, the shared resolver falls back to the base thinking levels and omits xhigh.

Fix Action

Fixed

PR fix notes

PR #75295: fix(thinking): resolve provider hooks when not startup-active

Description (problem / solution / changelog)

Summary

  • resolve provider thinking hooks from the provider runtime when the owning plugin is enabled but not startup-active
  • prefer active registry hooks when they already exist, but continue past matching providers that do not implement the requested thinking hook
  • add regression coverage for the startup-inactive OpenAI Codex xhigh path

Why

openai-codex/gpt-5.5 and related models can advertise xhigh from the provider plugin, but gateway/session validation may resolve thinking policy before the OpenAI plugin is active in the startup registry. In that state OpenClaw fell back to base levels and rejected or downgraded xhigh.

This keeps provider-specific knowledge in the provider layer and makes the generic thinking resolver load provider-owned hooks on demand instead of hardcoding Codex behavior in core.

What changed

  • src/plugins/provider-thinking.ts
    • add runtime fallback lookup via resolveProviderRuntimePlugin
    • cache resolved provider runtime hooks by provider and active registry version
    • treat hookAliases as valid provider identifiers for thinking policy resolution
    • continue to prefer already-active registry hooks when present
  • src/plugins/provider-thinking.test.ts
    • covers startup-inactive provider runtime fallback
    • covers continuing past active matching providers with no hook implementation
    • covers active-registry precedence

Validation

Local:

  • pnpm exec vitest run src/plugins/provider-thinking.test.ts src/auto-reply/thinking.test.ts src/gateway/session-utils.test.ts src/gateway/sessions-patch.test.ts
  • targeted smoke against the patched modules for:
    • openai-codex/gpt-5.5
    • thinkingDefault: xhigh
    • empty startup-active provider registry
    • session defaults path
    • sessions patch path

The smoke confirmed:

  • xhigh appears in thinking options
  • session defaults include xhigh
  • thinkingDefault remains xhigh
  • session patch accepts and stores thinkingLevel: "xhigh"

Related

Fixes #74796

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/openai/openclaw.plugin.json (modified, +54/-0)
  • src/plugins/provider-thinking.test.ts (added, +126/-0)
  • src/plugins/provider-thinking.ts (modified, +70/-2)

Code Example

GatewayClientRequestError: Error: Thinking level "xhigh" is not supported for openai-codex/gpt-5.5. Use one of: off, minimal, low, medium, high.

---

{
  "modelProvider": "openai-codex",
  "model": "gpt-5.5",
  "thinkingDefault": "xhigh",
  "thinkingLevel": "high",
  "thinkingLevels": ["off", "minimal", "low", "medium", "high"]
}

---

["off", "minimal", "low", "medium", "high", "xhigh"]

---

openclaw plugins enable openai
# restart/recreate gateway

---

direct provider profile: includes xhigh
shared resolver without registry provider: off,minimal,low,medium,high
shared resolver with provider injected into active registry: off,minimal,low,medium,high,xhigh

---

http server listening (8 plugins: acpx, bonjour, browser, device-pair, memory-core, phone-control, talk-voice, telegram; ...)

---

"activation": {
  "onStartup": false
}
RAW_BUFFERClick to expand / collapse

Summary

In OpenClaw 2026.4.27, openai-codex/gpt-5.5 appears to support xhigh at the provider level, but gateway sessions reject or downgrade xhigh to high. The shared thinking resolver behaves as if the openai-codex provider profile is not present in the active gateway plugin registry.

This affects normal gateway sessions, not just CLI help text or display output.

Environment

  • OpenClaw: 2026.4.27
  • Runtime: Docker gateway
  • Platform: Linux arm64 / Raspberry Pi
  • Model: openai-codex/gpt-5.5
  • Config has thinkingDefault: "xhigh"
  • plugins.entries.openai.enabled: true

Current behavior

A normal gateway-backed agent turn with --thinking xhigh fails validation before falling back locally:

GatewayClientRequestError: Error: Thinking level "xhigh" is not supported for openai-codex/gpt-5.5. Use one of: off, minimal, low, medium, high.

A live sessions.list result for a gpt-5.5 / openai-codex session reports:

{
  "modelProvider": "openai-codex",
  "model": "gpt-5.5",
  "thinkingDefault": "xhigh",
  "thinkingLevel": "high",
  "thinkingLevels": ["off", "minimal", "low", "medium", "high"]
}

So thinkingDefault remains xhigh, but the effective level is silently/remapped to high, and the advertised supported levels omit xhigh.

Expected behavior

For openai-codex/gpt-5.5, gateway validation and session metadata should include and accept xhigh, matching the OpenAI Codex provider's own thinking profile.

Expected levels:

["off", "minimal", "low", "medium", "high", "xhigh"]

Reproduction

  1. Configure an agent/session to use openai-codex/gpt-5.5.
  2. Set thinkingDefault to xhigh, or run an agent turn with --thinking xhigh.
  3. Observe that the gateway rejects xhigh or stores the session as thinkingLevel: "high".
  4. Query session metadata via sessions.list and observe that thinkingLevels omits xhigh.

I also tried the native config path:

openclaw plugins enable openai
# restart/recreate gateway

That did not change the behavior. The config already had plugins.entries.openai.enabled: true; the enable command only changed metadata.

Local diagnostic evidence

The bundled OpenAI Codex provider itself advertises xhigh for gpt-5.5 when instantiated directly. In the installed bundle, the provider has an xhigh model list including gpt-5.5, and its resolveThinkingProfile({ modelId: "gpt-5.5" }) returns levels including xhigh.

However, the shared thinking resolver only includes xhigh if the active plugin registry exposes the provider profile. A direct Node check showed this split:

direct provider profile: includes xhigh
shared resolver without registry provider: off,minimal,low,medium,high
shared resolver with provider injected into active registry: off,minimal,low,medium,high,xhigh

Gateway startup logs also showed the startup plugin list did not include openai even though the OpenAI plugin is enabled in config:

http server listening (8 plugins: acpx, bonjour, browser, device-pair, memory-core, phone-control, talk-voice, telegram; ...)

The bundled OpenAI plugin manifest has:

"activation": {
  "onStartup": false
}

Suspected cause

The gateway thinking validation/session metadata path calls the shared thinking resolver before the openai provider plugin has been activated/imported into globalThis[Symbol.for("openclaw.pluginRegistryState")].activeRegistry.providers.

Because the provider-specific resolveThinkingProfile is not visible in that registry, the shared resolver falls back to the base thinking levels and omits xhigh.

Suggested fix direction

The fix likely belongs in the shared thinking/provider-profile plumbing rather than individual callers:

  • Ensure provider plugins needed for configured/default models are activated before gateway thinking validation and session metadata resolution, or
  • Make the thinking resolver use the canonical provider lookup/runtime provider registry instead of only the currently active startup registry, or
  • Add a provider-triggered activation path for thinking profile resolution.

A regression test should cover the gateway path, not only direct provider instantiation:

  • listThinkingLevelOptions("openai-codex", "gpt-5.5") includes xhigh in a gateway/session-validation context.
  • A gateway agent turn with --thinking xhigh --model openai-codex/gpt-5.5 is accepted.

Impact

Users who configure xhigh for OpenAI Codex GPT-5.x models get silently downgraded to high in gateway sessions, or receive a gateway validation error for explicit --thinking xhigh turns.

extent analysis

TL;DR

The shared thinking resolver in OpenClaw's gateway does not include xhigh for openai-codex/gpt-5.5 because the openai provider plugin is not activated before thinking validation and session metadata resolution.

Guidance

  • Verify that the openai provider plugin is enabled and configured correctly in the OpenClaw configuration.
  • Check the gateway startup logs to ensure the openai plugin is included in the list of activated plugins.
  • Consider modifying the shared thinking resolver to use the canonical provider lookup/runtime provider registry instead of only the currently active startup registry.
  • Test the gateway path with a regression test that covers listThinkingLevelOptions("openai-codex", "gpt-5.5") and a gateway agent turn with --thinking xhigh --model openai-codex/gpt-5.5.

Example

No code snippet is provided as the issue is related to the configuration and activation of plugins in OpenClaw.

Notes

The issue is specific to the OpenClaw 2026.4.27 version and the openai-codex/gpt-5.5 model. The fix may require changes to the shared thinking resolver or the plugin activation mechanism.

Recommendation

Apply a workaround by modifying the shared thinking resolver to use the canonical provider lookup/runtime provider registry, as this is a more straightforward solution than modifying the plugin activation mechanism. This will ensure that the openai provider plugin is included in the thinking profile resolution, even if it is not activated at startup.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

For openai-codex/gpt-5.5, gateway validation and session metadata should include and accept xhigh, matching the OpenAI Codex provider's own thinking profile.

Expected levels:

["off", "minimal", "low", "medium", "high", "xhigh"]

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [bug]: openai-codex xhigh thinking level is downgraded in gateway because provider thinking profile is not visible at startup [1 pull requests, 2 comments, 3 participants]