mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-08-03 15:39:48 +08:00
feat(baoyu-image-gen): default to GA Gemini image endpoints and sync docs
This commit is contained in:
@@ -142,7 +142,7 @@ default_aspect_ratio: '16:9'
|
||||
default_image_size: 2K
|
||||
default_image_api_dialect: ratio-metadata
|
||||
default_model:
|
||||
google: gemini-3-pro-image-preview
|
||||
google: gemini-3-pro-image
|
||||
openai: gpt-image-2
|
||||
zai: glm-image
|
||||
azure: image-prod
|
||||
@@ -174,7 +174,7 @@ batch:
|
||||
assert.equal(config.default_aspect_ratio, "16:9");
|
||||
assert.equal(config.default_image_size, "2K");
|
||||
assert.equal(config.default_image_api_dialect, "ratio-metadata");
|
||||
assert.equal(config.default_model?.google, "gemini-3-pro-image-preview");
|
||||
assert.equal(config.default_model?.google, "gemini-3-pro-image");
|
||||
assert.equal(config.default_model?.openai, "gpt-image-2");
|
||||
assert.equal(config.default_model?.zai, "glm-image");
|
||||
assert.equal(config.default_model?.azure, "image-prod");
|
||||
|
||||
@@ -126,8 +126,8 @@ Environment variables:
|
||||
JIMENG_SECRET_ACCESS_KEY Jimeng Secret Access Key
|
||||
ARK_API_KEY Seedream/Ark API key
|
||||
OPENAI_IMAGE_MODEL Default OpenAI model (gpt-image-2)
|
||||
OPENROUTER_IMAGE_MODEL Default OpenRouter model (google/gemini-3.1-flash-image-preview)
|
||||
GOOGLE_IMAGE_MODEL Default Google model (gemini-3-pro-image-preview)
|
||||
OPENROUTER_IMAGE_MODEL Default OpenRouter model (google/gemini-3.1-flash-image)
|
||||
GOOGLE_IMAGE_MODEL Default Google model (gemini-3-pro-image)
|
||||
DASHSCOPE_IMAGE_MODEL Default DashScope model (qwen-image-2.0-pro)
|
||||
ZAI_IMAGE_MODEL Default Z.AI model (glm-image)
|
||||
BIGMODEL_IMAGE_MODEL Backward-compatible alias for Z.AI model (glm-image)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user