Skip to content

[Bug]: Gemini 3.1 series models not recognized in fallback routing #36111

@fenglanhua

Description

@fenglanhua

Bug type

Regression (worked before, now fails)

Summary

Gemini 3.1 Flash Lite (google/gemini-3.1-flash-lite-preview) works correctly when set as the primary model (API calls succeed, tokens are counted normally). However, when the same model is used in the fallbacks array, it fails with:
FailoverError: Unknown model: google/gemini-3.1-flash-lite-preview
The same issue also affects google/gemini-3.1-pro-preview — it shows "model not found" when used as a fallback.

Steps to reproduce

Add google/gemini-3.1-flash-lite-preview or google/gemini-3.1-pro-preview to the fallbacks array in agent config
Trigger a failover (e.g., primary model hits rate limit)
Observe the error in diagnostic logs

Expected behavior

Gemini 3.1 series models should be recognized and routed correctly in both primary and fallback contexts.

Actual behavior

Models work as primary but are rejected as "Unknown model" during failover. It seems the fallback routing logic references an internal model registry that hasn't been updated for the 3.1 series (released March 3, 2026).
Relevant Config
json"model": {
"primary": "google/gemini-3-flash-preview",
"fallbacks": [
"google/gemini-3.1-pro-preview",
"google/gemini-3.1-flash-lite-preview",
"anthropic/claude-haiku-4-5"
]
}

OpenClaw version

OpenClaw version: 2026.3.2 (85377a2)

Operating system

OS: Rocky Linux (Proxmox VM)

Install method

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions