#Title: Gemini 2.0 Flash-Lite returning 404 "not available to new users" — but key has access?

1 messages · Page 1 of 1 (latest)

sage marsh
#

Hi all — I'm running OpenClaw 2026.3.2 on a Mac Mini and trying to use Google Gemini as my primary model. My API key is from Google AI Studio and I've confirmed it has access to gemini-2.0-flash-lite and gemini-2.0-flash (verified via curl against the models endpoint — both appear in the response).

However, every request OpenClaw makes to Google fails with:

error: LLM error: { code: 404, message: "This model models/gemini-2.0-flash-lite is no longer available to new users. Please update your code to use a newer model", status: NOT_FOUND }

My openclaw.json config:

"model": {
  "primary": "google/gemini-2.0-flash-lite",
  "fallbacks": ["openai/gpt-4o-mini"]
}

I've also tried google/gemini-2.0-flash — same error.

GPT-4o-mini fallback works fine, so auth is configured correctly for OpenAI. Google auth is set up in auth-profiles.json with google:default profile.

Questions:

  1. Is there a specific model string format OpenClaw expects for Google/Gemini models?
  2. Does OpenClaw use the native Google API endpoint or an OpenAI-compatible wrapper for Google models?
  3. Any known issues with AI Studio keys vs Google Cloud keys?

Thanks!

spice pollenBOT
#
  1. Model string format
  • Yep: OpenClaw expects provider/model.
  • For Gemini API-key usage the provider is google, so google/gemini-2.0-flash-lite is already in the right shape (OpenClaw will send it to Google as models/<id> internally).
  • Docs: https://docs.openclaw.ai/concepts/model-providers (see “Google Gemini (API key)”)
  1. Native Google endpoint vs OpenAI-compatible wrapper
  • Native Google Gemini / Generative Language API, not an OpenAI-compatible shim, when you use provider google.
  • If you want an OpenAI-compatible wrapper, that’s typically done via a proxy provider (e.g. LiteLLM / Vercel AI Gateway) configured under models.providers, but that’s a separate setup from google.
  • Docs: https://docs.openclaw.ai/concepts/model-providers
  1. AI Studio keys vs Google Cloud/Vertex
  • google provider = Gemini API key (AI Studio style), wired via GEMINI_API_KEY (with GOOGLE_API_KEY as a fallback in the rotation logic).
  • If you’re using Vertex, that’s a different provider (google-vertex) and uses gcloud ADC / service creds, not the same “Gemini API key” flow.
  • Docs: https://docs.openclaw.ai/concepts/model-providers

#

About the specific 404 (“no longer available to new users”)

That message is coming from Google, and it usually means exactly what it says: the model ID exists, may even show up in models:list, but generation calls are blocked for keys/projects that Google considers “new”.

Two practical next steps:

  • Reproduce outside OpenClaw: try a :generateContent curl against the same model with the same key. If it returns the same 404, it’s definitively a Google-side availability/entitlement issue (not OpenClaw).
  • Switch to a currently-allowed Gemini model: OpenClaw’s built-in shortcuts currently point at newer Gemini options (/model gemini or /model gemini-flash). (These map to Gemini 3 preview models in the FAQ.)

If you paste openclaw models status output (it redacts secrets), I can sanity-check that OpenClaw is actually picking the Google auth profile/key you think it is.

lapis goblet
#

Hi, @sage marsh
it looks like a model lifecycle issue.

#

not a auth error.

spice pollenBOT
#

Yep, agreed — that 404 string is coming straight from Google’s Gemini API and usually means the model is effectively deprecated/blocked for your key/project, even if it still shows up in models:list.

A couple clarifications for yp_claw:

  • Model ref format in OpenClaw is correct: google/<modelId> (no models/ prefix in config).
  • Provider google uses the native Gemini API (Generative Language API), not an OpenAI-compatible wrapper.
  • AI Studio key is the right kind of key for google (env name: GEMINI_API_KEY). If you want Vertex, that’s google-vertex with ADC/service creds.

If you want to prove it’s not OpenClaw: hit the generate endpoint with curl (not just models:list). If :generateContent returns the same “no longer available to new users” message, it’s 100% lifecycle/entitlement.

Workaround is simply: switch to a newer Gemini model (in OpenClaw you can use /model gemini or /model gemini-flash, which the FAQ maps to current Gemini 3 preview defaults):
https://docs.openclaw.ai/help/faq and https://docs.openclaw.ai/concepts/model-providers

#

Yep — agreed. That specific 404 (“model … no longer available to new users”) is Google rejecting the model, not an OpenClaw auth/profile problem.

At this point the actionable path is:

  • Switch to a newer Gemini model in OpenClaw (quickest: /model gemini or /model gemini-flash), or set your default to the newer google/... model those aliases map to.
  • If you want to double-check outside OpenClaw, run a curl against :generateContent for gemini-2.0-flash(-lite) with the same key — you should see the same 404.

Docs refs:

If switching models fixes it, ask the thread starter to mark the solution so Answer Overflow picks it up.

lapis goblet
#

plz try updating yr openclaw cfg to a currently supported model with these:

"model": { "primary": "google/gemini-2.5-flash-lite", "fallbacks": ["openai/gpt-4o-mini"] }

or

"model": { "primary": "google/gemini-2.5-flash", "fallbacks": ["openai/gpt-4o-mini"] }

spice pollenBOT
#

Worth a try, but I’d be a bit cautious with copy/pasting specific Gemini 2.5 IDs into config unless you’ve confirmed they work with :generateContent for your key — Google’s model names/availability shift a lot, and models:list isn’t a guarantee the model is callable.

The lowest-friction way in OpenClaw is:

  • In chat: /model gemini or /model gemini-flash (these are built-in aliases that track the currently-shipped Google defaults).
    Docs: https://docs.openclaw.ai/help/faq (see the “gemini / gemini-flash” alias section)

And small config nit (to avoid confusion for the thread starter):

If the thread starter really wants to stay on Gemini 2.x specifically, the key question is whether Google will let that key call it; the 404 message strongly suggests “no” regardless of client.

lapis goblet
#

that is simple trying, It remains to be seen what other syndromes will arise.

spice pollenBOT
#

Yep — totally fair.

If they try /model gemini or /model gemini-flash and it still blows up, the next two things that usually make it obvious what is happening are:

  1. openclaw models status (shows which provider + which auth profile/key is actually being selected)
  2. a short log tail around the failure (openclaw logs --follow then reproduce once, paste ~20 lines)

If switching to a newer Gemini model fixes it, have them mark the solution in the thread so it gets indexed on Answer Overflow.

lapis goblet
#

thx, @spice pollen
that's maybe work, but your suggestion is a little weak.

yr suggestion to try /model gemini or /model gemini-flash may be misleading because those are alias names, not guaranteed official gemini model id. Depending on the OpenClaw version, these aliases may resolve to deprecated models like gemini-2.0-flash, which Google no longer allows new users to access.

because of that, testing with aliases does not clearly confirm whether the issue is fixed. It's more reliable to use an explicit current model name, such as google/gemini-2.5-flash or google/gemini-2.5-flash-lite. this directly verifies whether the failure is caused by a deprecated Gemini model.

spice pollenBOT
#

Aliases aren’t “magic” or ambiguous in OpenClaw — they’re just shorthands that resolve to an explicit provider/model, and you can always see the exact resolved target immediately:

  • After /model gemini (or any /model ...), run /model status → it will show the resolved model ID and the auth profile being used.
  • From the CLI you can also do openclaw models aliases list to see what gemini / gemini-flash expand to.

Also, at least in the current docs, those built-ins do not point at Gemini 2.0:

  • geminigoogle/gemini-3-pro-preview
  • gemini-flashgoogle/gemini-3-flash-preview
    Source: https://docs.openclaw.ai/help/faq (Models → “Are opus / sonnet / gpt builtin shortcuts?”)

So trying the aliases + checking /model status is a clean test: it’s effectively the same as typing the full explicit model ref, just less error-prone.

Re: “use an explicit current model like gemini-2.5-*”: totally fine if you’ve verified that exact ID is callable for your key with :generateContent — I just don’t want to assert specific Google model IDs in-thread because Google keeps changing what’s available per key/project/region, and the wrong guess wastes people’s time. The reliable method is: pick a candidate → verify with :generateContent → set it (either explicitly or via alias).

lapis goblet
#

ok, did you try with that cfg, @sage marsh ?

spice pollenBOT
#

I can’t run-test that exact config (I don’t have your Gemini API key / project entitlements), so I can’t truthfully say “yep, confirmed working”.

But you can make it deterministic in ~30 seconds on your side:

  1. Set it (either via alias or explicit):
  • /model gemini (or whatever explicit google/... you want)
  1. Immediately verify what it actually resolved to:
  • /model status → shows the exact provider/model + auth profile in use
  1. If it still fails, reproduce once and compare with curl against :generateContent for the same resolved model id. If curl gives the same 404, it’s Google lifecycle/entitlement, not OpenClaw.

If you paste the /model status output, we can sanity-check the resolved model + which google:* profile/key it’s pulling.

sage marsh
#

I have not tried yet ... was trying gemini-2.0-flash-lite because it's cheap. 2.5 is a bit expensive so I will just be uisng gpt 4o mini for now.