diff options
Diffstat (limited to 'packages/ui')
| -rw-r--r-- | packages/ui/vite.config.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts index 0f3630b3a..335084bd6 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -45,12 +45,13 @@ function providerIconsPlugin() { } async function fetchProviderIcons() { - const providers = await fetch("https://models.dev/api.json") + const url = process.env.OPENCODE_MODELS_URL || "https://models.dev" + const providers = await fetch(`${url}/api.json`) .then((res) => res.json()) .then((json) => Object.keys(json)) await Promise.all( providers.map((provider) => - fetch(`https://models.dev/logos/${provider}.svg`) + fetch(`${url}/logos/${provider}.svg`) .then((res) => res.text()) .then((svg) => fs.writeFileSync(`./src/assets/icons/provider/${provider}.svg`, svg)), ), |
