openclaw - 💡(How to fix) Fix [Bug] reasoning_effort not sent for gpt-5.4 in isolated cron sessions [1 comments, 2 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#63369Fetched 2026-04-09 07:54:39
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Participants
Timeline (top)
commented ×1

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 fixed by ensuring that the reasoning.effort parameter is correctly forwarded to the OpenAI Responses API when using the openai/gpt-5.4 model with thinkingLevel set to high.

Guidance

  • Verify that the reasoning_effort parameter is correctly set in the model parameters and that the thinkingLevel is set to high in the session configuration.
  • Check the OpenAI Responses API documentation to ensure that the reasoning.effort parameter is supported for the gpt-5.4 model.
  • Compare the API request sent by OC with the direct API call that works, to identify any differences in the request payload or headers.
  • Test with other models, such as gpt-5.1-codex-mini, to see if the issue is specific to the gpt-5.4 model.

Example

No code example is provided as the issue seems to be related to the configuration and API request rather than a specific code snippet.

Notes

The issue may be related to a bug or misconfiguration in the OC code that handles the reasoning.effort parameter for the gpt-5.4 model. The fact that the direct API call works and the gpt-5.1-codex-mini model works suggests that the issue is specific to the gpt-5.4 model or the OC configuration.

Recommendation

Apply a workaround by modifying the OC configuration to correctly forward the reasoning.effort parameter to the OpenAI Responses API for the gpt-5.4 model. This may involve updating the model parameters or the session configuration to ensure that the reasoning.effort parameter is correctly set.

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