From 7434d98fc16164e49986d786686156d98587543a Mon Sep 17 00:00:00 2001 From: Aunali321 Date: Mon, 1 Sep 2025 00:28:47 +0530 Subject: [PATCH] refactor: Clean up more unused code --- src/lib/types.ts | 14 -------------- src/lib/utils/model-capabilities.ts | 11 ----------- src/routes/account/models/model-card.svelte | 2 +- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/src/lib/types.ts b/src/lib/types.ts index 21c2d31..5da9ae7 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -15,9 +15,7 @@ export type ProviderMeta = { title: string; link: string; description: string; - apiKeyName: string; placeholder: string; - docsLink: string; }; export const UrlCitationSchema = z.object({ @@ -43,48 +41,36 @@ export const PROVIDER_META: Record = { title: 'OpenAI', link: 'https://openai.com', description: 'GPT models, DALL-E, and Whisper from OpenAI', - apiKeyName: 'OpenAI API Key', placeholder: 'sk-...', - docsLink: 'https://platform.openai.com/docs', }, [Provider.Anthropic]: { title: 'Anthropic', link: 'https://anthropic.com', description: 'Claude models from Anthropic', - apiKeyName: 'Anthropic API Key', placeholder: 'sk-ant-...', - docsLink: 'https://docs.anthropic.com', }, [Provider.Gemini]: { title: 'Google Gemini', link: 'https://ai.google.dev/docs', description: 'Gemini models from Google', - apiKeyName: 'Google AI API Key', placeholder: 'AIza...', - docsLink: 'https://ai.google.dev/docs', }, [Provider.Mistral]: { title: 'Mistral', link: 'https://mistral.ai', description: 'Mistral models and embeddings', - apiKeyName: 'Mistral API Key', placeholder: 'mistral-...', - docsLink: 'https://docs.mistral.ai', }, [Provider.Cohere]: { title: 'Cohere', link: 'https://cohere.com', description: 'Command models and embeddings from Cohere', - apiKeyName: 'Cohere API Key', placeholder: 'co_...', - docsLink: 'https://docs.cohere.com', }, [Provider.OpenRouter]: { title: 'OpenRouter', link: 'https://openrouter.ai', description: 'Access to 300+ models through OpenRouter', - apiKeyName: 'OpenRouter API Key', placeholder: 'sk-or-...', - docsLink: 'https://openrouter.ai/docs', }, }; diff --git a/src/lib/utils/model-capabilities.ts b/src/lib/utils/model-capabilities.ts index 97b0675..c34bd88 100644 --- a/src/lib/utils/model-capabilities.ts +++ b/src/lib/utils/model-capabilities.ts @@ -16,14 +16,3 @@ export function supportsToolCalls(model: ModelInfo): boolean { return model.capabilities.functionCalling; } -export function getImageSupportedModels(models: ModelInfo[]): ModelInfo[] { - return models.filter(supportsImages); -} - -export function getReasoningModels(models: ModelInfo[]): ModelInfo[] { - return models.filter(supportsReasoning); -} - -export function getStreamingModels(models: ModelInfo[]): ModelInfo[] { - return models.filter(supportsStreaming); -} diff --git a/src/routes/account/models/model-card.svelte b/src/routes/account/models/model-card.svelte index f1337d0..26c62fd 100644 --- a/src/routes/account/models/model-card.svelte +++ b/src/routes/account/models/model-card.svelte @@ -162,7 +162,7 @@ {/if} - {#if model.capabilities.toolCalls} + {#if model.capabilities.functionCalling} {#snippet trigger(tooltip)}