diff --git a/src/proxy/google-ai.ts b/src/proxy/google-ai.ts index eb2b26e..c0ed6d5 100644 --- a/src/proxy/google-ai.ts +++ b/src/proxy/google-ai.ts @@ -42,9 +42,11 @@ const getModelsResponse = () => { const modelIds = Array.from( new Set(keys.map((k) => k.modelIds).flat()) ).filter((id) => id.startsWith("models/") && !id.includes("bard")); - + + // Strip "models/" prefix from IDs before creating model objects const models = modelIds.map((id) => ({ - id, + // Strip "models/" prefix from ID for consistency with request processing + id: id.startsWith("models/") ? id.slice("models/".length) : id, object: "model", created: new Date().getTime(), owned_by: "google",