From da9c8671fe6d1f6458b0f1182e1f3de1ff6a6cc6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 8 Jun 2026 21:22:30 +0800 Subject: [PATCH] fix: keep ruxa image modelId from configuration without remap --- lib/ai/model-runtime.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/ai/model-runtime.ts b/lib/ai/model-runtime.ts index 69d4bcef9..374105cf0 100644 --- a/lib/ai/model-runtime.ts +++ b/lib/ai/model-runtime.ts @@ -8,15 +8,6 @@ interface ResolveModelRuntimeIdOptions { providerType?: string | null; } -function fallbackRuxaRuntimeId(modelId: string) { - if (!modelId.startsWith("google/")) { - return modelId; - } - - const candidate = modelId.slice("google/".length).trim(); - return candidate || modelId; -} - function toRecord(value: unknown): Record | null { if (typeof value !== "object" || value === null || Array.isArray(value)) { return null; @@ -46,9 +37,5 @@ export function resolveModelRuntimeId( } const resolvedModelId = normalizeRuntimeModelId(model?.modelId) || ""; - if (options?.providerType === "ruxa-image") { - return fallbackRuxaRuntimeId(resolvedModelId); - } - return resolvedModelId; }