refactor: Clean up more unused code

This commit is contained in:
Aunali321 2025-09-01 00:28:47 +05:30
parent bca38fa221
commit 7434d98fc1
3 changed files with 1 additions and 26 deletions

View file

@ -15,9 +15,7 @@ export type ProviderMeta = {
title: string; title: string;
link: string; link: string;
description: string; description: string;
apiKeyName: string;
placeholder: string; placeholder: string;
docsLink: string;
}; };
export const UrlCitationSchema = z.object({ export const UrlCitationSchema = z.object({
@ -43,48 +41,36 @@ export const PROVIDER_META: Record<Provider, ProviderMeta> = {
title: 'OpenAI', title: 'OpenAI',
link: 'https://openai.com', link: 'https://openai.com',
description: 'GPT models, DALL-E, and Whisper from OpenAI', description: 'GPT models, DALL-E, and Whisper from OpenAI',
apiKeyName: 'OpenAI API Key',
placeholder: 'sk-...', placeholder: 'sk-...',
docsLink: 'https://platform.openai.com/docs',
}, },
[Provider.Anthropic]: { [Provider.Anthropic]: {
title: 'Anthropic', title: 'Anthropic',
link: 'https://anthropic.com', link: 'https://anthropic.com',
description: 'Claude models from Anthropic', description: 'Claude models from Anthropic',
apiKeyName: 'Anthropic API Key',
placeholder: 'sk-ant-...', placeholder: 'sk-ant-...',
docsLink: 'https://docs.anthropic.com',
}, },
[Provider.Gemini]: { [Provider.Gemini]: {
title: 'Google Gemini', title: 'Google Gemini',
link: 'https://ai.google.dev/docs', link: 'https://ai.google.dev/docs',
description: 'Gemini models from Google', description: 'Gemini models from Google',
apiKeyName: 'Google AI API Key',
placeholder: 'AIza...', placeholder: 'AIza...',
docsLink: 'https://ai.google.dev/docs',
}, },
[Provider.Mistral]: { [Provider.Mistral]: {
title: 'Mistral', title: 'Mistral',
link: 'https://mistral.ai', link: 'https://mistral.ai',
description: 'Mistral models and embeddings', description: 'Mistral models and embeddings',
apiKeyName: 'Mistral API Key',
placeholder: 'mistral-...', placeholder: 'mistral-...',
docsLink: 'https://docs.mistral.ai',
}, },
[Provider.Cohere]: { [Provider.Cohere]: {
title: 'Cohere', title: 'Cohere',
link: 'https://cohere.com', link: 'https://cohere.com',
description: 'Command models and embeddings from Cohere', description: 'Command models and embeddings from Cohere',
apiKeyName: 'Cohere API Key',
placeholder: 'co_...', placeholder: 'co_...',
docsLink: 'https://docs.cohere.com',
}, },
[Provider.OpenRouter]: { [Provider.OpenRouter]: {
title: 'OpenRouter', title: 'OpenRouter',
link: 'https://openrouter.ai', link: 'https://openrouter.ai',
description: 'Access to 300+ models through OpenRouter', description: 'Access to 300+ models through OpenRouter',
apiKeyName: 'OpenRouter API Key',
placeholder: 'sk-or-...', placeholder: 'sk-or-...',
docsLink: 'https://openrouter.ai/docs',
}, },
}; };

View file

@ -16,14 +16,3 @@ export function supportsToolCalls(model: ModelInfo): boolean {
return model.capabilities.functionCalling; 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);
}

View file

@ -162,7 +162,7 @@
</Tooltip> </Tooltip>
{/if} {/if}
{#if model.capabilities.toolCalls} {#if model.capabilities.functionCalling}
<Tooltip> <Tooltip>
{#snippet trigger(tooltip)} {#snippet trigger(tooltip)}
<div <div