mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-08-07 17:33:03 +08:00
fix(baoyu-image-gen): narrow OpenRouter Gemini ratios
This commit is contained in:
@@ -45,7 +45,7 @@ export function getDefaultModel(): string {
|
||||
}
|
||||
|
||||
function normalizeModelId(model: string): string {
|
||||
return model.trim().toLowerCase();
|
||||
return model.trim().toLowerCase().split(":")[0]!;
|
||||
}
|
||||
|
||||
export function isGeminiImageModel(model: string): boolean {
|
||||
@@ -54,7 +54,8 @@ export function isGeminiImageModel(model: string): boolean {
|
||||
}
|
||||
|
||||
function getSupportedAspectRatios(model: string): Set<string> {
|
||||
if (!isGeminiImageModel(model)) {
|
||||
const normalized = normalizeModelId(model);
|
||||
if (normalized !== "google/gemini-3.1-flash-image-preview") {
|
||||
return new Set(COMMON_ASPECT_RATIOS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user