openclaw - 💡(How to fix) Fix [Bug]: Upgrade to 2026.5.6 Broke Cloudflare AI Gateway

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…

I upgraded from 2026.4.22 to 2026.5.6. Cloudflare AI Gateway no longer works. When I attempt to chat with the bot I get this error in the chat:

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

This error shows up in the logs:

13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required" 13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required"

My provider config remains unchanged.

"providers": {
  "cloudflare-ai-gateway": {
    "baseUrl": "https://gateway.ai.cloudflare.com/v1/CG_ACCOUNT_ID/CF_AIG_ID/anthropic",
    "apiKey": "${ANTHROPIC_API_KEY}",
    "api": "anthropic-messages",
    "headers": {
      "cf-aig-authorization": "Bearer ${CF_AIG_TOKEN}"
    },

Error Message

I upgraded from 2026.4.22 to 2026.5.6. Cloudflare AI Gateway no longer works. When I attempt to chat with the bot I get this error in the chat: This error shows up in the logs: 13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required" 13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required" 3. Attempt to chat with bot, receive error.

Root Cause

I upgraded from 2026.4.22 to 2026.5.6. Cloudflare AI Gateway no longer works. When I attempt to chat with the bot I get this error in the chat:

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

This error shows up in the logs:

13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required" 13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required"

My provider config remains unchanged.

"providers": {
  "cloudflare-ai-gateway": {
    "baseUrl": "https://gateway.ai.cloudflare.com/v1/CG_ACCOUNT_ID/CF_AIG_ID/anthropic",
    "apiKey": "${ANTHROPIC_API_KEY}",
    "api": "anthropic-messages",
    "headers": {
      "cf-aig-authorization": "Bearer ${CF_AIG_TOKEN}"
    },

Fix Action

Fix / Workaround

  1. Start with Openclaw 2026.4.22.
  2. Upgrade to 2026.5.6.
  3. Attempt to chat with bot, receive error.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

I upgraded from 2026.4.22 to 2026.5.6. Cloudflare AI Gateway no longer works. When I attempt to chat with the bot I get this error in the chat:

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

This error shows up in the logs:

13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required" 13:43:06+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=1295 error="FailoverError: HTTP 401 authentication_error: x-api-key header is required"

My provider config remains unchanged.

"providers": {
  "cloudflare-ai-gateway": {
    "baseUrl": "https://gateway.ai.cloudflare.com/v1/CG_ACCOUNT_ID/CF_AIG_ID/anthropic",
    "apiKey": "${ANTHROPIC_API_KEY}",
    "api": "anthropic-messages",
    "headers": {
      "cf-aig-authorization": "Bearer ${CF_AIG_TOKEN}"
    },

Steps to reproduce

  1. Start with Openclaw 2026.4.22.
  2. Upgrade to 2026.5.6.
  3. Attempt to chat with bot, receive error.

Expected behavior

The bot should respond.

Actual behavior

The bot does not respond, errors appear in the logs.

OpenClaw version

2026.5.6

Operating system

Ubuntu 24.04 LTS

Install method

Bash one liner install

Model

cloudflare-ai-gateway/claude-sonnet-4-6

Provider / routing chain

openclaw -> cloudflare-ai-gateway -> claude-sonnet-4-6

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

High impact, provider is completely broken. Bot is unusable unless going direct to Anthropic API.

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

The bot should respond.

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]: Upgrade to 2026.5.6 Broke Cloudflare AI Gateway