From 6dcb8ad64be03015fca468b319c88de8e8a33c48 Mon Sep 17 00:00:00 2001 From: saurabh007007 Date: Fri, 22 Aug 2025 10:53:45 +0530 Subject: [PATCH] feat:added the multiple llms --- frontend/models/constants.ts | 216 ++++++++++++++++++++++++++++++++++- frontend/models/types.ts | 1 + 2 files changed, 216 insertions(+), 1 deletion(-) diff --git a/frontend/models/constants.ts b/frontend/models/constants.ts index 4de2c962..8a66734b 100644 --- a/frontend/models/constants.ts +++ b/frontend/models/constants.ts @@ -1,6 +1,20 @@ import { type Model, ModelCapability, ModelProvider } from "./types"; export const MODELS: Model[] = [ + { + id: "google/gemini-2.5-pro", + name: "Gemini 2.5 Pro", + provider: ModelProvider.GOOGLE, + description: "High-performance multimodal model for advanced tasks", + maxTokens: 32768, + pricePer1kTokens: 0.002, + capabilities: [ + ModelCapability.TEXT, + ModelCapability.CODE, + ModelCapability.FUNCTION_CALLING, + ], + isAvailable: true, + }, { id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash", @@ -14,7 +28,207 @@ export const MODELS: Model[] = [ ModelCapability.FUNCTION_CALLING, ], isAvailable: true, - } + }, + { + id: "agentica-org/deepcoder-14b-preview:free", + name: "DeepCoder 14B Preview", + provider: ModelProvider.OPENROUTER, + description: "Preview coding-focused model (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.CODE, ModelCapability.TEXT], + isAvailable: true, + }, + { + id: "deepseek/deepseek-r1:free", + name: "DeepSeek R1 (free)", + provider: ModelProvider.OPENROUTER, + description: "Reasoning-optimized free model", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "deepseek/deepseek-chat-v3-0324:free", + name: "DeepSeek Chat v3 0324 (free)", + provider: ModelProvider.OPENROUTER, + description: "General-purpose conversational AI (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT], + isAvailable: true, + }, + { + id: "meta-llama/llama-3.3-70b-instruct:free", + name: "Llama 3.3 70B Instruct (free)", + provider: ModelProvider.OPENROUTER, + description: "Instruction-tuned model with high reasoning capability", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "mistralai/mistral-small-24b-instruct-2501:free", + name: "Mistral Small 24B Instruct 2501 (free)", + provider: ModelProvider.OPENROUTER, + description: "Efficient small-scale instruction model (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT], + isAvailable: true, + }, + { + id: "qwen/qwen-2.5-72b-instruct:free", + name: "Qwen 2.5 72B Instruct (free)", + provider: ModelProvider.OPENROUTER, + description: "Large-scale Chinese-English capable instruct model", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "moonshotai/kimi-k2:free", + name: "Moonshot Kimi K2 (free)", + provider: ModelProvider.OPENROUTER, + description: "Conversational model from Moonshot (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT], + isAvailable: true, + }, + { + id: "rekaai/reka-flash-3:free", + name: "Reka Flash 3 (free)", + provider: ModelProvider.OPENROUTER, + description: "Fast lightweight AI model (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT], + isAvailable: true, + }, + { + id: "z-ai/glm-4.5-air:free", + name: "GLM 4.5 Air (free)", + provider: ModelProvider.OPENROUTER, + description: "Lightweight multilingual model (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "tencent/hunyuan-a13b-instruct:free", + name: "Tencent Hunyuan A13B Instruct (free)", + provider: ModelProvider.OPENROUTER, + description: "Instruction-tuned model from Tencent", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT], + isAvailable: true, + }, + { + id: "google/gemma-3n-e2b-it:free", + name: "Google Gemma 3n e2B IT (free)", + provider: ModelProvider.OPENROUTER, + description: "Gemma 3 nano variant for instruction tasks", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "google/gemma-3-27b-it:free", + name: "Google Gemma 3 27B IT (free)", + provider: ModelProvider.OPENROUTER, + description: "Gemma 3 mid-scale instruction-tuned model", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "cognitivecomputations/dolphin3.0-mistral-24b:free", + name: "Dolphin 3.0 Mistral 24B (free)", + provider: ModelProvider.OPENROUTER, + description: "Dolphin model based on Mistral 24B (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "google/gemma-2-9b-it:free", + name: "Google Gemma 2 9B IT (free)", + provider: ModelProvider.OPENROUTER, + description: "Instruction-tuned 9B Gemma model", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "shisa-ai/shisa-v2-llama3.3-70b:free", + name: "Shisa v2 Llama 3.3 70B (free)", + provider: ModelProvider.OPENROUTER, + description: "Llama 3.3 70B variant optimized by Shisa AI", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "tngtech/deepseek-r1t-chimera:free", + name: "DeepSeek R1T Chimera (free)", + provider: ModelProvider.OPENROUTER, + description: "Hybrid DeepSeek reasoning model (free tier)", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "microsoft/mai-ds-r1:free", + name: "Microsoft MAI DS-R1 (free)", + provider: ModelProvider.OPENROUTER, + description: "Microsoft AI reasoning model", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "baidu/ernie-4.5-21b-a3b", + name: "Baidu ERNIE 4.5 21B A3B", + provider: ModelProvider.OPENROUTER, + description: "ERNIE reasoning model by Baidu", + maxTokens: 8192, + pricePer1kTokens: 0.002, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "openai/gpt-oss-20b:free", + name: "OpenAI GPT-OSS 20B (free)", + provider: ModelProvider.OPENROUTER, + description: "Open-source GPT 20B model", + maxTokens: 8192, + pricePer1kTokens: 0, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, + { + id: "x-ai/grok-3-mini", + name: "xAI Grok 3 Mini", + provider: ModelProvider.OPENROUTER, + description: "Compact Grok model from xAI", + maxTokens: 8192, + pricePer1kTokens: 0.002, + capabilities: [ModelCapability.TEXT, ModelCapability.CODE], + isAvailable: true, + }, ]; export const DEFAULT_MODEL_ID = "google/gemini-2.5-flash"; diff --git a/frontend/models/types.ts b/frontend/models/types.ts index 5a20c54d..673e0d57 100644 --- a/frontend/models/types.ts +++ b/frontend/models/types.ts @@ -13,6 +13,7 @@ export enum ModelProvider { OPENAI = "openai", GOOGLE = "google", ANTHROPIC = "anthropic", + OPENROUTER = "openrouter", } export enum ModelCapability {