diff --git a/frontend/src/components/ModelTooltip.tsx b/frontend/src/components/ModelTooltip.tsx new file mode 100644 index 00000000..3b6830cf --- /dev/null +++ b/frontend/src/components/ModelTooltip.tsx @@ -0,0 +1,72 @@ +import { Info } from "lucide-react"; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; +import { MODEL_CONFIG } from "@/components/ModelSelector"; + +export function ModelTooltip() { + // Get all models from the MODEL_CONFIG + const models = Object.entries(MODEL_CONFIG).map(([id, config]) => ({ + id, + displayName: config.displayName, + shortName: config.shortName, + badges: config.badges || [], + requiresPro: config.requiresPro, + requiresStarter: config.requiresStarter + })); + + // Sort models: Free models first, then starter, then pro, with some logical ordering + const sortedModels = models.sort((a, b) => { + // Free models (no requirements) first + if (!a.requiresPro && !a.requiresStarter && (b.requiresPro || b.requiresStarter)) return -1; + if (!b.requiresPro && !b.requiresStarter && (a.requiresPro || a.requiresStarter)) return 1; + + // Then starter models + if (a.requiresStarter && !b.requiresStarter && !b.requiresPro) return 1; + if (b.requiresStarter && !a.requiresStarter && !a.requiresPro) return -1; + + // Then pro models + if (a.requiresPro && !b.requiresPro) return 1; + if (b.requiresPro && !a.requiresPro) return -1; + + // Within same tier, sort alphabetically + return a.displayName.localeCompare(b.displayName); + }); + + return ( + + + + + + +
+
Available Models:
+
+ {sortedModels.map((model) => ( +
+
+
{model.displayName}
+ {model.badges && model.badges.length > 0 && ( +
+ {model.badges.map((badge) => ( + + {badge} + + ))} +
+ )} +
+
+ ))} +
+
+
+
+
+ ); +} diff --git a/frontend/src/config/pricingConfig.tsx b/frontend/src/config/pricingConfig.tsx index 9ddc7e3c..f0a345d2 100644 --- a/frontend/src/config/pricingConfig.tsx +++ b/frontend/src/config/pricingConfig.tsx @@ -1,7 +1,8 @@ import { Check, X } from "lucide-react"; +import { ModelTooltip } from "@/components/ModelTooltip"; export type PlanFeature = { - text: string; + text: string | React.ReactNode; included: boolean; icon?: React.ReactNode; }; @@ -136,7 +137,12 @@ export const PRICING_PLANS: PricingPlan[] = [ icon: }, { - text: "6 Powerful Models (including DeepSeek R1)", + text: ( + + 6 Powerful Models (including DeepSeek R1) + + + ), included: true, icon: }, @@ -191,7 +197,12 @@ export const PRICING_PLANS: PricingPlan[] = [ icon: }, { - text: "6 Powerful Models (including DeepSeek R1)", + text: ( + + 6 Powerful Models (including DeepSeek R1) + + + ), included: true, icon: }, @@ -255,7 +266,12 @@ export const PRICING_PLANS: PricingPlan[] = [ icon: }, { - text: "6 Powerful Models (including DeepSeek R1)", + text: ( + + 6 Powerful Models (including DeepSeek R1) + + + ), included: true, icon: },