strip models/

This commit is contained in:
reanon
2025-05-06 17:21:17 +02:00
parent f2b55ebabb
commit 1d6f3dbf10
+4 -2
View File
@@ -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",