openclaw - 💡(How to fix) Fix [Bug] reasoning_effort not sent to OpenAI API for gpt-5.4 in isolated cron sessions [1 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#63367Fetched 2026-04-09 07:54:41
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Isolated cron sessions with openai/gpt-5.4 produce zero reasoning tokens. OC does not send reasoning.effort to the OpenAI Responses API, despite the session having thinkingLevel: high and model params having reasoning_effort: "high".

Direct API call works. Calling the OpenAI Responses API directly (bypassing OC) with reasoning.effort: "high" returns 90 reasoning tokens. The model supports it. OC just isn't sending it.

Mini models work. openai-mini/gpt-5.1-codex-mini in the same session type, same gateway, correctly receives reasoning_effort and returns 15,000+ reasoning tokens.

Root Cause

Isolated cron sessions with openai/gpt-5.4 produce zero reasoning tokens. OC does not send reasoning.effort to the OpenAI Responses API, despite the session having thinkingLevel: high and model params having reasoning_effort: "high".

Direct API call works. Calling the OpenAI Responses API directly (bypassing OC) with reasoning.effort: "high" returns 90 reasoning tokens. The model supports it. OC just isn't sending it.

Mini models work. openai-mini/gpt-5.1-codex-mini in the same session type, same gateway, correctly receives reasoning_effort and returns 15,000+ reasoning tokens.

Code Example

# 1. Configure model params:
# agents.defaults.models.openai/gpt-5.4 = {"params": {"reasoning_effort": "high"}}
# agents.defaults.thinkingDefault = "medium"

# 2. Schedule isolated cron job:
openclaw cron add --name test-reasoning --at 1m --delete-after-run \
  --session isolated --model openai/gpt-5.4 --thinking high \
  --no-deliver --message "What is 2+2? Show reasoning."

# 3. After job completes, check session JSONL:
# - thinkingLevel: "high" is set correctly in session header
# - Assistant response has ZERO type:"thinking" content blocks
# - Usage shows total_tokens = input_tokens (no reasoning overhead)

# 4. For comparison, same test with mini:
openclaw cron add --name test-mini --at 1m --delete-after-run \
  --session isolated --model openai-mini/gpt-5.1-codex-mini --thinking medium \
  --no-deliver --message "What is 2+2? Show reasoning."
# Result: 15,000+ reasoning tokens, multiple thinking blocks

---

payload = {
    "model": "gpt-5.4",
    "input": [{"role": "user", "content": "What is 2+2? Think step by step."}],
    "reasoning": {"effort": "high"}
}
# Result: 90 reasoning tokens, reasoning output item present

---

{"type": "thinking_level_change", "thinkingLevel": "high"}
{"type": "custom", "customType": "model-snapshot", "data": {"provider": "openai", "modelApi": "openai-responses", "modelId": "gpt-5.4"}}
RAW_BUFFERClick to expand / collapse

Environment

  • OC version: 2026.4.5
  • OS: Linux (Ubuntu 24.04)
  • Provider: openai (api: openai-responses)
  • Model: gpt-5.4

Description

Isolated cron sessions with openai/gpt-5.4 produce zero reasoning tokens. OC does not send reasoning.effort to the OpenAI Responses API, despite the session having thinkingLevel: high and model params having reasoning_effort: "high".

Direct API call works. Calling the OpenAI Responses API directly (bypassing OC) with reasoning.effort: "high" returns 90 reasoning tokens. The model supports it. OC just isn't sending it.

Mini models work. openai-mini/gpt-5.1-codex-mini in the same session type, same gateway, correctly receives reasoning_effort and returns 15,000+ reasoning tokens.

Reproduction

# 1. Configure model params:
# agents.defaults.models.openai/gpt-5.4 = {"params": {"reasoning_effort": "high"}}
# agents.defaults.thinkingDefault = "medium"

# 2. Schedule isolated cron job:
openclaw cron add --name test-reasoning --at 1m --delete-after-run \
  --session isolated --model openai/gpt-5.4 --thinking high \
  --no-deliver --message "What is 2+2? Show reasoning."

# 3. After job completes, check session JSONL:
# - thinkingLevel: "high" is set correctly in session header
# - Assistant response has ZERO type:"thinking" content blocks
# - Usage shows total_tokens = input_tokens (no reasoning overhead)

# 4. For comparison, same test with mini:
openclaw cron add --name test-mini --at 1m --delete-after-run \
  --session isolated --model openai-mini/gpt-5.1-codex-mini --thinking medium \
  --no-deliver --message "What is 2+2? Show reasoning."
# Result: 15,000+ reasoning tokens, multiple thinking blocks

Direct API verification

Calling the OpenAI Responses API directly from the same server, same API key:

payload = {
    "model": "gpt-5.4",
    "input": [{"role": "user", "content": "What is 2+2? Think step by step."}],
    "reasoning": {"effort": "high"}
}
# Result: 90 reasoning tokens, reasoning output item present

This confirms the OpenAI API supports reasoning for gpt-5.4. The issue is that OC does not forward the reasoning configuration to the API.

Session evidence

Session JSONL shows:

{"type": "thinking_level_change", "thinkingLevel": "high"}
{"type": "custom", "customType": "model-snapshot", "data": {"provider": "openai", "modelApi": "openai-responses", "modelId": "gpt-5.4"}}

But the assistant response contains only type: "text" blocks, no type: "thinking" blocks.

What we tested (all failed for gpt-5.4)

  • Different providers (openai, openai-mini): no effect
  • Removing store: true from params: no effect
  • Setting compat.supportsStore: false on model: no effect
  • Changing thinkingDefault from adaptive to medium: no effect
  • All combinations of the above: no effect

The only model that works is gpt-5.1-codex-mini. All full GPT-5 models (gpt-5.4, gpt-5.3-codex) fail regardless of provider or configuration.

Expected behavior

OC should forward reasoning.effort to the OpenAI Responses API when thinkingLevel is set and the model has reasoning: true.

Possibly related

  • #57268 — gpt-5.4-pro fails with thinking level 'none' (retry to medium fails silently)
  • #6820 — gpt-5.4 missing from xhigh thinking whitelist
  • #13159 — Model override ignored in isolated sessions
  • #33272 — reasoning_effort injection for custom providers

extent analysis

TL;DR

The issue can be resolved by ensuring that the OpenClaw (OC) configuration correctly forwards the reasoning.effort parameter to the OpenAI Responses API for the gpt-5.4 model.

Guidance

  1. Verify Model Configuration: Confirm that the reasoning_effort parameter is correctly set to "high" in the model parameters for gpt-5.4.
  2. Check OpenClaw Configuration: Ensure that OpenClaw is configured to forward the reasoning.effort parameter to the OpenAI Responses API. This might involve checking the OpenClaw documentation or configuration files for any settings related to reasoning effort or thinking level.
  3. Test with Different Models: Continue testing with different models, including gpt-5.1-codex-mini, to isolate if the issue is specific to gpt-5.4 or a broader problem with how OpenClaw handles reasoning effort.
  4. Review Related Issues: Examine the possibly related issues (#57268, #6820, #13159, #33272) to see if any of them might be contributing to the current problem, especially those related to gpt-5.4 and reasoning effort.

Example

No specific code example is provided as the issue seems to be related to configuration rather than code. However, ensuring that the model parameters are correctly set, as shown in the reproduction steps, is crucial:

payload = {
    "model": "gpt-5.4",
    "input": [{"role": "user", "content": "What is 2+2? Think step by step."}],
    "reasoning": {"effort": "high"}
}

Notes

The issue appears to be specific to how OpenClaw interacts with the OpenAI Responses API for certain models, particularly gpt-5.4. The fact that direct API calls work and that gpt-5.1-codex-mini works as expected suggests a configuration or compatibility issue rather than a problem with the OpenAI API itself.

Recommendation

Apply a workaround by manually configuring or patching OpenClaw to correctly forward the reasoning.effort parameter for the gpt-5.4 model, if possible, until a formal fix is available. This might involve modifying configuration files or, if the issue is due to a bug, waiting for an update to OpenClaw that addresses the problem.

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

OC should forward reasoning.effort to the OpenAI Responses API when thinkingLevel is set and the model has reasoning: true.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING