fix(google): add gemini-3.5-flash model catalog entry (#94726)

* fix(google): add gemini-3.5-flash model catalog entry

gemini-3.5-flash was missing from the bundled Google model catalog,
causing it to silently fall back to DEFAULT_CONTEXT_TOKENS (200k)
instead of its documented 1,048,576-token input window.

Add the catalog entry and forward-compat routing so the model
resolves with the correct context window.

Closes: openclaw/openclaw#94723
Co-Authored-By: Claude <noreply@anthropic.com>

* chore: retry CI (flaky test)

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Zechen Wang 2026-06-23 02:28:01 +08:00 committed by GitHub
parent 1585ec54f1
commit 4d636335db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View file

@ -35,6 +35,15 @@ const GOOGLE_GEMINI_TEXT_MODELS: ModelDefinitionConfig[] = [
contextWindow: 1_048_576,
maxTokens: 65_536,
},
{
id: "gemini-3.5-flash",
name: "Gemini 3.5 Flash",
reasoning: true,
input: ["text", "image"],
cost: GOOGLE_GEMINI_COST,
contextWindow: 1_048_576,
maxTokens: 65_536,
},
{
id: "gemini-3.1-pro-preview",
name: "Gemini 3.1 Pro Preview",

View file

@ -17,6 +17,7 @@ const GEMINI_3_1_FLASH_LITE_PREFIX = "gemini-3.1-flash-lite";
const GEMINI_3_1_FLASH_PREFIX = "gemini-3.1-flash";
const GEMINI_3_FLASH_LITE_PREFIX = "gemini-3-flash-lite";
const GEMINI_3_FLASH_PREFIX = "gemini-3-flash";
const GEMINI_3_5_FLASH_PREFIX = "gemini-3.5-flash";
const GEMINI_PRO_LATEST_ID = "gemini-pro-latest";
const GEMINI_FLASH_LATEST_ID = "gemini-flash-latest";
const GEMINI_FLASH_LITE_LATEST_ID = "gemini-flash-lite-latest";
@ -188,6 +189,7 @@ export function resolveGoogleGeminiForwardCompatModel(params: {
};
} else if (
lower.startsWith(GEMINI_3_1_FLASH_PREFIX) ||
lower.startsWith(GEMINI_3_5_FLASH_PREFIX) ||
lower.startsWith(GEMINI_3_FLASH_PREFIX) ||
lower === GEMINI_FLASH_LATEST_ID
) {