diff --git a/src/data/llms.ts b/src/data/llms.ts index c4119ed..2bd4b1b 100644 --- a/src/data/llms.ts +++ b/src/data/llms.ts @@ -11,7 +11,8 @@ function modelJsonUrl(siteUrl: string, model: Model): string { } function modelTitle(model: Model): string { - return `${providerLabel(model.provider)} ${modelLabel(model)} (${authLabel(model.authType)})`; + const variant = model.authType === "subscription" ? ` (${authLabel(model.authType)})` : ""; + return `${providerLabel(model.provider)} ${modelLabel(model)}${variant}`; } function plural(n: number, word: string): string { diff --git a/src/views/model.ejs b/src/views/model.ejs index c84ac89..fa70ed0 100644 --- a/src/views/model.ejs +++ b/src/views/model.ejs @@ -1,10 +1,5 @@ <% const providerLogo = helpers.logoFor(model.provider); - const authName = helpers.authLabel(model.authType); - const authClasses = - model.authType === "api_key" - ? "bg-indigo-100 text-indigo-800 dark:bg-indigo-900/50 dark:text-indigo-200" - : "bg-emerald-100 text-emerald-800 dark:bg-emerald-900/50 dark:text-emerald-200"; %> <%- include("partials/breadcrumbs", { items: [ { name: "Home", href: "/" }, @@ -20,7 +15,9 @@ <% } %> <%= providerName %> - <%= authName %> + <% if (isSubscription) { %> + <%= helpers.authLabel(model.authType) %> + <% } %> <%= model.params.length %> param<%= model.params.length === 1 ? "" : "s" %>

diff --git a/src/views/partials/model_row.ejs b/src/views/partials/model_row.ejs index 55ac1ff..5658cef 100644 --- a/src/views/partials/model_row.ejs +++ b/src/views/partials/model_row.ejs @@ -2,11 +2,7 @@ const id = helpers.modelId(model); const providerName = helpers.providerLabel(model.provider); const modelName = helpers.modelLabel(model); - const authName = helpers.authLabel(model.authType); - const authClasses = - model.authType === "api_key" - ? "bg-indigo-100 text-indigo-800 dark:bg-indigo-900/50 dark:text-indigo-200" - : "bg-emerald-100 text-emerald-800 dark:bg-emerald-900/50 dark:text-emerald-200"; + const isSubscription = model.authType === "subscription"; const capabilities = model.params.map((p) => p.path).join(" "); const providerLogo = helpers.logoFor(model.provider); %> @@ -36,9 +32,11 @@ data-model-link class="flex-1 truncate text-sm font-semibold hover:text-accent sm:text-base dark:hover:text-accent" ><%= modelName %> - <%= authName %> + <%= helpers.authLabel(model.authType) %> + <% } %> <%= model.params.length %> param<%= model.params.length === 1 ? "" : "s" %> diff --git a/src/views/provider.ejs b/src/views/provider.ejs index f255e9d..0394daa 100644 --- a/src/views/provider.ejs +++ b/src/views/provider.ejs @@ -23,20 +23,15 @@