mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-29 02:03:36 +00:00
* fix(google): add gemini-3.1-flash-lite to provider catalog Adds the missing gemini-3.1-flash-lite model definition to the GOOGLE_GEMINI_TEXT_MODELS array. This resolves the ProviderFailoverError when configuring google-vertex/gemini-3.1-flash-lite. Fixes #89390 * test(google): cover Gemini flash lite catalog row --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
buildGoogleStaticCatalogProvider,
|
|
buildGoogleVertexStaticCatalogProvider,
|
|
} from "./provider-catalog.js";
|
|
|
|
describe("google provider catalog", () => {
|
|
it("registers current Gemini rows for the Google Vertex provider", () => {
|
|
const provider = buildGoogleVertexStaticCatalogProvider();
|
|
|
|
expect(provider.api).toBe("google-vertex");
|
|
expect(provider.baseUrl).toBe("https://{location}-aiplatform.googleapis.com");
|
|
expect(provider.models.map((model) => model.id)).toEqual(
|
|
expect.arrayContaining(["gemini-2.5-pro", "gemini-3.1-pro-preview", "gemini-3.1-flash-lite"]),
|
|
);
|
|
expect(provider.models.find((model) => model.id === "gemini-3.1-flash-lite")).toMatchObject({
|
|
contextWindow: 1_048_576,
|
|
maxTokens: 65_536,
|
|
reasoning: true,
|
|
});
|
|
});
|
|
|
|
it("keeps Google AI Studio and Vertex model ids aligned", () => {
|
|
expect(buildGoogleVertexStaticCatalogProvider().models.map((model) => model.id)).toEqual(
|
|
buildGoogleStaticCatalogProvider().models.map((model) => model.id),
|
|
);
|
|
});
|
|
});
|