-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Windows] Image payload missing for google-generative-ai (SafeOpenError regression in v2026.3.2) #38809
Description
Description
In the latest stable version (v2026.3.2, build 85377a2) running on Windows 11 (10.0.26200, x64), images received from Telegram are silently discarded when routed to a model configured with the native google-generative-ai API adapter.
The same images work flawlessly when using the openai-completions adapter pointing to the exact same backend model and endpoint.
Steps to Reproduce
- Configure two providers in
openclaw.json:- Provider A:
api: "google-generative-ai"(native Gemini SDK,/v1beta) - Provider B:
api: "openai-completions"(OpenAI-compatible,/v1) - Both pointing to the same backend model (e.g.
gemini-3.1-pro)
- Provider A:
- Send an image via Telegram to the agent
- Switch the agent's model between Provider A and Provider B
Expected Behavior
Both adapters should include the image payload in the API request, and the model should describe/process the image.
Actual Behavior
- Provider B (
openai-completions): Image is included correctly. Model sees and describes the image. ✅ - Provider A (
google-generative-ai): Image payload is silently dropped. Model responds as if no image was sent, or says it cannot see any image. ❌
No error is logged. The image simply disappears from the request payload.
Likely Cause
This closely resembles a regression of the previously resolved #25878 (SafeOpenError — stat.dev vs lstat.dev returning 0 on Windows in fs-safe.ts / openVerifiedLocalFile()).
The native google-generative-ai adapter likely reads the file from disk via openVerifiedLocalFile(), which fails the path verification on Windows. The openai-completions adapter presumably uses a different code path (base64 inline or URL reference) that bypasses this check entirely.
Relevant source files:
src/fs-safe.ts(openVerifiedLocalFile)src/agents/pi-embedded-helpers/images.ts(sanitizeSessionMessagesImages)src/agents/tool-images.ts(sanitizeContentBlocksImages)
Environment
- OS: Windows 11 (10.0.26200, x64)
- OpenClaw: v2026.3.2 (build 85377a2)
- Node: v22.16.0
- Shell: PowerShell (pwsh)
- Channel: Telegram
- Related closed issue: Bug on Windows: async SafeOpen validation blocks all local media files for reasoning models due to stat.dev !== lstat.dev mismatch #25878
Workaround
Use openai-completions adapter instead of google-generative-ai for image-related tasks on Windows.