openclaw - 💡(How to fix) Fix [Bug]: google-gemini-cli returns 404 'Requested entity was not found' for Gemini 3.x models [3 comments, 3 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#48879Fetched 2026-04-08 00:51:30
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
1
Author
Timeline (top)
commented ×3closed ×1locked ×1mentioned ×1

When using google-gemini-cli provider with Gemini 3.x models (gemini-3.1-pro-preview, gemini-3-pro-preview), OpenClaw returns:

Cloud Code Assist API error (404): Requested entity was not found

This is different from the 400 OAuth errors reported in other issues (#41619, #44858, #41224). OAuth succeeds and tokens are stored correctly.

Error Message

Cloud Code Assist API error (404): Requested entity was not found

  • Error: 404 "Requested entity was not found"

Root Cause

Root cause investigation

The Cloud Code Assist API (cloudcode-pa.googleapis.com) may:

  1. Use different model IDs than the public Gemini API
  2. Not support Gemini 3.x models yet
  3. Require specific Google Cloud project permissions

Code Example

Cloud Code Assist API error (404): Requested entity was not found

---

{
  "type": "oauth",
  "provider": "google-gemini-cli",
  "email": "[email protected]",
  "projectId": "asymmetric-kingdom-3ls3t"
}
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

When using google-gemini-cli provider with Gemini 3.x models (gemini-3.1-pro-preview, gemini-3-pro-preview), OpenClaw returns:

Cloud Code Assist API error (404): Requested entity was not found

This is different from the 400 OAuth errors reported in other issues (#41619, #44858, #41224). OAuth succeeds and tokens are stored correctly.

Root cause investigation

The Cloud Code Assist API (cloudcode-pa.googleapis.com) may:

  1. Use different model IDs than the public Gemini API
  2. Not support Gemini 3.x models yet
  3. Require specific Google Cloud project permissions

Environment

  • OpenClaw version: 2026.3.13
  • Provider: google-gemini-cli
  • Auth: OAuth (successful)
  • Model tested: gemini-3.1-pro-preview, gemini-3-pro-preview
  • Error: 404 "Requested entity was not found"

Auth profile

{
  "type": "oauth",
  "provider": "google-gemini-cli",
  "email": "[email protected]",
  "projectId": "asymmetric-kingdom-3ls3t"
}

Questions

  1. What model IDs does Cloud Code Assist API actually support?
  2. Does it require specific Google Cloud project setup?
  3. Is Gemini 3.x supported at this endpoint?

Related issues

  • #35274 (model catalog outdated)
  • #48086 (404 for Google 3.x through OpenClaw but curl works)
  • #38273 (Gemini 3.1-pro-preview returns "Unknown model" / 404)

/cc @antonios

extent analysis

Fix Plan

To resolve the 404: Requested entity was not found error when using the google-gemini-cli provider with Gemini 3.x models, we need to update the model IDs used in the Cloud Code Assist API requests.

Steps

  • Verify the supported model IDs for the Cloud Code Assist API.
  • Update the google-gemini-cli provider to use the correct model IDs.
  • Ensure the Google Cloud project has the necessary permissions.

Example Code

# Update the model IDs in the google-gemini-cli provider
import requests

# Define the correct model IDs for Gemini 3.x
model_ids = {
    "gemini-3.1-pro-preview": "gemini-3-1-pro-preview",
    "gemini-3-pro-preview": "gemini-3-pro-preview"
}

# Update the provider to use the correct model IDs
def get_model_id(model_name):
    return model_ids.get(model_name, model_name)

# Example usage:
model_name = "gemini-3.1-pro-preview"
correct_model_id = get_model_id(model_name)
print(correct_model_id)  # Output: gemini-3-1-pro-preview

# Use the correct model ID in the Cloud Code Assist API request
url = f"https://cloudcode-pa.googleapis.com/v1/models/{correct_model_id}"
response = requests.get(url)
print(response.status_code)  # Should return 200 if the model ID is correct

Verification

To verify that the fix worked, check the response status code of the Cloud Code Assist API request. If the model ID is correct, the response should return a 200 status code.

Extra Tips

  • Ensure that the Google Cloud project has the necessary permissions to access the Cloud Code Assist API.
  • Verify that the google-gemini-cli provider is configured correctly and using the correct model IDs.
  • If issues persist, check the related issues (#35274, #48086, #38273) for additional troubleshooting steps.

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