From 2485df1887928a0f078fc302b3af49b4242441ff Mon Sep 17 00:00:00 2001 From: Chesars Date: Wed, 21 Jan 2026 11:29:09 -0300 Subject: [PATCH] Add vertex_ai/ prefix to model names for clarity Models with litellm_provider starting with "vertex_ai" (e.g., "vertex_ai-language-models") now display with the vertex_ai/ prefix when the model name doesn't already include a provider prefix. This helps users understand that these models require GCP/Vertex AI credentials rather than simple API key authentication. Fixes issue where models like "gemini-2.0-flash" appeared without indication that they default to Vertex AI auth. --- src/App.svelte | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 642f55a..361f780 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -141,6 +141,26 @@ We also need to update [${RESOURCE_BACKUP_NAME}](https://github.com/${REPO_FULL_ }); } + /** + * Get the display name for a model, adding provider prefix when needed. + * This helps users understand which auth method is required. + * e.g., "gemini-2.0-flash" with provider "vertex_ai-language-models" -> "vertex_ai/gemini-2.0-flash" + */ + function getDisplayModelName(name: string, litellm_provider: string): string { + // If the model name already has a provider prefix, return as-is + if (name.includes('/')) { + return name; + } + + // Add prefix for vertex_ai models so users know they need GCP credentials + // Provider can be "vertex_ai", "vertex_ai-language-models", etc. + if (litellm_provider && litellm_provider.startsWith('vertex_ai')) { + return `vertex_ai/${name}`; + } + + return name; + } + function toggleRow(name: string) { if (expandedRows.has(name)) { expandedRows.delete(name); @@ -329,10 +349,10 @@ We also need to update [${RESOURCE_BACKUP_NAME}](https://github.com/${REPO_FULL_ {/if} - {name} -