ClawKit Logo
ClawKitReliability Toolkit

Fix: Unknown model: google-gemini-cli/gemini-3.1-pro-preview in OpenClaw

TL;DR โ€” Quick Fix

Update your OpenClaw gateway binary to recognize the `gemini-3.1-pro-preview` model by adding it to the provider's model catalog.

Run Diagnostics

Next Step

Fix now, then reduce repeat incidents

If this issue keeps coming back, validate your setup in Doctor first, then harden your config.

Error Signal

Unknown model: google-gemini-cli/gemini-3.1-pro-preview

What's Happening

You're trying to use the new gemini-3.1-pro-preview model with the google-gemini-cli provider in OpenClaw, but it's not recognized. The error message Unknown model: google-gemini-cli/gemini-3.1-pro-preview means OpenClaw's gateway doesn't know about this specific model variant.

The Fix

As identified by the community and implemented in a PR, you need to add gemini-3.1-pro-preview to the provider's model catalog. If you're using a recent version of OpenClaw where this fix is merged, it should work out of the box. If you're on an older version or building from source, ensure this model ID is present in the relevant provider configuration within the gateway binary.

For users needing a quick workaround on [email protected] (API route, no OAuth):

  1. Set your GEMINI_API_KEY environment variable.
  2. Ensure google/gemini-3.1-pro-preview is in your allowed models list.
  3. Configure the google-gemini-cli provider in openclaw.json (or equivalent) with:
    "providers": {
      "google-gemini-cli": {
        "baseUrl": "https://generativelanguage.googleapis.com/v1beta",
        "api": "google-generative-ai",
        "models": [
          "gemini-3.1-pro-preview"
        ]
      }
    }
    
  4. Restart your OpenClaw gateway.

Verify with openclaw models status --json --agent gemini.

Why This Occurs

The model catalog used by the google-gemini-cli provider was likely hardcoded in the gateway binary and didn't include the newly released gemini-3.1-pro-preview model. The provider checks against this internal catalog before attempting to call the Gemini API.

Prevention

Keep your OpenClaw installation updated to the latest release. When new models are launched by providers like Google Gemini, ensure your OpenClaw version has them integrated into the provider's model catalog. Watch for release notes and community discussions on new model support.

Also, be mindful of name normalization. Users might try aliases like gemini31 or gemini-3.1pro. Ensure your provider configuration and any custom routing logic can correctly map these to the canonical model ID (gemini-3.1-pro-preview).


Last Updated: March 2026

Did this guide solve your problem?