openclaw - 💡(How to fix) Fix [Bug] 404 Model Not Found when spawning sub-agents with google/gemini-3.1-flash-lite-preview [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#71932Fetched 2026-04-27 05:37:13
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×1mentioned ×1subscribed ×1

Error Message

  • Description: Using google/gemini-3.1-flash-lite-preview works fine in the main session, but spawning sub-agents or resetting the session results in a 404 status code (no body) error.
RAW_BUFFERClick to expand / collapse
  • Description: Using google/gemini-3.1-flash-lite-preview works fine in the main session, but spawning sub-agents or resetting the session results in a 404 status code (no body) error.
  • Analysis: It appears the models/ prefix is missing in the actual request sent to the Google Generative AI API (v1beta), which requires the full resource name (e.g., models/gemini-3.1-flash-lite-preview).
  • Attempted Fix: I tried modifying provider-model-id-normalize.js to force the models/ prefix, but the issue persists, suggesting the prefix is stripped or overwritten in the transport layer.
  • Environment: Windows 10, OpenClaw v2026.4.23.

extent analysis

TL;DR

The issue may be resolved by ensuring the models/ prefix is correctly included in the request to the Google Generative AI API.

Guidance

  • Verify that the models/ prefix is being stripped or overwritten in the transport layer by inspecting the actual request sent to the API.
  • Check the OpenClaw v2026.4.23 documentation to see if there are any configuration options or settings that can be adjusted to preserve the models/ prefix.
  • Consider modifying the code to log or debug the request URL before it is sent to the API to confirm the prefix is being included.
  • Review the google/gemini-3.1-flash-lite-preview documentation to ensure that the models/ prefix is required for all API requests, including those from sub-agents or reset sessions.

Notes

The issue may be specific to the OpenClaw version or the Windows 10 environment, and further investigation may be needed to determine the root cause.

Recommendation

Apply a workaround to manually include the models/ prefix in the request URL, as the attempted fix in provider-model-id-normalize.js was unsuccessful.

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…

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] 404 Model Not Found when spawning sub-agents with google/gemini-3.1-flash-lite-preview [1 comments, 2 participants]