openclaw - 💡(How to fix) Fix [Bug]: Google Generative AI API 404 - gemini-3.1-flash-lite-preview model is no longer available

Official PRs (…)
ON THIS PAGE

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…

The gemini-3.1-flash-lite-preview model has been removed/deprecated by Google, causing a 404 error when OpenClaw attempts to use it.

Error Message

00:41:04+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_failover_decision","tags":["error_handling","failover","assistant","fallback_model"],"runId":"21531a1f-8deb-4875-ae00-bff49638207d","stage":"assistant","decision":"fallback_model","failoverReason":"model_not_found","profileFailureReason":"model_not_found","provider":"google","model":"gemini-3.1-flash-lite-preview","sourceProvider":"google","sourceModel":"gemini-3.1-flash-lite-preview","profileId":"sha256:a94403a4f9d0","fallbackConfigured":true,"timedOut":false,"aborted":false,"status":404,"rawErrorPreview":"Google Generative AI API error (404): This model models/gemini-3.1-flash-lite-preview is no longer available. Please update your code to use a newer model for the latest features and improvements. [code=NOT_FOUND]","rawErrorHash":"sha256:6488e3b50ed5","providerRuntimeFailureKind":"unclassified"} embedded run failover decision

00:41:04+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=37386 error="FailoverError: Google Generative AI API error (404): This model models/gemini-3.1-flash-lite-preview is no longer available. Please update your code to use a newer model for the latest features and improvements. [code=NOT_FOUND]"

Root Cause

The gemini-3.1-flash-lite-preview model has been removed/deprecated by Google, causing a 404 error when OpenClaw attempts to use it.

Code Example

00:41:04+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_failover_decision","tags":["error_handling","failover","assistant","fallback_model"],"runId":"21531a1f-8deb-4875-ae00-bff49638207d","stage":"assistant","decision":"fallback_model","failoverReason":"model_not_found","profileFailureReason":"model_not_found","provider":"google","model":"gemini-3.1-flash-lite-preview","sourceProvider":"google","sourceModel":"gemini-3.1-flash-lite-preview","profileId":"sha256:a94403a4f9d0","fallbackConfigured":true,"timedOut":false,"aborted":false,"status":404,"rawErrorPreview":"Google Generative AI API error (404): This model models/gemini-3.1-flash-lite-preview is no longer available. Please update your code to use a newer model for the latest features and improvements. [code=NOT_FOUND]","rawErrorHash":"sha256:6488e3b50ed5","providerRuntimeFailureKind":"unclassified"} embedded run failover decision

00:41:04+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=37386 error="FailoverError: Google Generative AI API error (404): This model models/gemini-3.1-flash-lite-preview is no longer available. Please update your code to use a newer model for the latest features and improvements. [code=NOT_FOUND]"
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

The gemini-3.1-flash-lite-preview model has been removed/deprecated by Google, causing a 404 error when OpenClaw attempts to use it.

Steps to reproduce

  1. Configure OpenClaw to use google/gemini-3.1-flash-lite-preview as the primary model.
  2. Run any command (e.g., openclaw ask "hello").
  3. Observe the failover warning and the final task error in the logs.

Expected behavior

The agent should connect to a valid model or the configuration should be updated to a non-preview, stable version.

Actual behavior

The API returns a 404 Not Found with the message: Google Generative AI API error (404): This model models/gemini-3.1-flash-lite-preview is no longer available. Please update your code to use a newer model for the latest features and improvements.

OpenClaw version

2026.5.22

Operating system

Zorin OS / Ubuntu 22.04

Install method

node install npm

Model

google/gemini-3.1-flash-lite-preview

Provider / routing chain

openclaw -> google

Additional provider/model setup details

The model is configured as the default alias gemini-flash-lite in the local environment.

Logs, screenshots, and evidence

00:41:04+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_failover_decision","tags":["error_handling","failover","assistant","fallback_model"],"runId":"21531a1f-8deb-4875-ae00-bff49638207d","stage":"assistant","decision":"fallback_model","failoverReason":"model_not_found","profileFailureReason":"model_not_found","provider":"google","model":"gemini-3.1-flash-lite-preview","sourceProvider":"google","sourceModel":"gemini-3.1-flash-lite-preview","profileId":"sha256:a94403a4f9d0","fallbackConfigured":true,"timedOut":false,"aborted":false,"status":404,"rawErrorPreview":"Google Generative AI API error (404): This model models/gemini-3.1-flash-lite-preview is no longer available. Please update your code to use a newer model for the latest features and improvements. [code=NOT_FOUND]","rawErrorHash":"sha256:6488e3b50ed5","providerRuntimeFailureKind":"unclassified"} embedded run failover decision

00:41:04+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=37386 error="FailoverError: Google Generative AI API error (404): This model models/gemini-3.1-flash-lite-preview is no longer available. Please update your code to use a newer model for the latest features and improvements. [code=NOT_FOUND]"

Impact and severity

High. The primary model is unusable. Although failover works, it introduces latency and depends on the availability of fallback models. New users following documentation or templates referencing this preview model will face immediate failure.

Additional information

Google has replaced preview models with stable versions. The internal mapping in OpenClaw should be updated to gemini-2.5-flash or gemini-2.5-flash-lite

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 agent should connect to a valid model or the configuration should be updated to a non-preview, stable version.

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]: Google Generative AI API 404 - gemini-3.1-flash-lite-preview model is no longer available