-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug]: store: false is still sent in embedded agent runs despite compat.supportsStore: false, and custom headers are dropped #39086
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crash
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
When using Google AI Studio (Gemini) via an OpenAI-compatible endpoint (like Cloudflare AI Gateway), OpenClaw throws 400 Bad Request or 401 Unauthorized errors.
After deep debugging via a local proxy, I found two distinct issues in OpenClaw 2026.3.2 during embedded agent runs:
- The
storeparameter is still hardcoded: Even when explicitly configuring the model with"compat": { "supportsStore": false }, the embedded agent (agent/embedded) still injects"store": falseinto the JSON payload. This causes Gemini (and other strict compatible APIs) to reject the payload with a 400 error:Unknown name "store": Cannot find field. - Custom
headersare dropped: When routing traffic through Cloudflare AI Gateway, custom headers defined in the provider config (e.g.,"cf-aig-authorization": "...") are occasionally stripped or not passed through correctly by the underlyingopenai-completionsclient. This results in a401 Unauthorizederror from Cloudflare.
Steps to reproduce
- Configure an OpenAI-compatible provider pointing to Google AI Studio via Cloudflare AI Gateway.
- Add custom headers for Cloudflare auth (
cf-aig-authorization). - Set
"compat": { "supportsStore": false }on the models. - Run
openclaw agent --message "test". - Observe the agent fail with either
400 status code(due to thestorefield) or401 Unauthorized(due to missing headers).
Expected behavior
- The
compat.supportsStore: falsesetting should be strictly respected across all API calls (including embedded agent paths), completely omitting thestoreproperty from the payload. - Custom
headersdefined in the provider configuration should be reliably attached to every outbound HTTP request.
Actual behavior
Workaround Used
Currently, the only way to bypass this is by running a local Node.js proxy server that intercepts OpenClaw's requests, forcefully deletes store from the body, manually injects the missing cf-aig-authorization header, and then forwards the request to Cloudflare.
OpenClaw version
2026.3.2
Operating system
Linux
Install method
npm
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crash
Type
Fields
Give feedbackNo fields configured for issues without a type.