diff --git a/data/models.json b/data/models.json index e5e9520..8af10d0 100644 --- a/data/models.json +++ b/data/models.json @@ -15,7 +15,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://flux2.default.bentoml.dev", "isLive": true, "isNew": false, "isTrending": true @@ -37,7 +36,6 @@ "input": "1", "output": "1" }, - "endpoint_url": "https://smollm.default.bentoml.dev", "isLive": true, "isNew": false, "isTrending": false @@ -62,7 +60,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://glm-5.api.modular.com", "isLive": false, "isNew": false, "isTrending": true @@ -88,7 +85,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://kimi-k2-5.api.modular.com", "isLive": false, "isNew": false, "isTrending": true @@ -113,7 +109,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://minimax-m2-5.api.modular.com", "isLive": false, "isNew": false, "isTrending": true @@ -138,7 +133,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://deepseek-v3-2.api.modular.com", "isLive": false, "isNew": false, "isTrending": true @@ -164,7 +158,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-5-397b-a17b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -189,7 +182,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-235b-a22b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -214,7 +206,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://deepseek-v3-1.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -241,7 +232,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://glm-4-7.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -266,7 +256,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://deepseek-r1-0528.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -292,7 +281,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://llama-4-maverick.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -318,7 +306,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://mistral-large-3.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -343,7 +330,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://mimo-v2-flash.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -368,7 +354,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-coder-480b-a35b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -393,7 +378,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://gpt-oss-120b.api.modular.com", "isLive": false, "isNew": false, "isTrending": true @@ -418,7 +402,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://llama-3-1-405b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -444,7 +427,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://llama-4-scout.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -469,7 +451,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://deepseek-r1.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -494,7 +475,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-30b-a3b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -519,7 +499,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://exaone-4-0-32b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -546,7 +525,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-omni-30b-a3b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -572,7 +550,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://ministral-14b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -597,7 +574,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://gpt-oss-20b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -623,7 +599,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://gemma-3-12b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -648,7 +623,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://phi-4.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -673,7 +647,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://nemotron-3-nano.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -698,7 +671,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://llama-3-3-70b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -723,7 +695,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen2-5-72b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -749,7 +720,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://mistral-small-3-1-24b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -775,7 +745,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://gemma-3-27b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -800,7 +769,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://deepseek-r1-distill-llama-70b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -826,7 +794,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-vl-30b-a3b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -852,7 +819,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-vl-8b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false @@ -878,7 +844,6 @@ "input": "0", "output": "0" }, - "endpoint_url": "https://qwen3-vl-4b.api.modular.com", "isLive": false, "isNew": false, "isTrending": false diff --git a/scripts/fetch-models.js b/scripts/fetch-models.js index c1bbf0a..fe028f3 100644 --- a/scripts/fetch-models.js +++ b/scripts/fetch-models.js @@ -11,7 +11,6 @@ if (!MODULAR_CLOUD_API_TOKEN || !MODULAR_CLOUD_ORG || !MODULAR_CLOUD_BASE_URL) { process.exit(1); } -const API_DOMAIN = 'api.modular.com'; const JSDELIVR_BASE = 'https://cdn.jsdelivr.net/gh/modularml/modular-webflow@master/data/images'; const headers = { @@ -31,21 +30,6 @@ async function fetchModelGarden() { return listRes.json(); } -async function fetchEndpoint(gatewayUid) { - const res = await fetch(`${MODULAR_CLOUD_BASE_URL}/api/v1/endpoints/${gatewayUid}`, { headers }); - if (!res.ok) throw new Error(`HTTP ${res.status}`); - return res.json(); -} - -function toSubdomain(displayName) { - return displayName - .toLowerCase() - .replace(/[\s._]+/g, '-') - .replace(/[^a-z0-9-]/g, '') - .replace(/-+/g, '-') - .replace(/^-|-$/g, ''); -} - const MIME_TO_EXT = { 'image/png': '.png', 'image/svg+xml': '.svg', @@ -71,7 +55,7 @@ function parseDataUri(dataUri) { return { mime, ext, buffer }; } -function transformModel(model, endpointUrl) { +function transformModel(model) { const meta = model.metadata || {}; const tags = meta.tags || []; @@ -89,7 +73,6 @@ function transformModel(model, endpointUrl) { precision: meta.precision, model_url: meta.model_url, pricing: model.pricing, - endpoint_url: endpointUrl, isLive: Boolean(model.gateway_id), isNew: tags.includes('New'), isTrending: tags.includes('Trending'), @@ -103,22 +86,7 @@ async function processModelGarden(modelGarden) { mkdirSync(imagesDir, { recursive: true }); for (const model of modelGarden.items) { - let endpointUrl; - - if (model.gateway_uid) { - try { - const endpoint = await fetchEndpoint(model.gateway_uid); - endpointUrl = endpoint.url; - } catch (err) { - console.error(`Failed to fetch endpoint for ${model.name}: ${err.message}`); - endpointUrl = null; - } - } else { - const subdomain = toSubdomain(model.display_name); - endpointUrl = `https://${subdomain}.${API_DOMAIN}`; - } - - const transformed = transformModel(model, endpointUrl); + const transformed = transformModel(model); const parsed = parseDataUri(transformed.logo_url); if (parsed) {