All files / client/src/lib models.ts

0% Statements 0/11
0% Branches 0/4
0% Functions 0/5
0% Lines 0/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89                                                                                                                                                                                 
/**
 * Available AI models and tools for the prompt playground
 */
 
export interface ModelInfo {
  id: string;
  name: string;
  provider: "anthropic" | "openai" | "google";
  description: string;
  strengths: string[];
  costTier: "low" | "medium" | "high";
}
 
export interface ToolInfo {
  id: string;
  name: string;
  description: string;
  category: string;
}
 
export const AVAILABLE_MODELS: ModelInfo[] = [
  {
    id: "claude-sonnet-4-5",
    name: "Claude Sonnet 4.5",
    provider: "anthropic",
    description: "Balanced performance for complex tasks",
    strengths: ["Code generation", "Analysis", "Creative writing"],
    costTier: "medium",
  },
  {
    id: "gpt-4o",
    name: "GPT-4o",
    provider: "openai",
    description: "Fast, multimodal flagship model",
    strengths: ["General purpose", "Reasoning", "Code"],
    costTier: "medium",
  },
  {
    id: "gemini-2.0-flash",
    name: "Gemini 2.0 Flash",
    provider: "google",
    description: "Fast, cost-effective model",
    strengths: ["Speed", "Efficiency", "General tasks"],
    costTier: "low",
  },
];
 
export const AVAILABLE_TOOLS: ToolInfo[] = [
  {
    id: "web_search",
    name: "Web Search",
    description: "Search the web for up-to-date information",
    category: "research",
  },
  {
    id: "code_interpreter",
    name: "Code Interpreter",
    description: "Execute and test code snippets",
    category: "coding",
  },
  {
    id: "file_analysis",
    name: "File Analysis",
    description: "Analyze and process files",
    category: "analysis",
  },
];
 
export function getModelById(id: string): ModelInfo | undefined {
  return AVAILABLE_MODELS.find(m => m.id === id);
}
 
export function getToolById(id: string): ToolInfo | undefined {
  return AVAILABLE_TOOLS.find(t => t.id === id);
}
 
export function getProviderColor(provider: string): string {
  switch (provider) {
    case "anthropic":
      return "bg-orange-500";
    case "openai":
      return "bg-green-500";
    case "google":
      return "bg-blue-500";
    default:
      return "bg-gray-500";
  }
}