feat(baoyu-image-gen): default to GA Gemini image endpoints and sync docs

This commit is contained in:
hypn4
2026-05-29 12:35:28 +09:00
parent d3d1a9f7cd
commit d79ebe4838
11 changed files with 35 additions and 32 deletions
@@ -16,7 +16,7 @@ const GOOGLE_IMAGEN_MODELS = [
];
export function getDefaultModel(): string {
return process.env.GOOGLE_IMAGE_MODEL || "gemini-3-pro-image-preview";
return process.env.GOOGLE_IMAGE_MODEL || "gemini-3-pro-image";
}
export function normalizeGoogleModelId(model: string): string {
@@ -2,7 +2,7 @@ import path from "node:path";
import { readFile } from "node:fs/promises";
import type { CliArgs } from "../types";
const DEFAULT_MODEL = "google/gemini-3.1-flash-image-preview";
const DEFAULT_MODEL = "google/gemini-3.1-flash-image";
const COMMON_ASPECT_RATIOS = [
"1:1",
"2:3",
@@ -67,7 +67,10 @@ function isTextAndImageModel(model: string): boolean {
function getSupportedAspectRatios(model: string): Set<string> {
const normalized = normalizeModelId(model);
if (normalized !== "google/gemini-3.1-flash-image-preview") {
if (
normalized !== "google/gemini-3.1-flash-image" &&
normalized !== "google/gemini-3.1-flash-image-preview"
) {
return new Set(COMMON_ASPECT_RATIOS);
}