openclaw - 💡(How to fix) Fix [Bug]:OpenAI agents fail with "Invalid value: 'custom'" on tools param — v2026.5.27

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…

Version: openclaw 2026.5.27 (node v25.9.0)

Summary: Any agent configured to use an OpenAI model (gpt-4o-mini, gpt-5.4-mini) fails immediately when a message is received. No reply is sent. The gateway logs show:

"type": "invalid_request_error", "code": "unknown_parameter", "message": "Invalid value: 'custom'", "param": "tools"

Impact: All OpenAI-backed agents (sub-agents with their own OpenAI API keys) are completely broken. Workaround is switching to Anthropic models.

Workaround: Switch agent model to anthropic/claude-* — Anthropic tool definitions are not affected.

Suspected cause: OpenClaw is sending type: "custom" in tool definitions to the OpenAI API, which OpenAI does not recognize as a valid tool type.

Error Message

  1. Agent fails with the above error — no reply delivered

Root Cause

Version: openclaw 2026.5.27 (node v25.9.0)

Summary: Any agent configured to use an OpenAI model (gpt-4o-mini, gpt-5.4-mini) fails immediately when a message is received. No reply is sent. The gateway logs show:

"type": "invalid_request_error", "code": "unknown_parameter", "message": "Invalid value: 'custom'", "param": "tools"

Impact: All OpenAI-backed agents (sub-agents with their own OpenAI API keys) are completely broken. Workaround is switching to Anthropic models.

Workaround: Switch agent model to anthropic/claude-* — Anthropic tool definitions are not affected.

Suspected cause: OpenClaw is sending type: "custom" in tool definitions to the OpenAI API, which OpenAI does not recognize as a valid tool type.

Fix Action

Fix / Workaround

Impact: All OpenAI-backed agents (sub-agents with their own OpenAI API keys) are completely broken. Workaround is switching to Anthropic models.

Workaround: Switch agent model to anthropic/claude-* — Anthropic tool definitions are not affected.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Version: openclaw 2026.5.27 (node v25.9.0)

Summary: Any agent configured to use an OpenAI model (gpt-4o-mini, gpt-5.4-mini) fails immediately when a message is received. No reply is sent. The gateway logs show:

"type": "invalid_request_error", "code": "unknown_parameter", "message": "Invalid value: 'custom'", "param": "tools"

Impact: All OpenAI-backed agents (sub-agents with their own OpenAI API keys) are completely broken. Workaround is switching to Anthropic models.

Workaround: Switch agent model to anthropic/claude-* — Anthropic tool definitions are not affected.

Suspected cause: OpenClaw is sending type: "custom" in tool definitions to the OpenAI API, which OpenAI does not recognize as a valid tool type.

Steps to reproduce

Steps to reproduce:

  1. Configure a sub-agent with openai/gpt-4o-mini
  2. Send a message to that agent via Slack channel routing
  3. Agent fails with the above error — no reply delivered

Expected behavior

in 2026.5.26 was able to configure gpt4.0-mini

Actual behavior

fails to start the agent "type": "invalid_request_error", "code": "unknown_parameter", "message": "Invalid value: 'custom'", "param": "tools"

OpenClaw version

2026.5.27

Operating system

macOS 15.4

Install method

No response

Model

all gpt models

Provider / routing chain

OpenClaw channel routing → sub-agent (gpt-4o-mini) → OpenAI API

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

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

in 2026.5.26 was able to configure gpt4.0-mini

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 - 💡(How to fix) Fix [Bug]:OpenAI agents fail with "Invalid value: 'custom'" on tools param — v2026.5.27