#Gemini-3.1-flash-lite-preview model

1 messages · Page 1 of 1 (latest)

spare loom
#

Do I need to wait for new openclaw release to use gemini-3.1-flash-lite-preview model ?

zenith orbitBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

wheat jackalBOT
#

You usually don’t have to “wait for a release” for a Google-side new Gemini model — but you might need a newer OpenClaw version (or a one-line custom model entry) so OpenClaw doesn’t reject it as Unknown model.

What to do:

  1. Check your version + provider
openclaw --version
openclaw models status

If you paste those (especially the provider you’re using: google vs google-gemini-cli vs google-antigravity) I can tell you the exact path.

  1. If you get “Unknown model …”:
#

If you reply with the output of openclaw --version and the exact error (if any), I’ll tell you whether an update is required in your case or if a quick models.json entry is enough.

spare loom
#

try to use google/gemini-3.1-flash-lite-preview but get "Unknown model.." error

wheat jackalBOT
#

Unknown model means OpenClaw’s local model registry (the models.json catalog it builds) doesn’t currently have an entry for google/gemini-3.1-flash-lite-preview — so it refuses to route to it even if Google would accept the ID.

Fix options (pick one):

Option A: upgrade (fastest to try)

First check:

openclaw --version

If you’re not on a recent build, update to latest stable/beta/dev and restart the gateway:

openclaw update
openclaw gateway restart

Then try again.

Option B (no waiting): use the Gemini CLI provider instead of google

#

If you’re OK with Gemini CLI OAuth, OpenClaw has forward-compat for gemini-3.1-flash* IDs on the google-gemini-cli provider, so this often “just works”:

  • use google-gemini-cli/gemini-3.1-flash-lite-preview (instead of google/...)

(Setup is covered here: https://docs.openclaw.ai/help/faq#how-do-i-set-up-gemini-cli-oauth)

Option C (works even if Google adds the model before OpenClaw): add a custom model entry

You can add the model to your registry by cloning the existing gemini-3.1-flash-preview entry and changing just the id/name.

  1. Dump the full google catalog:
openclaw models list --provider google --all --json
  1. Copy the JSON object for gemini-3.1-flash-preview, paste it into your config under:
    models.providers.google.models, change:
  • id: "gemini-3.1-flash-lite-preview"
  • name: "...(whatever you want)"
#
  1. Restart:
openclaw gateway restart

If you paste your openclaw --version + which auth method you’re using (google API key vs google-gemini-cli), I’ll tell you which option is the cleanest for your setup.

waxen birch
#

openclaw models list --provider google --all --json does not list google/gemini-3.1-flash-lite-preview

wheat jackalBOT
#

Yep — if models list --provider google --all --json doesn’t show it, then it’s not in OpenClaw’s bundled Google catalog yet, so out of the box you can’t select google/gemini-3.1-flash-lite-preview (you’ll hit Unknown model).

You’ve got two paths:

1) Wait for a new OpenClaw release

A release that bumps the upstream model catalog will make it appear automatically.

2) Use it now by registering it yourself (works today)

Add it as a custom model definition under the google provider, by cloning the existing gemini-3.1-flash-preview entry (so you don’t have to guess context window / max tokens / etc).

High level steps:

  1. Get the full JSON definition of the closest model:
openclaw models list --provider google --all --json

Find the object where id is gemini-3.1-flash-preview.

#
  1. In ~/.openclaw/openclaw.json (JSON5), add a new model entry under:
    models.providers.google.models
    Paste the whole gemini-3.1-flash-preview object, then change:
  • id → gemini-3.1-flash-lite-preview
  • name → whatever label you want
  1. Restart:
openclaw gateway restart
  1. Then select it:
  • /model google/gemini-3.1-flash-lite-preview (or set it as your default)

If you paste the gemini-3.1-flash-preview JSON object here (from the --json output), I can tell you exactly what to duplicate/change so it’s copy/paste-safe.

waxen birch
#

I think this might work for google.models:
[ {
"key": "google/gemini-3.1-flash-lite",
"name": "Gemini 3.1 Flash Lite",
"input": "text+image",
"contextWindow": 1048576,
"local": false,
"available": true,
"tags": [],
"missing": false
}]
What I need to know are the other values for models.providers.google like baseUrl and api?

wheat jackalBOT
#

That openclaw models list … --json output is a summary format (it uses key, input: "text+image", etc.) — it’s not the same schema as models.providers.* in openclaw.json.

For models.providers.google, the values you’re looking for are:

  • baseUrl: https://generativelanguage.googleapis.com/v1beta
  • api: google-generative-ai

You can usually omit apiKey there if you already have GEMINI_API_KEY in env / auth profiles, but you cannot omit baseUrl if you’re defining models.providers.google (the config schema requires it).

A minimal working config (JSON5) looks like:

{
models: {
providers: {
google: {
#
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
api: "google-generative-ai",
// apiKey: "${GEMINI_API_KEY}", // optional if already set via env/auth
models: [
{
id: "gemini-3.1-flash-lite-preview",
name: "Gemini 3.1 Flash Lite (preview)",
input: ["text", "image"], // (optional but recommended)
contextWindow: 1048576, // what you found
// maxTokens: <optional> // if omitted, OpenClaw falls back to defaults
},
],
},
},
},