Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions data/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://flux2.default.bentoml.dev",
"isLive": true,
"isNew": false,
"isTrending": true
Expand All @@ -37,7 +36,6 @@
"input": "1",
"output": "1"
},
"endpoint_url": "https://smollm.default.bentoml.dev",
"isLive": true,
"isNew": false,
"isTrending": false
Expand All @@ -62,7 +60,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://glm-5.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": true
Expand All @@ -88,7 +85,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://kimi-k2-5.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": true
Expand All @@ -113,7 +109,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://minimax-m2-5.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": true
Expand All @@ -138,7 +133,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://deepseek-v3-2.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": true
Expand All @@ -164,7 +158,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-5-397b-a17b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -189,7 +182,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-235b-a22b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -214,7 +206,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://deepseek-v3-1.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -241,7 +232,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://glm-4-7.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -266,7 +256,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://deepseek-r1-0528.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -292,7 +281,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://llama-4-maverick.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -318,7 +306,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://mistral-large-3.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -343,7 +330,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://mimo-v2-flash.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -368,7 +354,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-coder-480b-a35b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -393,7 +378,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://gpt-oss-120b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": true
Expand All @@ -418,7 +402,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://llama-3-1-405b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -444,7 +427,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://llama-4-scout.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -469,7 +451,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://deepseek-r1.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -494,7 +475,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-30b-a3b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -519,7 +499,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://exaone-4-0-32b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -546,7 +525,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-omni-30b-a3b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -572,7 +550,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://ministral-14b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -597,7 +574,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://gpt-oss-20b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -623,7 +599,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://gemma-3-12b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -648,7 +623,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://phi-4.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -673,7 +647,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://nemotron-3-nano.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -698,7 +671,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://llama-3-3-70b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -723,7 +695,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen2-5-72b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -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
Expand All @@ -775,7 +745,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://gemma-3-27b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -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
Expand All @@ -826,7 +794,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-vl-30b-a3b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -852,7 +819,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-vl-8b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand All @@ -878,7 +844,6 @@
"input": "0",
"output": "0"
},
"endpoint_url": "https://qwen3-vl-4b.api.modular.com",
"isLive": false,
"isNew": false,
"isTrending": false
Expand Down
36 changes: 2 additions & 34 deletions scripts/fetch-models.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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',
Expand All @@ -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 || [];

Expand All @@ -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'),
Expand All @@ -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) {
Expand Down
Loading