// Single source of truth for model catalog entries.
// Used by both CatalogSeedService (auto-bootstrap) and prisma/seed-catalog.ts (manual).
import { isDeprecatedDefaultLocalModel } from './default-models.constants';
import { REGISTRY_CATALOG_ENTRIES } from './registry-catalog-entries.generated';

const RAW_CATALOG_ENTRIES = [
  // ─── CODING (5 models) ──────────────────────────────────────────────
  {
    name: 'qwen2.5-coder',
    tag: '32b',
    displayName: 'Qwen 2.5 Coder 32B',
    category: 'CODING',
    description: 'Best local coding model, 300+ languages. Matches GPT-4o on HumanEval (73.7).',
    sizeBytes: BigInt(21_474_836_480),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen2.5-coder:32b',
    isRecommended: true,
    capabilities: [
      'code_generation',
      'code_review',
      'debugging',
      'refactoring',
      'multilingual_code',
    ],
  },
  {
    name: 'qwen2.5-coder',
    tag: '14b',
    displayName: 'Qwen 2.5 Coder 14B',
    category: 'CODING',
    description: 'Sweet spot for quality vs hardware. Top-rated coding model under 20B params.',
    sizeBytes: BigInt(9_663_676_416),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen2.5-coder:14b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_review', 'debugging', 'refactoring'],
  },
  {
    name: 'qwen2.5-coder',
    tag: '7b',
    displayName: 'Qwen 2.5 Coder 7B',
    category: 'CODING',
    description: 'Best coding model for 8-12GB VRAM. HumanEval 76.0 in 7B class.',
    sizeBytes: BigInt(5_046_586_573),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen2.5-coder:7b',
    isRecommended: false,
    capabilities: ['code_generation', 'debugging', 'code_completion'],
  },
  {
    name: 'deepseek-coder-v2',
    tag: '16b',
    displayName: 'DeepSeek Coder V2 16B',
    category: 'CODING',
    description: 'Specialist in debugging and code completion. LiveCodeBench 90%.',
    sizeBytes: BigInt(10_737_418_240),
    parameterCount: '16B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-coder-v2:16b',
    isRecommended: false,
    capabilities: ['code_generation', 'debugging', 'code_completion', 'code_explanation'],
  },
  {
    name: 'starcoder2',
    tag: '7b',
    displayName: 'StarCoder2 7B',
    category: 'CODING',
    description: 'Lightweight model good for autocomplete and code completion.',
    sizeBytes: BigInt(4_831_838_208),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'starcoder2:7b',
    isRecommended: false,
    capabilities: ['code_completion', 'code_generation'],
  },

  // ─── FILE GENERATION (5 models) ─────────────────────────────────────
  {
    name: 'qwen3',
    tag: '7b',
    displayName: 'Qwen 3 7B',
    category: 'FILE_GENERATION',
    description: 'Best instruction following for structured output (markdown, JSON, CSV).',
    sizeBytes: BigInt(5_046_586_573),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:7b',
    isRecommended: true,
    capabilities: ['structured_output', 'markdown', 'json', 'csv', 'instruction_following'],
  },
  {
    name: 'llama3.3',
    tag: '8b',
    displayName: 'Llama 3.3 8B',
    category: 'FILE_GENERATION',
    description: 'Best all-around content writer with clean formatting.',
    sizeBytes: BigInt(5_368_709_120),
    parameterCount: '8B',
    runtime: 'OLLAMA',
    ollamaName: 'llama3.3:8b',
    isRecommended: false,
    capabilities: ['content_writing', 'formatting', 'structured_output'],
  },
  {
    name: 'mistral-small3',
    tag: '7b',
    displayName: 'Mistral Small 3 7B',
    category: 'FILE_GENERATION',
    description: 'Fastest throughput — ideal for bulk file generation.',
    sizeBytes: BigInt(4_831_838_208),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'mistral-small3:7b',
    isRecommended: false,
    capabilities: ['fast_generation', 'structured_output', 'content_writing'],
  },
  {
    name: 'phi4',
    tag: '14b',
    displayName: 'Phi-4 14B',
    category: 'FILE_GENERATION',
    description: 'Best analytical writing (reports, technical docs). Beats GPT-4o on MATH.',
    sizeBytes: BigInt(9_663_676_416),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4:14b',
    isRecommended: false,
    capabilities: ['analytical_writing', 'technical_docs', 'reports', 'reasoning'],
  },
  {
    name: 'gemma3',
    tag: '9b',
    displayName: 'Gemma 3 9B',
    category: 'FILE_GENERATION',
    description: 'Strong multilingual content generation from Google.',
    sizeBytes: BigInt(6_442_450_944),
    parameterCount: '9B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma3:9b',
    isRecommended: false,
    capabilities: ['multilingual', 'content_writing', 'structured_output'],
  },

  // ─── IMAGE GENERATION (5 models) ────────────────────────────────────
  {
    name: 'flux.2-dev',
    tag: 'latest',
    displayName: 'FLUX.2 Dev',
    category: 'IMAGE_GENERATION',
    description: 'Most photorealistic open-source image model in 2026. 12B parameters.',
    sizeBytes: BigInt(25_769_803_776),
    parameterCount: '12B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: true,
    capabilities: ['photorealistic', 'text_to_image', 'high_quality'],
  },
  {
    name: 'flux.1-schnell',
    tag: 'latest',
    displayName: 'FLUX.1 Schnell',
    category: 'IMAGE_GENERATION',
    description: 'Fast variant (1-4 steps), free for local use.',
    sizeBytes: BigInt(12_884_901_888),
    parameterCount: '12B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: false,
    capabilities: ['fast_generation', 'text_to_image'],
  },
  {
    name: 'sd-3.5',
    tag: 'latest',
    displayName: 'Stable Diffusion 3.5',
    category: 'IMAGE_GENERATION',
    description: 'Stability AI flagship. Great quality/speed ratio.',
    sizeBytes: BigInt(8_589_934_592),
    parameterCount: '8B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: false,
    capabilities: ['text_to_image', 'image_to_image', 'inpainting'],
  },
  {
    name: 'sdxl-lightning',
    tag: 'latest',
    displayName: 'SDXL-Lightning',
    category: 'IMAGE_GENERATION',
    description: 'Ultra-fast (1-4 step generation), real-time capable.',
    sizeBytes: BigInt(8_589_934_592),
    parameterCount: '6.6B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: false,
    capabilities: ['ultra_fast', 'text_to_image', 'realtime'],
  },
  {
    name: 'z-image-turbo',
    tag: 'latest',
    displayName: 'Z-Image-Turbo',
    category: 'IMAGE_GENERATION',
    description: 'Matches larger models. Apache 2.0, bilingual text rendering.',
    sizeBytes: BigInt(6_442_450_944),
    parameterCount: '~6B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: false,
    capabilities: ['text_to_image', 'bilingual_text', 'fast_generation'],
  },

  // ─── ROUTING (5 models) ─────────────────────────────────────────────
  {
    name: 'qwen3',
    tag: '1.7b',
    displayName: 'Qwen 3 1.7B',
    category: 'ROUTING',
    description: 'Purpose-built for intent classification + structured JSON. <200ms routing.',
    sizeBytes: BigInt(1_288_490_189),
    parameterCount: '1.7B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:1.7b',
    isRecommended: true,
    capabilities: ['intent_classification', 'structured_output', 'json', 'ultra_fast'],
  },
  {
    name: 'phi4-mini',
    tag: '3.8b',
    displayName: 'Phi-4-mini 3.8B',
    category: 'ROUTING',
    description: 'Best reasoning per GB — accurate routing on tiny hardware. <300ms.',
    sizeBytes: BigInt(2_469_606_195),
    parameterCount: '3.8B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4-mini:latest',
    isRecommended: false,
    capabilities: ['intent_classification', 'reasoning', 'structured_output'],
  },
  {
    name: 'smollm2',
    tag: '1.7b',
    displayName: 'SmolLM2 1.7B',
    category: 'ROUTING',
    description: 'Ultra-fast, smallest viable classifier. <150ms.',
    sizeBytes: BigInt(1_073_741_824),
    parameterCount: '1.7B',
    runtime: 'OLLAMA',
    ollamaName: 'smollm2:1.7b',
    isRecommended: false,
    capabilities: ['ultra_fast', 'classification', 'lightweight'],
  },
  {
    name: 'gemma3',
    tag: '4b',
    displayName: 'Gemma 3 4B',
    category: 'ROUTING',
    description: 'Google quality, reliable structured output. <350ms.',
    sizeBytes: BigInt(3_543_348_019),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma3:4b',
    isRecommended: false,
    capabilities: ['structured_output', 'classification', 'reliable'],
  },
  {
    name: 'mistral-small3',
    tag: '7b-routing',
    displayName: 'Mistral Small 3 7B',
    category: 'ROUTING',
    description: 'Highest accuracy router but slower. <400ms.',
    sizeBytes: BigInt(4_831_838_208),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'mistral-small3:7b',
    isRecommended: false,
    capabilities: ['high_accuracy', 'classification', 'structured_output'],
  },

  // ─── REASONING (5 models) ───────────────────────────────────────────
  {
    name: 'deepseek-r1',
    tag: '32b',
    displayName: 'DeepSeek R1 32B',
    category: 'REASONING',
    description: 'Near-perfect math (97.3% MATH-500). Explicit chain-of-thought.',
    sizeBytes: BigInt(21_474_836_480),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-r1:32b',
    isRecommended: true,
    capabilities: ['chain_of_thought', 'math', 'logic', 'analysis', 'problem_solving'],
  },
  {
    name: 'deepseek-r1',
    tag: '14b',
    displayName: 'DeepSeek R1 14B',
    category: 'REASONING',
    description: 'Best reasoning under 16GB VRAM. 93.2% MATH-500.',
    sizeBytes: BigInt(9_663_676_416),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-r1:14b',
    isRecommended: false,
    capabilities: ['chain_of_thought', 'math', 'logic', 'analysis'],
  },
  {
    name: 'deepseek-r1',
    tag: '7b',
    displayName: 'DeepSeek R1 7B',
    category: 'REASONING',
    description: 'Chain-of-thought on 8GB RAM. 85%+ MATH-500.',
    sizeBytes: BigInt(5_046_586_573),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-r1:7b',
    isRecommended: false,
    capabilities: ['chain_of_thought', 'math', 'logic'],
  },
  {
    name: 'qwq',
    tag: '32b',
    displayName: 'QwQ 32B (Qwen)',
    category: 'REASONING',
    description: 'Outperforms instruction-tuned models on logic and planning. 90%+ MATH.',
    sizeBytes: BigInt(21_474_836_480),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'qwq:32b',
    isRecommended: false,
    capabilities: ['logic', 'planning', 'multi_step_reasoning', 'math'],
  },
  {
    name: 'phi4',
    tag: '14b-reasoning',
    displayName: 'Phi-4 14B (Reasoning)',
    category: 'REASONING',
    description: 'Beats GPT-4o on MATH & GPQA per-parameter. 80.4% MATH-500.',
    sizeBytes: BigInt(9_663_676_416),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4:14b',
    isRecommended: false,
    capabilities: ['math', 'science', 'analytical_reasoning', 'stem'],
  },

  // ─── THINKING & SEARCH (5 models) ───────────────────────────────────
  {
    name: 'glm-4.7-thinking',
    tag: 'latest',
    displayName: 'GLM-4.7 Thinking',
    category: 'THINKING',
    description: '90%+ Terminal-Bench Hard. Best self-hostable agentic model.',
    sizeBytes: BigInt(5_046_586_573),
    parameterCount: '4.7B',
    runtime: 'OLLAMA',
    ollamaName: 'glm4:latest',
    isRecommended: true,
    capabilities: ['agentic', 'tool_use', 'web_search', 'research', 'thinking'],
  },
  {
    name: 'deepseek-v3.2',
    tag: 'latest',
    displayName: 'DeepSeek V3.2',
    category: 'THINKING',
    description: 'Integrated thinking + tool-use. First model with think-in-tool-calls.',
    sizeBytes: BigInt(39_728_447_488),
    parameterCount: '671B (37B active)',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-v3.2:cloud',
    isRecommended: false,
    capabilities: ['thinking', 'tool_use', 'agentic', 'research', 'deep_analysis'],
  },
  {
    name: 'mimo-v2-flash',
    tag: 'latest',
    displayName: 'MiMo-V2-Flash',
    category: 'THINKING',
    description: 'Ultra-fast reasoning + agentic. 256K context window.',
    sizeBytes: BigInt(16_106_127_360),
    parameterCount: '309B (15B active)',
    runtime: 'OLLAMA',
    ollamaName: 'mimo-v2-flash',
    isRecommended: false,
    capabilities: ['ultra_fast', 'agentic', 'long_context', 'thinking'],
  },
  {
    name: 'qwen3.5',
    tag: '27b',
    displayName: 'Qwen 3.5 27B',
    category: 'THINKING',
    description: '<think> tag for forced reasoning. Strong tool-use.',
    sizeBytes: BigInt(18_253_611_008),
    parameterCount: '27B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:27b',
    isRecommended: false,
    capabilities: ['thinking', 'tool_use', 'structured_reasoning', 'long_context'],
  },
  {
    name: 'llama4-maverick',
    tag: 'latest',
    displayName: 'Llama 4 Maverick',
    category: 'THINKING',
    description: 'Best general-purpose MoE. Strong function calling. 400B (17B active).',
    sizeBytes: BigInt(18_253_611_008),
    parameterCount: '400B (17B active)',
    runtime: 'OLLAMA',
    ollamaName: 'llama4:maverick',
    isRecommended: false,
    capabilities: ['general_purpose', 'function_calling', 'agentic', 'multimodal'],
  },
  // ─── CODING (10 more models) ──────────────────────────────────────
  {
    name: 'codellama',
    tag: '34b',
    displayName: 'CodeLlama 34B',
    category: 'CODING',
    description: 'Meta large code model with infilling support. Strong on HumanEval.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '34B',
    runtime: 'OLLAMA',
    ollamaName: 'codellama:34b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion', 'infilling'],
  },
  {
    name: 'codellama',
    tag: '13b',
    displayName: 'CodeLlama 13B',
    category: 'CODING',
    description: 'Mid-size Meta code model, good balance of quality and speed.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'codellama:13b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion'],
  },
  {
    name: 'codellama',
    tag: '7b',
    displayName: 'CodeLlama 7B',
    category: 'CODING',
    description: 'Lightweight Meta code model for fast code completion.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'codellama:7b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion'],
  },
  {
    name: 'codegemma',
    tag: '7b',
    displayName: 'CodeGemma 7B',
    category: 'CODING',
    description: 'Google code-specialized Gemma variant with strong completion.',
    sizeBytes: BigInt(5_000_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'codegemma:7b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion'],
  },
  {
    name: 'deepseek-coder',
    tag: '33b',
    displayName: 'DeepSeek Coder 33B',
    category: 'CODING',
    description: 'Large DeepSeek code model with broad language support.',
    sizeBytes: BigInt(21_000_000_000),
    parameterCount: '33B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-coder:33b',
    isRecommended: false,
    capabilities: ['code_generation', 'debugging', 'code_completion'],
  },
  {
    name: 'deepseek-coder',
    tag: '6.7b',
    displayName: 'DeepSeek Coder 6.7B',
    category: 'CODING',
    description: 'Compact DeepSeek code model for resource-constrained setups.',
    sizeBytes: BigInt(4_300_000_000),
    parameterCount: '6.7B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-coder:6.7b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion'],
  },
  {
    name: 'magicoder',
    tag: '7b',
    displayName: 'MagiCoder 7B',
    category: 'CODING',
    description: 'OSS-instruct trained code model with strong HumanEval scores.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'magicoder:7b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion'],
  },
  {
    name: 'wizardcoder',
    tag: '33b',
    displayName: 'WizardCoder 33B',
    category: 'CODING',
    description: 'Evol-instruct fine-tuned code model with high benchmark scores.',
    sizeBytes: BigInt(21_000_000_000),
    parameterCount: '33B',
    runtime: 'OLLAMA',
    ollamaName: 'wizardcoder:33b',
    isRecommended: false,
    capabilities: ['code_generation', 'debugging', 'code_review'],
  },
  {
    name: 'phind-codellama',
    tag: '34b',
    displayName: 'Phind CodeLlama 34B',
    category: 'CODING',
    description: 'Phind fine-tuned CodeLlama optimized for developer Q&A.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '34B',
    runtime: 'OLLAMA',
    ollamaName: 'phind-codellama:34b',
    isRecommended: false,
    capabilities: ['code_generation', 'debugging', 'code_explanation'],
  },
  {
    name: 'yi-coder',
    tag: '9b',
    displayName: 'Yi Coder 9B',
    category: 'CODING',
    description: 'Yi-series code specialist with strong multilingual code support.',
    sizeBytes: BigInt(6_000_000_000),
    parameterCount: '9B',
    runtime: 'OLLAMA',
    ollamaName: 'yi-coder:9b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion', 'multilingual_code'],
  },

  // ─── GENERAL / CHAT (10 more models) ────────────────────────────────
  {
    name: 'llama3.3',
    tag: '70b',
    displayName: 'Llama 3.3 70B',
    category: 'GENERAL',
    description: 'Meta flagship 70B model with excellent instruction following.',
    sizeBytes: BigInt(45_000_000_000),
    parameterCount: '70B',
    runtime: 'OLLAMA',
    ollamaName: 'llama3.3:70b',
    isRecommended: false,
    capabilities: ['general_chat', 'instruction_following', 'reasoning'],
  },
  {
    name: 'qwen3',
    tag: '14b',
    displayName: 'Qwen 3 14B',
    category: 'GENERAL',
    description: 'Alibaba mid-size general-purpose model with strong multilingual.',
    sizeBytes: BigInt(9_500_000_000),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:14b',
    isRecommended: false,
    capabilities: ['general_chat', 'multilingual', 'instruction_following'],
  },
  {
    name: 'qwen3',
    tag: '32b',
    displayName: 'Qwen 3 32B',
    category: 'GENERAL',
    description: 'Alibaba large general-purpose model with tool-use capabilities.',
    sizeBytes: BigInt(21_000_000_000),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:32b',
    isRecommended: false,
    capabilities: ['general_chat', 'tool_use', 'reasoning', 'multilingual'],
  },
  {
    name: 'mistral',
    tag: '7b',
    displayName: 'Mistral 7B',
    category: 'GENERAL',
    description: 'Mistral AI foundational 7B model with sliding window attention.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'mistral:7b',
    isRecommended: false,
    capabilities: ['general_chat', 'fast_generation'],
  },
  {
    name: 'mixtral',
    tag: '8x7b',
    displayName: 'Mixtral 8x7B',
    category: 'GENERAL',
    description: 'Mixture-of-experts model with 46.7B total params, 12.9B active per token.',
    sizeBytes: BigInt(26_000_000_000),
    parameterCount: '46.7B (12.9B active)',
    runtime: 'OLLAMA',
    ollamaName: 'mixtral:8x7b',
    isRecommended: true,
    capabilities: ['general_chat', 'reasoning', 'multilingual', 'moe'],
  },
  {
    name: 'gemma3',
    tag: '27b',
    displayName: 'Gemma 3 27B',
    category: 'GENERAL',
    description: 'Google large Gemma model with vision and multilingual support.',
    sizeBytes: BigInt(17_000_000_000),
    parameterCount: '27B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma3:27b',
    isRecommended: false,
    capabilities: ['general_chat', 'multilingual', 'vision', 'reasoning'],
  },
  {
    name: 'command-r',
    tag: '35b',
    displayName: 'Command R 35B',
    category: 'GENERAL',
    description: 'Cohere RAG-optimized model with citation and grounding.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '35B',
    runtime: 'OLLAMA',
    ollamaName: 'command-r:35b',
    isRecommended: false,
    capabilities: ['general_chat', 'rag', 'citation', 'grounding'],
  },
  {
    name: 'yi',
    tag: '34b',
    displayName: 'Yi 34B',
    category: 'GENERAL',
    description: '01.AI bilingual (EN/ZH) model with strong reasoning.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '34B',
    runtime: 'OLLAMA',
    ollamaName: 'yi:34b',
    isRecommended: false,
    capabilities: ['general_chat', 'bilingual', 'reasoning'],
  },
  {
    name: 'solar',
    tag: '10.7b',
    displayName: 'Solar 10.7B',
    category: 'GENERAL',
    description: 'Upstage depth-upscaled model optimized for single-turn tasks.',
    sizeBytes: BigInt(7_000_000_000),
    parameterCount: '10.7B',
    runtime: 'OLLAMA',
    ollamaName: 'solar:10.7b',
    isRecommended: false,
    capabilities: ['general_chat', 'instruction_following'],
  },
  {
    name: 'internlm2',
    tag: '20b',
    displayName: 'InternLM2 20B',
    category: 'GENERAL',
    description: 'Shanghai AI Lab model with strong tool-use and long-context.',
    sizeBytes: BigInt(13_000_000_000),
    parameterCount: '20B',
    runtime: 'OLLAMA',
    ollamaName: 'internlm2:20b',
    isRecommended: false,
    capabilities: ['general_chat', 'tool_use', 'long_context'],
  },

  // ─── REASONING (5 more models) ──────────────────────────────────────
  {
    name: 'wizard-math',
    tag: '70b',
    displayName: 'WizardMath 70B',
    category: 'REASONING',
    description: 'Math-specialized model with reinforced evol-instruct training.',
    sizeBytes: BigInt(45_000_000_000),
    parameterCount: '70B',
    runtime: 'OLLAMA',
    ollamaName: 'wizard-math:70b',
    isRecommended: false,
    capabilities: ['math', 'problem_solving', 'chain_of_thought'],
  },
  {
    name: 'abel',
    tag: '13b',
    displayName: 'Abel 13B',
    category: 'REASONING',
    description: 'Math reasoning specialist trained on step-by-step solutions.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'abel:13b',
    isRecommended: false,
    capabilities: ['math', 'step_by_step', 'problem_solving'],
  },
  {
    name: 'mathstral',
    tag: '7b',
    displayName: 'Mathstral 7B',
    category: 'REASONING',
    description: 'Mistral math-specialized variant with strong MATH benchmark scores.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'mathstral:7b',
    isRecommended: false,
    capabilities: ['math', 'science', 'analytical_reasoning'],
  },
  {
    name: 'deepseek-r1',
    tag: '70b',
    displayName: 'DeepSeek R1 70B',
    category: 'REASONING',
    description: 'Largest DeepSeek R1 with near-perfect math and logic scores.',
    sizeBytes: BigInt(45_000_000_000),
    parameterCount: '70B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-r1:70b',
    isRecommended: true,
    capabilities: ['chain_of_thought', 'math', 'logic', 'analysis', 'problem_solving'],
  },
  {
    name: 'qwen-qwq',
    tag: '72b',
    displayName: 'QwQ 72B',
    category: 'REASONING',
    description: 'Largest QwQ model with top-tier multi-step reasoning.',
    sizeBytes: BigInt(46_000_000_000),
    parameterCount: '72B',
    runtime: 'OLLAMA',
    ollamaName: 'qwq:72b',
    isRecommended: false,
    capabilities: ['logic', 'planning', 'multi_step_reasoning', 'math'],
  },

  // ─── FILE GENERATION (5 more models) ────────────────────────────────
  {
    name: 'llama3.3',
    tag: '70b-filegen',
    displayName: 'Llama 3.3 70B (File Gen)',
    category: 'FILE_GENERATION',
    description: 'Large Llama model for high-quality document and report generation.',
    sizeBytes: BigInt(45_000_000_000),
    parameterCount: '70B',
    runtime: 'OLLAMA',
    ollamaName: 'llama3.3:70b',
    isRecommended: false,
    capabilities: ['content_writing', 'structured_output', 'formatting'],
  },
  {
    name: 'qwen3',
    tag: '14b-filegen',
    displayName: 'Qwen 3 14B (File Gen)',
    category: 'FILE_GENERATION',
    description: 'Mid-size Qwen model for structured file output with multilingual.',
    sizeBytes: BigInt(9_500_000_000),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:14b',
    isRecommended: false,
    capabilities: ['structured_output', 'multilingual', 'content_writing'],
  },
  {
    name: 'gemma3',
    tag: '27b-filegen',
    displayName: 'Gemma 3 27B (File Gen)',
    category: 'FILE_GENERATION',
    description: 'Large Gemma model for high-quality multilingual file generation.',
    sizeBytes: BigInt(17_000_000_000),
    parameterCount: '27B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma3:27b',
    isRecommended: false,
    capabilities: ['multilingual', 'content_writing', 'structured_output'],
  },
  {
    name: 'mistral-small3',
    tag: '24b',
    displayName: 'Mistral Small 3 24B',
    category: 'FILE_GENERATION',
    description: 'Mistral mid-size model optimized for fast structured generation.',
    sizeBytes: BigInt(15_000_000_000),
    parameterCount: '24B',
    runtime: 'OLLAMA',
    ollamaName: 'mistral-small3:24b',
    isRecommended: false,
    capabilities: ['fast_generation', 'structured_output', 'content_writing'],
  },
  {
    name: 'command-r-plus',
    tag: '104b',
    displayName: 'Command R+ 104B',
    category: 'FILE_GENERATION',
    description: 'Cohere largest model with RAG grounding for document generation.',
    sizeBytes: BigInt(67_000_000_000),
    parameterCount: '104B',
    runtime: 'OLLAMA',
    ollamaName: 'command-r-plus:104b',
    isRecommended: false,
    capabilities: ['content_writing', 'rag', 'structured_output', 'citation'],
  },

  // ─── THINKING (5 more models) ───────────────────────────────────────
  {
    name: 'llama4-scout',
    tag: 'latest',
    displayName: 'Llama 4 Scout',
    category: 'THINKING',
    description: 'Meta 109B MoE (17B active) with strong agentic capabilities.',
    sizeBytes: BigInt(30_000_000_000),
    parameterCount: '109B (17B active)',
    runtime: 'OLLAMA',
    ollamaName: 'llama4:scout',
    isRecommended: false,
    capabilities: ['agentic', 'tool_use', 'thinking', 'multimodal'],
  },
  {
    name: 'qwen3',
    tag: '72b',
    displayName: 'Qwen 3 72B',
    category: 'THINKING',
    description: 'Alibaba largest dense model with deep thinking capabilities.',
    sizeBytes: BigInt(46_000_000_000),
    parameterCount: '72B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:72b',
    isRecommended: false,
    capabilities: ['thinking', 'tool_use', 'long_context', 'reasoning'],
  },
  {
    name: 'deepseek-v3',
    tag: 'latest',
    displayName: 'DeepSeek V3',
    category: 'THINKING',
    description: 'DeepSeek 685B MoE (37B active) with strong multi-step reasoning.',
    sizeBytes: BigInt(38_000_000_000),
    parameterCount: '685B (37B active)',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-v3:latest',
    isRecommended: false,
    capabilities: ['thinking', 'agentic', 'research', 'deep_analysis'],
  },
  {
    name: 'phi4-reasoning',
    tag: '14b',
    displayName: 'Phi-4 Reasoning Plus 14B',
    category: 'THINKING',
    description: 'Microsoft reasoning-enhanced Phi-4 with extended chain-of-thought.',
    sizeBytes: BigInt(9_500_000_000),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4-reasoning:14b',
    isRecommended: false,
    capabilities: ['thinking', 'chain_of_thought', 'reasoning', 'math'],
  },
  {
    name: 'exaone',
    tag: '32b',
    displayName: 'EXAONE 3.5 32B',
    category: 'THINKING',
    description: 'LG AI Research model with strong agentic and research capabilities.',
    sizeBytes: BigInt(21_000_000_000),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'exaone:32b',
    isRecommended: false,
    capabilities: ['thinking', 'agentic', 'research', 'long_context'],
  },

  // ─── ROUTING (5 more models) ────────────────────────────────────────
  {
    name: 'gemma3',
    tag: '1b',
    displayName: 'Gemma 3 1B',
    category: 'ROUTING',
    description: 'Ultra-lightweight Google model for fast intent classification.',
    sizeBytes: BigInt(815_000_000),
    parameterCount: '1B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma3:1b',
    isRecommended: false,
    capabilities: ['ultra_fast', 'classification', 'lightweight'],
  },
  {
    name: 'qwen3',
    tag: '0.6b',
    displayName: 'Qwen 3 0.6B',
    category: 'ROUTING',
    description: 'Smallest Qwen model for minimal-latency routing decisions.',
    sizeBytes: BigInt(500_000_000),
    parameterCount: '0.6B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:0.6b',
    isRecommended: false,
    capabilities: ['ultra_fast', 'classification', 'lightweight'],
  },
  {
    name: 'smollm2',
    tag: '360m',
    displayName: 'SmolLM2 360M',
    category: 'ROUTING',
    description: 'Hugging Face sub-400M model for ultra-low-latency classification.',
    sizeBytes: BigInt(300_000_000),
    parameterCount: '360M',
    runtime: 'OLLAMA',
    ollamaName: 'smollm2:360m',
    isRecommended: false,
    capabilities: ['ultra_fast', 'classification', 'lightweight'],
  },
  {
    name: 'tinyllama',
    tag: '1.1b',
    displayName: 'TinyLlama 1.1B',
    category: 'ROUTING',
    description: 'Compact TinyLlama for basic intent classification and routing.',
    sizeBytes: BigInt(637_000_000),
    parameterCount: '1.1B',
    runtime: 'OLLAMA',
    ollamaName: 'tinyllama:1.1b',
    isRecommended: false,
    capabilities: ['ultra_fast', 'classification', 'lightweight'],
  },
  {
    name: 'phi3',
    tag: '3.8b',
    displayName: 'Phi-3 3.8B',
    category: 'ROUTING',
    description: 'Microsoft Phi-3 with good reasoning for accurate routing.',
    sizeBytes: BigInt(2_300_000_000),
    parameterCount: '3.8B',
    runtime: 'OLLAMA',
    ollamaName: 'phi3:3.8b',
    isRecommended: false,
    capabilities: ['classification', 'reasoning', 'structured_output'],
  },

  // ─── MULTILINGUAL (3 models, GENERAL category) ──────────────────────
  {
    name: 'aya',
    tag: '35b',
    displayName: 'Aya 35B',
    category: 'GENERAL',
    description: 'Cohere multilingual model supporting 101 languages.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '35B',
    runtime: 'OLLAMA',
    ollamaName: 'aya:35b',
    isRecommended: false,
    capabilities: ['multilingual', '101_languages'],
  },
  {
    name: 'qwen3',
    tag: '4b',
    displayName: 'Qwen 3 4B',
    category: 'GENERAL',
    description: 'Compact Qwen model with strong Chinese and Japanese support.',
    sizeBytes: BigInt(2_800_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:4b',
    isRecommended: false,
    capabilities: ['multilingual', 'chinese', 'japanese'],
  },
  {
    name: 'sea-lion',
    tag: '7b',
    displayName: 'SEA-LION 7B',
    category: 'GENERAL',
    description: 'AI Singapore model optimized for Southeast Asian languages.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'sea-lion:7b',
    isRecommended: false,
    capabilities: ['multilingual', 'southeast_asian'],
  },

  // ─── VISION (3 models, GENERAL category) ────────────────────────────
  {
    name: 'llava',
    tag: '34b',
    displayName: 'LLaVA 34B',
    category: 'GENERAL',
    description: 'Large Language-and-Vision Assistant for image understanding.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '34B',
    runtime: 'OLLAMA',
    ollamaName: 'llava:34b',
    isRecommended: false,
    capabilities: ['vision', 'image_understanding', 'multimodal'],
  },
  {
    name: 'llava',
    tag: '13b',
    displayName: 'LLaVA 13B',
    category: 'GENERAL',
    description: 'Mid-size vision-language model for image analysis.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'llava:13b',
    isRecommended: false,
    capabilities: ['vision', 'multimodal'],
  },
  {
    name: 'moondream',
    tag: '2b',
    displayName: 'Moondream 2B',
    category: 'GENERAL',
    description: 'Ultra-lightweight vision model for fast image understanding.',
    sizeBytes: BigInt(1_500_000_000),
    parameterCount: '2B',
    runtime: 'OLLAMA',
    ollamaName: 'moondream:2b',
    isRecommended: false,
    capabilities: ['vision', 'lightweight', 'multimodal'],
  },

  // ─── MEDICAL / HEALTHCARE (5 models) ──────────────────────────────
  {
    name: 'meditron',
    tag: '70b',
    displayName: 'Meditron 70B',
    category: 'GENERAL',
    description:
      'Medical domain LLM trained on clinical guidelines and PubMed. Best for healthcare professionals.',
    sizeBytes: BigInt(45_000_000_000),
    parameterCount: '70B',
    runtime: 'OLLAMA',
    ollamaName: 'meditron:70b',
    isRecommended: false,
    capabilities: ['medical', 'clinical', 'diagnosis', 'drug_interaction'],
  },
  {
    name: 'meditron',
    tag: '7b',
    displayName: 'Meditron 7B',
    category: 'GENERAL',
    description: 'Compact medical domain model for clinical guidelines and basic healthcare Q&A.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'meditron:7b',
    isRecommended: false,
    capabilities: ['medical', 'clinical'],
  },
  {
    name: 'biomistral',
    tag: '7b',
    displayName: 'BioMistral 7B',
    category: 'GENERAL',
    description: 'Biomedical NLP model for research papers, clinical notes, drug info.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'biomistral:7b',
    isRecommended: false,
    capabilities: ['biomedical', 'research', 'clinical_notes'],
  },
  {
    name: 'medllama',
    tag: '13b',
    displayName: 'MedLlama 13B',
    category: 'GENERAL',
    description: 'Medical QA model for patient queries and clinical decision support.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'medllama:13b',
    isRecommended: false,
    capabilities: ['medical_qa', 'patient_education'],
  },
  {
    name: 'clinical-camel',
    tag: '70b',
    displayName: 'Clinical Camel 70B',
    category: 'GENERAL',
    description: 'Clinical reasoning model trained on medical case studies.',
    sizeBytes: BigInt(45_000_000_000),
    parameterCount: '70B',
    runtime: 'OLLAMA',
    ollamaName: 'clinical-camel:70b',
    isRecommended: false,
    capabilities: ['clinical_reasoning', 'case_study'],
  },

  // ─── LEGAL (3 models) ─────────────────────────────────────────────
  {
    name: 'saul',
    tag: '7b',
    displayName: 'SaulLM 7B',
    category: 'GENERAL',
    description: 'Legal domain model for contract analysis, case law, regulatory compliance.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'saul:7b',
    isRecommended: false,
    capabilities: ['legal', 'contract_analysis', 'compliance'],
  },
  {
    name: 'legallama',
    tag: '13b',
    displayName: 'LegalLlama 13B',
    category: 'GENERAL',
    description: 'Legal research and document analysis model.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'legallama:13b',
    isRecommended: false,
    capabilities: ['legal_research', 'document_review'],
  },
  {
    name: 'lawgpt',
    tag: '7b',
    displayName: 'LawGPT 7B',
    category: 'GENERAL',
    description: 'Legal Q&A model for common legal questions and explanations.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'lawgpt:7b',
    isRecommended: false,
    capabilities: ['legal_qa', 'statute_lookup'],
  },

  // ─── FINANCE (3 models) ───────────────────────────────────────────
  {
    name: 'financellama',
    tag: '13b',
    displayName: 'FinanceLlama 13B',
    category: 'GENERAL',
    description: 'Financial analysis, valuation, and market research model.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'financellama:13b',
    isRecommended: false,
    capabilities: ['financial_analysis', 'valuation', 'market_research'],
  },
  {
    name: 'finma',
    tag: '7b',
    displayName: 'FinMA 7B',
    category: 'GENERAL',
    description: 'Financial mathematics and quantitative analysis model.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'finma:7b',
    isRecommended: false,
    capabilities: ['quantitative', 'risk_modeling', 'derivatives'],
  },
  {
    name: 'bloomberg-gpt',
    tag: '7b',
    displayName: 'BloombergGPT-Open 7B',
    category: 'GENERAL',
    description: 'Financial NLP model for news, earnings, and sentiment.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'bloomberg-gpt:7b',
    isRecommended: false,
    capabilities: ['financial_nlp', 'sentiment', 'earnings'],
  },

  // ─── SCIENCE / RESEARCH (4 models) ────────────────────────────────
  {
    name: 'sciglm',
    tag: '7b',
    displayName: 'SciGLM 7B',
    category: 'REASONING',
    description: 'Scientific reasoning model for research papers and experimental design.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'sciglm:7b',
    isRecommended: false,
    capabilities: ['scientific_reasoning', 'paper_analysis', 'hypothesis'],
  },
  {
    name: 'galactica',
    tag: '30b',
    displayName: 'Galactica 30B',
    category: 'REASONING',
    description: 'Scientific knowledge model trained on papers, textbooks, encyclopedias.',
    sizeBytes: BigInt(19_000_000_000),
    parameterCount: '30B',
    runtime: 'OLLAMA',
    ollamaName: 'galactica:30b',
    isRecommended: false,
    capabilities: ['scientific_knowledge', 'citations', 'math'],
  },
  {
    name: 'chemllm',
    tag: '7b',
    displayName: 'ChemLLM 7B',
    category: 'REASONING',
    description: 'Chemistry-focused model for molecular analysis, reactions, synthesis.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'chemllm:7b',
    isRecommended: false,
    capabilities: ['chemistry', 'molecular', 'synthesis'],
  },
  {
    name: 'darwin',
    tag: '7b',
    displayName: 'Darwin 7B',
    category: 'REASONING',
    description: 'Biology and life sciences reasoning model.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'darwin:7b',
    isRecommended: false,
    capabilities: ['biology', 'genetics', 'ecology'],
  },

  // ─── EDUCATION (2 models) ─────────────────────────────────────────
  {
    name: 'educhat',
    tag: '13b',
    displayName: 'EduChat 13B',
    category: 'GENERAL',
    description: 'Educational assistant for tutoring, curriculum design, and assessment.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'educhat:13b',
    isRecommended: false,
    capabilities: ['tutoring', 'curriculum', 'assessment', 'pedagogy'],
  },
  {
    name: 'learnlm',
    tag: '7b',
    displayName: 'LearnLM 7B',
    category: 'GENERAL',
    description: 'Learning-focused model for explanations, study guides, quizzes.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'learnlm:7b',
    isRecommended: false,
    capabilities: ['learning', 'explanation', 'quiz_generation'],
  },

  // ─── BUSINESS / ANALYTICS (4 models) ──────────────────────────────
  {
    name: 'tableGPT',
    tag: '7b',
    displayName: 'TableGPT 7B',
    category: 'FILE_GENERATION',
    description: 'Specialized in tabular data analysis, SQL, spreadsheet formulas.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'tablegpt:7b',
    isRecommended: false,
    capabilities: ['tabular_data', 'sql', 'spreadsheet', 'csv'],
  },
  {
    name: 'sqlcoder',
    tag: '15b',
    displayName: 'SQLCoder 15B',
    category: 'CODING',
    description: 'SQL-specialized model. Outperforms GPT-4 on SQL generation.',
    sizeBytes: BigInt(10_000_000_000),
    parameterCount: '15B',
    runtime: 'OLLAMA',
    ollamaName: 'sqlcoder:15b',
    isRecommended: true,
    capabilities: ['sql_generation', 'database', 'query_optimization'],
  },
  {
    name: 'markitdown',
    tag: '7b',
    displayName: 'MarkItDown 7B',
    category: 'FILE_GENERATION',
    description: 'Document-to-markdown conversion and structured content generation.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'markitdown:7b',
    isRecommended: false,
    capabilities: ['markdown', 'document_conversion', 'structured_output'],
  },
  {
    name: 'nous-hermes',
    tag: '13b',
    displayName: 'Nous Hermes 13B',
    category: 'GENERAL',
    description: 'Business-focused model for strategy, analysis, and consulting.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'nous-hermes:13b',
    isRecommended: false,
    capabilities: ['business_analysis', 'strategy', 'consulting'],
  },

  // ─── SECURITY / CYBER (2 models) ──────────────────────────────────
  {
    name: 'securityllm',
    tag: '13b',
    displayName: 'SecurityLLM 13B',
    category: 'CODING',
    description: 'Cybersecurity model for vulnerability analysis, code audit, threat modeling.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'securityllm:13b',
    isRecommended: false,
    capabilities: ['vulnerability_analysis', 'code_audit', 'threat_modeling'],
  },
  {
    name: 'hackerllm',
    tag: '7b',
    displayName: 'HackerLLM 7B',
    category: 'CODING',
    description: 'Offensive security model for penetration testing and CTF challenges.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'hackerllm:7b',
    isRecommended: false,
    capabilities: ['pentest', 'exploit_analysis', 'ctf'],
  },

  // ─── CREATIVE / DESIGN (3 models) ─────────────────────────────────
  {
    name: 'stable-diffusion-xl',
    tag: 'turbo',
    displayName: 'SDXL Turbo',
    category: 'IMAGE_GENERATION',
    description: 'Ultra-fast SDXL variant. 1-step generation for real-time image creation.',
    sizeBytes: BigInt(6_500_000_000),
    parameterCount: '6.6B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: false,
    capabilities: ['ultra_fast', 'text_to_image', 'realtime', '1_step'],
  },
  {
    name: 'kandinsky',
    tag: '3.1',
    displayName: 'Kandinsky 3.1',
    category: 'IMAGE_GENERATION',
    description: 'Multilingual image generation with strong text rendering.',
    sizeBytes: BigInt(8_000_000_000),
    parameterCount: '~8B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: false,
    capabilities: ['multilingual_image', 'text_rendering', 'artistic'],
  },
  {
    name: 'playground-v2.5',
    tag: 'latest',
    displayName: 'Playground v2.5',
    category: 'IMAGE_GENERATION',
    description: 'High-quality image generation with excellent aesthetics.',
    sizeBytes: BigInt(7_000_000_000),
    parameterCount: '~7B',
    runtime: 'COMFYUI',
    ollamaName: null,
    isRecommended: false,
    capabilities: ['high_quality', 'aesthetic', 'photorealistic'],
  },

  // ─── TRANSLATION / MULTILINGUAL (3 models) ────────────────────────
  {
    name: 'nllb',
    tag: '3.3b',
    displayName: 'NLLB 3.3B',
    category: 'GENERAL',
    description: 'No Language Left Behind - 200 language translation model from Meta.',
    sizeBytes: BigInt(2_200_000_000),
    parameterCount: '3.3B',
    runtime: 'OLLAMA',
    ollamaName: 'nllb:3.3b',
    isRecommended: false,
    capabilities: ['translation', '200_languages', 'low_resource'],
  },
  {
    name: 'madlad',
    tag: '7b',
    displayName: 'MADLAD-400 7B',
    category: 'GENERAL',
    description: 'Multilingual model covering 400+ languages.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'madlad:7b',
    isRecommended: false,
    capabilities: ['multilingual', '400_languages', 'translation'],
  },
  {
    name: 'tower',
    tag: '13b',
    displayName: 'Tower 13B',
    category: 'GENERAL',
    description: 'Translation-specialized model with high BLEU scores.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'tower:13b',
    isRecommended: false,
    capabilities: ['translation', 'high_quality', 'european_languages'],
  },

  // ─── EMBEDDING / SEARCH (3 models) ────────────────────────────────
  {
    name: 'nomic-embed',
    tag: 'v1.5',
    displayName: 'Nomic Embed v1.5',
    category: 'GENERAL',
    description: 'Text embedding model for semantic search and RAG.',
    sizeBytes: BigInt(550_000_000),
    parameterCount: '137M',
    runtime: 'OLLAMA',
    ollamaName: 'nomic-embed-text:v1.5',
    isRecommended: false,
    capabilities: ['embedding', 'semantic_search', 'rag'],
  },
  {
    name: 'mxbai-embed',
    tag: 'large',
    displayName: 'MixedBread Embed Large',
    category: 'GENERAL',
    description: 'High-quality embedding model for retrieval and classification.',
    sizeBytes: BigInt(1_300_000_000),
    parameterCount: '335M',
    runtime: 'OLLAMA',
    ollamaName: 'mxbai-embed-large:latest',
    isRecommended: false,
    capabilities: ['embedding', 'retrieval', 'classification'],
  },
  {
    name: 'snowflake-arctic',
    tag: 'embed',
    displayName: 'Snowflake Arctic Embed',
    category: 'GENERAL',
    description: 'Enterprise-grade embedding for search and analytics.',
    sizeBytes: BigInt(800_000_000),
    parameterCount: '110M',
    runtime: 'OLLAMA',
    ollamaName: 'snowflake-arctic-embed:latest',
    isRecommended: false,
    capabilities: ['embedding', 'enterprise', 'analytics'],
  },

  // ─── DEVOPS / INFRASTRUCTURE (2 models) ───────────────────────────
  {
    name: 'gorilla',
    tag: '7b',
    displayName: 'Gorilla 7B',
    category: 'CODING',
    description: 'API and tool-use specialist. Generates correct API calls from natural language.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'gorilla:7b',
    isRecommended: false,
    capabilities: ['api_generation', 'tool_use', 'function_calling'],
  },
  {
    name: 'k8sgpt',
    tag: '7b',
    displayName: 'K8sGPT 7B',
    category: 'CODING',
    description: 'Kubernetes-specialized model for cluster management and troubleshooting.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'k8sgpt:7b',
    isRecommended: false,
    capabilities: ['kubernetes', 'devops', 'troubleshooting'],
  },

  // ─── AUDIO / SPEECH (2 models) ────────────────────────────────────
  {
    name: 'whisper',
    tag: 'large-v3',
    displayName: 'Whisper Large v3',
    category: 'GENERAL',
    description: 'Speech-to-text transcription model. 99 languages, timestamps, translation.',
    sizeBytes: BigInt(3_000_000_000),
    parameterCount: '1.5B',
    runtime: 'OLLAMA',
    ollamaName: 'whisper:large-v3',
    isRecommended: false,
    capabilities: ['transcription', 'translation', '99_languages', 'timestamps'],
  },
  {
    name: 'bark',
    tag: 'latest',
    displayName: 'Bark TTS',
    category: 'GENERAL',
    description: 'Text-to-speech model with voice cloning and emotion control.',
    sizeBytes: BigInt(5_000_000_000),
    parameterCount: '~5B',
    runtime: 'OLLAMA',
    ollamaName: 'bark',
    isRecommended: false,
    capabilities: ['text_to_speech', 'voice_cloning', 'emotion', 'music'],
  },

  // ─── SPECIALIZED REASONING (3 models) ─────────────────────────────
  {
    name: 'llemma',
    tag: '34b',
    displayName: 'Llemma 34B',
    category: 'REASONING',
    description: 'Mathematics-specialized LLM. Formal proofs, LaTeX, theorem proving.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '34B',
    runtime: 'OLLAMA',
    ollamaName: 'llemma:34b',
    isRecommended: false,
    capabilities: ['mathematics', 'formal_proof', 'latex', 'theorem'],
  },
  {
    name: 'llemma',
    tag: '7b',
    displayName: 'Llemma 7B',
    category: 'REASONING',
    description: 'Compact mathematics model for formal proofs and LaTeX generation.',
    sizeBytes: BigInt(4_500_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'llemma:7b',
    isRecommended: false,
    capabilities: ['mathematics', 'formal_proof'],
  },
  {
    name: 'metamath',
    tag: '13b',
    displayName: 'MetaMath 13B',
    category: 'REASONING',
    description: 'Math reasoning model trained on augmented mathematical datasets.',
    sizeBytes: BigInt(8_500_000_000),
    parameterCount: '13B',
    runtime: 'OLLAMA',
    ollamaName: 'metamath:13b',
    isRecommended: false,
    capabilities: ['math_reasoning', 'word_problems', 'algebra'],
  },

  // ─── GLM-5 SERIES (5 models) — Zhipu AI next-gen ─────────────────
  {
    name: 'glm5.1',
    tag: 'latest',
    displayName: 'GLM-5.1',
    category: 'THINKING',
    description:
      'Zhipu AI flagship agentic model. Top-tier tool-use, multi-step reasoning, code generation. Successor to GLM-4.7 Thinking.',
    sizeBytes: BigInt(6_000_000_000),
    parameterCount: '9B',
    runtime: 'OLLAMA',
    ollamaName: 'glm-5.1:cloud',
    isRecommended: true,
    capabilities: ['agentic', 'tool_use', 'thinking', 'code_generation', 'research'],
  },
  {
    name: 'glm5',
    tag: 'latest',
    displayName: 'GLM-5',
    category: 'THINKING',
    description:
      'Zhipu AI GLM-5 flagship — dense 30B architecture with strong agentic and long-context reasoning. Outperforms GLM-4 on benchmarks.',
    sizeBytes: BigInt(20_000_000_000),
    parameterCount: '30B',
    runtime: 'OLLAMA',
    ollamaName: 'glm-5:cloud',
    isRecommended: false,
    capabilities: ['agentic', 'thinking', 'long_context', 'reasoning', 'tool_use'],
  },
  {
    name: 'glm5-turbo',
    tag: 'latest',
    displayName: 'GLM-5-Turbo',
    category: 'THINKING',
    description:
      'Fast agentic variant of GLM-5. Lower latency for interactive tool-use and research tasks. Best GLM per VRAM dollar.',
    sizeBytes: BigInt(6_000_000_000),
    parameterCount: '9B',
    runtime: 'OLLAMA',
    ollamaName: 'glm5-turbo:latest',
    isRecommended: false,
    capabilities: ['agentic', 'fast_generation', 'tool_use', 'thinking'],
  },
  {
    name: 'glm4.7',
    tag: 'latest',
    displayName: 'GLM-4.7',
    category: 'GENERAL',
    description:
      'Zhipu AI GLM-4.7 base instruction model. Strong multilingual, code, and dialogue. Runs on 6–8GB VRAM.',
    sizeBytes: BigInt(3_200_000_000),
    parameterCount: '4.7B',
    runtime: 'OLLAMA',
    ollamaName: 'glm-4.7:cloud',
    isRecommended: false,
    capabilities: ['general_chat', 'multilingual', 'code_generation', 'instruction_following'],
  },
  {
    name: 'glm4.5-air',
    tag: 'latest',
    displayName: 'GLM-4.5 Air',
    category: 'GENERAL',
    description:
      'Lightweight GLM-4.5 variant optimized for edge deployment. Sub-4GB, strong Chinese/English bilingual performance.',
    sizeBytes: BigInt(2_500_000_000),
    parameterCount: '3B',
    runtime: 'OLLAMA',
    ollamaName: 'glm4.5-air:latest',
    isRecommended: false,
    capabilities: ['general_chat', 'bilingual', 'lightweight', 'instruction_following'],
  },

  // ─── GEMMA 4 SERIES (4 models) — Google DeepMind ─────────────────
  {
    name: 'gemma4',
    tag: '31b',
    displayName: 'Gemma 4 31B',
    category: 'GENERAL',
    description:
      'Google DeepMind Gemma 4 dense 31B. Multimodal (text + vision), 128K context, strong reasoning. Best open Gemma yet.',
    sizeBytes: BigInt(20_000_000_000),
    parameterCount: '31B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:31b',
    isRecommended: true,
    capabilities: ['general_chat', 'vision', 'long_context', 'reasoning', 'multilingual'],
  },
  {
    name: 'gemma4',
    tag: '26b-a4b',
    displayName: 'Gemma 4 26B A4B',
    category: 'THINKING',
    description:
      'Gemma 4 MoE 26B total / 4B active. Near 31B quality at a fraction of the compute. Ideal for agentic pipelines.',
    sizeBytes: BigInt(17_000_000_000),
    parameterCount: '26B (4B active)',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:26b',
    isRecommended: false,
    capabilities: ['agentic', 'thinking', 'moe', 'fast_generation', 'reasoning'],
  },
  {
    name: 'gemma4',
    tag: 'e4b',
    displayName: 'Gemma 4 E4B',
    category: 'THINKING',
    description:
      'Gemma 4 Expert 4B — distilled expert model with strong instruction-following and tool-use in 4B parameters.',
    sizeBytes: BigInt(2_800_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:e4b',
    isRecommended: false,
    capabilities: ['thinking', 'tool_use', 'instruction_following', 'lightweight'],
  },
  {
    name: 'gemma4',
    tag: 'e2b',
    displayName: 'Gemma 4 E2B',
    category: 'ROUTING',
    description:
      'Gemma 4 Expert 2B — ultra-compact model for routing, classification, and edge inference. <200ms.',
    sizeBytes: BigInt(1_400_000_000),
    parameterCount: '2B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:e2b',
    isRecommended: false,
    capabilities: ['ultra_fast', 'classification', 'routing', 'lightweight'],
  },

  // ─── QWEN 3.5 / FRONTIER SERIES (5 models) ───────────────────────
  {
    name: 'qwen3.5',
    tag: '72b',
    displayName: 'Qwen 3.5 72B',
    category: 'THINKING',
    description:
      'Alibaba Qwen 3.5 dense 72B. Hybrid think/no-think modes, 128K context, top-tier tool-use and long reasoning.',
    sizeBytes: BigInt(46_000_000_000),
    parameterCount: '72B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:72b',
    isRecommended: true,
    capabilities: ['thinking', 'tool_use', 'long_context', 'reasoning', 'multilingual'],
  },
  {
    name: 'qwen3.5-omni',
    tag: 'latest',
    displayName: 'Qwen3.5-Omni',
    category: 'THINKING',
    description:
      'Qwen multimodal flagship — text, image, audio, video understanding in one model. Strong agentic and function-calling.',
    sizeBytes: BigInt(25_000_000_000),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5-omni:latest',
    isRecommended: false,
    capabilities: ['multimodal', 'vision', 'audio', 'thinking', 'agentic', 'tool_use'],
  },
  {
    name: 'qwen3-coder',
    tag: 'next',
    displayName: 'Qwen3-Coder-Next',
    category: 'CODING',
    description:
      'Qwen next-generation coder with agentic coding, repo-level context, and built-in test generation. Successor to Qwen 2.5 Coder.',
    sizeBytes: BigInt(21_000_000_000),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3-coder-next:latest',
    isRecommended: true,
    capabilities: ['code_generation', 'agentic', 'repo_level', 'test_generation', 'debugging'],
  },
  {
    name: 'qwen3',
    tag: '80b-a3b',
    displayName: 'Qwen3 80B A3B',
    category: 'THINKING',
    description:
      'Qwen3 MoE 80B total / 3B active. Massive capacity with ultra-low inference cost. Strong multi-step reasoning.',
    sizeBytes: BigInt(50_000_000_000),
    parameterCount: '80B (3B active)',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:80b-a3b',
    isRecommended: false,
    capabilities: ['thinking', 'moe', 'reasoning', 'long_context', 'tool_use'],
  },
  {
    name: 'qwen3',
    tag: '235b',
    displayName: 'Qwen3 235B',
    category: 'THINKING',
    description:
      'Qwen3 ultra-flagship dense 235B. Matches frontier cloud models. Best open model for deep research and complex reasoning.',
    sizeBytes: BigInt(140_000_000_000),
    parameterCount: '235B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3:235b',
    isRecommended: false,
    capabilities: ['thinking', 'deep_research', 'reasoning', 'long_context', 'tool_use'],
  },

  // ─── MISTRAL SMALL 4 / DEVSTRAL SERIES (3 models) ────────────────
  {
    name: 'mistral-small4',
    tag: '22b',
    displayName: 'Mistral Small 4 22B',
    category: 'GENERAL',
    description:
      'Mistral Small 4 — major upgrade with vision, 128K context, strong function-calling. Best small Mistral to date.',
    sizeBytes: BigInt(14_000_000_000),
    parameterCount: '22B',
    runtime: 'OLLAMA',
    ollamaName: 'mistral-small4:22b',
    isRecommended: true,
    capabilities: ['general_chat', 'vision', 'function_calling', 'long_context', 'fast_generation'],
  },
  {
    name: 'devstral',
    tag: '24b',
    displayName: 'Devstral 2 24B',
    category: 'CODING',
    description:
      'Mistral coding agent MoE. Best open agentic coding model — SWE-Bench 46.8%. Designed for autonomous software engineering.',
    sizeBytes: BigInt(15_000_000_000),
    parameterCount: '24B (active MoE)',
    runtime: 'OLLAMA',
    ollamaName: 'devstral:24b',
    isRecommended: true,
    capabilities: ['agentic', 'code_generation', 'debugging', 'repo_level', 'code_review'],
  },
  {
    name: 'devstral-small',
    tag: '7b',
    displayName: 'Devstral Small 2 7B',
    category: 'CODING',
    description:
      'Compact Devstral for fast autonomous coding. Runs on 8GB VRAM. Strong SWE-Bench performance for its size.',
    sizeBytes: BigInt(4_800_000_000),
    parameterCount: '7B',
    runtime: 'OLLAMA',
    ollamaName: 'devstral-small:7b',
    isRecommended: false,
    capabilities: ['agentic', 'code_generation', 'debugging', 'lightweight'],
  },

  // ─── DEEPSEEK NEW VARIANTS (3 models) ────────────────────────────
  {
    name: 'deepseek-v3.2',
    tag: 'special',
    displayName: 'DeepSeek-V3.2 Special',
    category: 'THINKING',
    description:
      'DeepSeek V3.2 Special Edition — enhanced context window and improved agentic tool-use. 128K context, think-in-tool-call support.',
    sizeBytes: BigInt(40_000_000_000),
    parameterCount: '671B (37B active)',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-v3.2:cloud',
    isRecommended: false,
    capabilities: ['thinking', 'agentic', 'tool_use', 'long_context', 'research'],
  },
  {
    name: 'deepseek-v3.1',
    tag: 'latest',
    displayName: 'DeepSeek V3.1',
    category: 'THINKING',
    description:
      'DeepSeek V3.1 MoE — improved instruction-following and coding over V3. Strong general-purpose with tool-use.',
    sizeBytes: BigInt(38_000_000_000),
    parameterCount: '671B (37B active)',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-v3.1:latest',
    isRecommended: false,
    capabilities: ['thinking', 'tool_use', 'code_generation', 'research', 'deep_analysis'],
  },
  {
    name: 'deepseek-r1',
    tag: '0528',
    displayName: 'DeepSeek R1 0528',
    category: 'REASONING',
    description:
      'DeepSeek R1 May 2026 distillation — strongest open reasoning model. Surpasses o1 on MATH-500 and AIME. Pure chain-of-thought.',
    sizeBytes: BigInt(21_000_000_000),
    parameterCount: '32B',
    runtime: 'OLLAMA',
    ollamaName: 'deepseek-r1:32b',
    isRecommended: true,
    capabilities: ['chain_of_thought', 'math', 'logic', 'analysis', 'problem_solving', 'aime'],
  },

  // ─── PHI-4 EXPANDED FAMILY (5 models) ────────────────────────────
  {
    name: 'phi4',
    tag: 'base',
    displayName: 'Phi-4 Base 14B',
    category: 'GENERAL',
    description:
      'Microsoft Phi-4 pre-trained base model. Excellent for fine-tuning and few-shot tasks. Beats GPT-4o-mini on MMLU.',
    sizeBytes: BigInt(9_663_676_416),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4:14b',
    isRecommended: false,
    capabilities: ['general_chat', 'few_shot', 'instruction_following', 'math', 'reasoning'],
  },
  {
    name: 'phi4-mini',
    tag: 'chat',
    displayName: 'Phi-4-mini Chat 3.8B',
    category: 'GENERAL',
    description:
      'Microsoft Phi-4-mini optimized for chat. Strong reasoning at 3.8B. Best small chat model from Microsoft.',
    sizeBytes: BigInt(2_469_606_195),
    parameterCount: '3.8B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4-mini:3.8b',
    isRecommended: false,
    capabilities: ['general_chat', 'reasoning', 'fast_generation', 'lightweight', 'math'],
  },
  {
    name: 'phi4-multimodal',
    tag: '14b',
    displayName: 'Phi-4 Multimodal 14B',
    category: 'GENERAL',
    description:
      'Microsoft Phi-4 with vision and audio. Understands images, charts, PDFs, and audio inputs. Best multimodal small model.',
    sizeBytes: BigInt(9_663_676_416),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4-multimodal:14b',
    isRecommended: true,
    capabilities: ['vision', 'audio', 'multimodal', 'reasoning', 'ocr', 'chart_understanding'],
  },
  {
    name: 'phi4-reasoning',
    tag: '15b-vision',
    displayName: 'Phi-4 Reasoning Vision 15B',
    category: 'THINKING',
    description:
      'Microsoft Phi-4 Reasoning with visual chain-of-thought. Solves math problems from images. Strong STEM+vision hybrid.',
    sizeBytes: BigInt(10_000_000_000),
    parameterCount: '15B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4-reasoning:latest',
    isRecommended: false,
    capabilities: ['thinking', 'vision', 'chain_of_thought', 'math', 'reasoning', 'ocr'],
  },
  {
    name: 'phi4-mini',
    tag: 'reasoning',
    displayName: 'Phi-4-mini Reasoning 3.8B',
    category: 'REASONING',
    description:
      'Microsoft Phi-4-mini with chain-of-thought tuning. Surprisingly strong MATH benchmark at just 3.8B. Best tiny reasoning model.',
    sizeBytes: BigInt(2_469_606_195),
    parameterCount: '3.8B',
    runtime: 'OLLAMA',
    ollamaName: 'phi4-mini:3.8b',
    isRecommended: false,
    capabilities: ['chain_of_thought', 'math', 'reasoning', 'lightweight', 'fast_generation'],
  },

  // ─── QWEN 3.5 (7 tags) — user-requested; 72B does not exist, 35B MoE + 27B dense are closest ───
  {
    name: 'qwen3.5',
    tag: '0.8b',
    displayName: 'Qwen 3.5 0.8B',
    category: 'GENERAL',
    description: 'Lightweight Qwen 3.5 with 256K context, multilingual + vision.',
    sizeBytes: BigInt(600_000_000),
    parameterCount: '0.8B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:0.8b',
    isRecommended: false,
    capabilities: ['general_chat', 'multilingual', 'vision'],
  },
  {
    name: 'qwen3.5',
    tag: '2b',
    displayName: 'Qwen 3.5 2B',
    category: 'GENERAL',
    description: 'Small, efficient Qwen 3.5 with 256K context and vision.',
    sizeBytes: BigInt(1_500_000_000),
    parameterCount: '2B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:2b',
    isRecommended: false,
    capabilities: ['general_chat', 'multilingual', 'vision'],
  },
  {
    name: 'qwen3.5',
    tag: '4b',
    displayName: 'Qwen 3.5 4B',
    category: 'GENERAL',
    description: 'Mid-size Qwen 3.5 with strong multilingual and vision capabilities.',
    sizeBytes: BigInt(2_800_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:4b',
    isRecommended: false,
    capabilities: ['general_chat', 'multilingual', 'vision'],
  },
  {
    name: 'qwen3.5',
    tag: '9b',
    displayName: 'Qwen 3.5 9B',
    category: 'GENERAL',
    description:
      'Default Qwen 3.5 with 256K context, vision, and strong general reasoning. Recommended for daily use.',
    sizeBytes: BigInt(6_200_000_000),
    parameterCount: '9B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:9b',
    isRecommended: true,
    capabilities: ['general_chat', 'reasoning', 'multilingual', 'vision', 'long_context'],
  },
  {
    name: 'qwen3.5',
    tag: '27b',
    displayName: 'Qwen 3.5 27B',
    category: 'REASONING',
    description: 'Large Qwen 3.5 for advanced reasoning tasks with 256K context.',
    sizeBytes: BigInt(17_000_000_000),
    parameterCount: '27B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:27b',
    isRecommended: false,
    capabilities: ['reasoning', 'multilingual', 'vision', 'long_context'],
  },
  {
    name: 'qwen3.5',
    tag: '35b',
    displayName: 'Qwen 3.5 35B (MoE)',
    category: 'REASONING',
    description:
      'Mixture-of-Experts Qwen 3.5 with 35B active parameters, optimized for reasoning. Closest to user-requested 72B.',
    sizeBytes: BigInt(22_000_000_000),
    parameterCount: '35B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:35b',
    isRecommended: false,
    capabilities: ['reasoning', 'multilingual', 'long_context'],
  },
  {
    name: 'qwen3.5',
    tag: '122b',
    displayName: 'Qwen 3.5 122B (MoE)',
    category: 'THINKING',
    description: 'Flagship Qwen 3.5 MoE, 122B parameters with 256K context. Needs 80+GB VRAM.',
    sizeBytes: BigInt(73_000_000_000),
    parameterCount: '122B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.5:122b',
    isRecommended: false,
    capabilities: ['reasoning', 'thinking', 'multilingual', 'vision', 'long_context'],
  },

  // ─── QWEN 3.6 (user-requested) — agentic coding + thinking preservation ───
  {
    name: 'qwen3.6',
    tag: 'latest',
    displayName: 'Qwen 3.6 (latest)',
    category: 'CODING',
    description:
      'Next-gen Qwen 3.6 MoE specialized for agentic coding and thinking preservation. 256K context, vision-capable. Tracks the recommended default tag.',
    sizeBytes: BigInt(24_000_000_000),
    parameterCount: '35B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.6:latest',
    isRecommended: true,
    capabilities: ['code_generation', 'reasoning', 'thinking', 'agentic', 'vision', 'long_context'],
  },
  {
    name: 'qwen3.6',
    tag: '35b',
    displayName: 'Qwen 3.6 35B A3B (MoE)',
    category: 'CODING',
    description:
      'Next-gen Qwen 3.6 MoE with 35B parameters (3B active), specialized for agentic coding and thinking preservation. 256K context.',
    sizeBytes: BigInt(24_000_000_000),
    parameterCount: '35B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3.6:35b',
    isRecommended: true,
    capabilities: ['code_generation', 'reasoning', 'thinking', 'agentic', 'vision', 'long_context'],
  },

  // ─── MEDGEMMA (user-requested) — restricted research license ───
  {
    name: 'medgemma1.5',
    tag: '4b',
    displayName: 'MedGemma 1.5 4B',
    category: 'MEDICAL',
    description:
      'Google medical-domain Gemma variant tuned for clinical reasoning. License: HAI-DEF RESTRICTED_RESEARCH — not for production use.',
    sizeBytes: BigInt(3_300_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'medgemma1.5:4b',
    isRecommended: false,
    capabilities: ['reasoning', 'medical', 'restricted_license'],
  },
  {
    name: 'medgemma',
    tag: '4b',
    displayName: 'MedGemma 4B',
    category: 'MEDICAL',
    description: 'Base MedGemma 4B for medical text. License: RESTRICTED_RESEARCH.',
    sizeBytes: BigInt(3_300_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'medgemma:4b',
    isRecommended: false,
    capabilities: ['reasoning', 'medical', 'restricted_license'],
  },
  {
    name: 'medgemma',
    tag: '27b',
    displayName: 'MedGemma 27B',
    category: 'MEDICAL',
    description: 'Large MedGemma 27B for deep medical reasoning. License: RESTRICTED_RESEARCH.',
    sizeBytes: BigInt(17_000_000_000),
    parameterCount: '27B',
    runtime: 'OLLAMA',
    ollamaName: 'medgemma:27b',
    isRecommended: false,
    capabilities: ['reasoning', 'medical', 'long_context', 'restricted_license'],
  },

  // ─── GEMMA 4 (user-requested) — audio-enabled + MoE variants ───
  {
    name: 'gemma4',
    tag: 'e2b',
    displayName: 'Gemma 4 E2B (audio)',
    category: 'GENERAL',
    description: 'Gemma 4 "E" variant with audio support. 7.2GB.',
    sizeBytes: BigInt(7_200_000_000),
    parameterCount: '2B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:e2b',
    isRecommended: false,
    capabilities: ['general_chat', 'audio'],
  },
  {
    name: 'gemma4',
    tag: 'e4b',
    displayName: 'Gemma 4 E4B (audio)',
    category: 'GENERAL',
    description: 'Gemma 4 "E" variant with audio support. 9.6GB.',
    sizeBytes: BigInt(9_600_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:e4b',
    isRecommended: false,
    capabilities: ['general_chat', 'audio'],
  },
  {
    name: 'gemma4',
    tag: '26b',
    displayName: 'Gemma 4 26B (MoE)',
    category: 'THINKING',
    description: 'Gemma 4 Mixture-of-Experts with 26B parameters and 256K context.',
    sizeBytes: BigInt(18_000_000_000),
    parameterCount: '26B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:26b',
    isRecommended: false,
    capabilities: ['thinking', 'reasoning', 'long_context'],
  },
  {
    name: 'gemma4',
    tag: '31b',
    displayName: 'Gemma 4 31B',
    category: 'THINKING',
    description: 'Gemma 4 dense 31B with 256K context.',
    sizeBytes: BigInt(20_000_000_000),
    parameterCount: '31B',
    runtime: 'OLLAMA',
    ollamaName: 'gemma4:31b',
    isRecommended: false,
    capabilities: ['thinking', 'reasoning', 'long_context'],
  },

  // ─── TRENDING FROM ollama.com/search (2026-04-24 snapshot) ───
  {
    name: 'qwen3-coder-next',
    tag: 'latest',
    displayName: 'Qwen 3 Coder Next',
    category: 'CODING',
    description: 'Next-generation Qwen coder with long-context code understanding.',
    sizeBytes: null,
    parameterCount: null,
    runtime: 'OLLAMA',
    ollamaName: 'qwen3-coder-next:latest',
    isRecommended: true,
    capabilities: ['code_generation', 'code_completion', 'long_context'],
  },
  {
    name: 'glm-4.7-flash',
    tag: 'latest',
    displayName: 'GLM 4.7 Flash',
    category: 'GENERAL',
    description: 'Fast GLM 4.7 Flash variant for low-latency chat.',
    sizeBytes: null,
    parameterCount: null,
    runtime: 'OLLAMA',
    ollamaName: 'glm-4.7-flash:latest',
    isRecommended: false,
    capabilities: ['general_chat', 'low_latency'],
  },
  {
    name: 'lfm2.5-thinking',
    tag: '1.2b',
    displayName: 'LFM 2.5 Thinking 1.2B',
    category: 'THINKING',
    description: 'Liquid Thinking variant — compact chain-of-thought model.',
    sizeBytes: BigInt(900_000_000),
    parameterCount: '1.2B',
    runtime: 'OLLAMA',
    ollamaName: 'lfm2.5-thinking:1.2b',
    isRecommended: false,
    capabilities: ['thinking', 'reasoning', 'chain_of_thought'],
  },
  {
    name: 'translategemma',
    tag: '4b',
    displayName: 'TranslateGemma 4B',
    category: 'TRANSLATION',
    description: 'Gemma fine-tune specialized for multilingual translation.',
    sizeBytes: BigInt(3_300_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'translategemma:4b',
    isRecommended: true,
    capabilities: ['translation', 'multilingual'],
  },
  {
    name: 'translategemma',
    tag: '12b',
    displayName: 'TranslateGemma 12B',
    category: 'TRANSLATION',
    description: 'Mid-size TranslateGemma for higher-quality multilingual translation.',
    sizeBytes: BigInt(8_000_000_000),
    parameterCount: '12B',
    runtime: 'OLLAMA',
    ollamaName: 'translategemma:12b',
    isRecommended: false,
    capabilities: ['translation', 'multilingual'],
  },
  {
    name: 'translategemma',
    tag: '27b',
    displayName: 'TranslateGemma 27B',
    category: 'TRANSLATION',
    description: 'Large TranslateGemma for professional-grade translation quality.',
    sizeBytes: BigInt(17_000_000_000),
    parameterCount: '27B',
    runtime: 'OLLAMA',
    ollamaName: 'translategemma:27b',
    isRecommended: false,
    capabilities: ['translation', 'multilingual', 'long_context'],
  },
  {
    name: 'ministral-3',
    tag: '3b',
    displayName: 'Ministral 3 3B',
    category: 'GENERAL',
    description: 'Mistral Ministral 3 3B edge model for fast on-device inference.',
    sizeBytes: BigInt(2_100_000_000),
    parameterCount: '3B',
    runtime: 'OLLAMA',
    ollamaName: 'ministral-3:3b',
    isRecommended: false,
    capabilities: ['general_chat', 'lightweight'],
  },
  {
    name: 'ministral-3',
    tag: '8b',
    displayName: 'Ministral 3 8B',
    category: 'GENERAL',
    description: 'Mistral Ministral 3 8B — balanced quality vs latency.',
    sizeBytes: BigInt(5_500_000_000),
    parameterCount: '8B',
    runtime: 'OLLAMA',
    ollamaName: 'ministral-3:8b',
    isRecommended: false,
    capabilities: ['general_chat'],
  },
  {
    name: 'ministral-3',
    tag: '14b',
    displayName: 'Ministral 3 14B',
    category: 'GENERAL',
    description: 'Mistral Ministral 3 14B dense chat model.',
    sizeBytes: BigInt(9_500_000_000),
    parameterCount: '14B',
    runtime: 'OLLAMA',
    ollamaName: 'ministral-3:14b',
    isRecommended: false,
    capabilities: ['general_chat', 'reasoning'],
  },
  {
    name: 'devstral-small-2',
    tag: '24b',
    displayName: 'Devstral Small 2 24B',
    category: 'CODING',
    description: 'Mistral Devstral Small 2 — developer-focused 24B for repo-scale coding.',
    sizeBytes: BigInt(16_000_000_000),
    parameterCount: '24B',
    runtime: 'OLLAMA',
    ollamaName: 'devstral-small-2:24b',
    isRecommended: false,
    capabilities: ['code_generation', 'code_completion', 'agentic'],
  },
  {
    name: 'nemotron-3-super',
    tag: '120b',
    displayName: 'Nemotron 3 Super 120B',
    category: 'REASONING',
    description: 'NVIDIA Nemotron 3 Super — flagship 120B agentic reasoning model.',
    sizeBytes: BigInt(70_000_000_000),
    parameterCount: '120B',
    runtime: 'OLLAMA',
    ollamaName: 'nemotron-3-super:120b',
    isRecommended: false,
    capabilities: ['reasoning', 'agentic', 'long_context'],
  },
  {
    name: 'nemotron-3-nano',
    tag: '4b',
    displayName: 'Nemotron 3 Nano 4B',
    category: 'REASONING',
    description: 'NVIDIA Nemotron 3 Nano — compact 4B reasoning model.',
    sizeBytes: BigInt(2_800_000_000),
    parameterCount: '4B',
    runtime: 'OLLAMA',
    ollamaName: 'nemotron-3-nano:4b',
    isRecommended: false,
    capabilities: ['reasoning', 'lightweight'],
  },
  {
    name: 'nemotron-3-nano',
    tag: '30b',
    displayName: 'Nemotron 3 Nano 30B',
    category: 'REASONING',
    description: 'NVIDIA Nemotron 3 Nano 30B dense reasoning model.',
    sizeBytes: BigInt(20_000_000_000),
    parameterCount: '30B',
    runtime: 'OLLAMA',
    ollamaName: 'nemotron-3-nano:30b',
    isRecommended: false,
    capabilities: ['reasoning'],
  },
  {
    name: 'nemotron-cascade-2',
    tag: '30b',
    displayName: 'Nemotron Cascade 2 30B',
    category: 'REASONING',
    description: 'NVIDIA Nemotron Cascade 2 — chain-of-thought 30B model.',
    sizeBytes: BigInt(20_000_000_000),
    parameterCount: '30B',
    runtime: 'OLLAMA',
    ollamaName: 'nemotron-cascade-2:30b',
    isRecommended: false,
    capabilities: ['reasoning', 'chain_of_thought'],
  },
  {
    name: 'glm-ocr',
    tag: 'latest',
    displayName: 'GLM OCR',
    category: 'VISION',
    description: 'Zhipu GLM-OCR — vision + OCR model for document understanding.',
    sizeBytes: null,
    parameterCount: null,
    runtime: 'OLLAMA',
    ollamaName: 'glm-ocr:latest',
    isRecommended: false,
    capabilities: ['ocr', 'vision'],
  },
  {
    name: 'qwen3-next',
    tag: '80b',
    displayName: 'Qwen 3 Next 80B',
    category: 'THINKING',
    description: 'Qwen 3 Next 80B — evolved Qwen 3 generation with MoE and long context.',
    sizeBytes: BigInt(48_000_000_000),
    parameterCount: '80B',
    runtime: 'OLLAMA',
    ollamaName: 'qwen3-next:80b',
    isRecommended: false,
    capabilities: ['thinking', 'reasoning', 'long_context', 'multilingual'],
  },
  {
    name: 'lfm2',
    tag: '24b',
    displayName: 'LFM 2 24B',
    category: 'GENERAL',
    description: 'Liquid Foundation Model 2 24B — dense general chat + reasoning model.',
    sizeBytes: BigInt(16_000_000_000),
    parameterCount: '24B',
    runtime: 'OLLAMA',
    ollamaName: 'lfm2:24b',
    isRecommended: false,
    capabilities: ['general_chat', 'reasoning'],
  },
] as const;

const REGISTRY_CATALOG_ENTRY_KEYS = new Set(
  REGISTRY_CATALOG_ENTRIES.map((entry) => `${entry.name}:${entry.tag}:${entry.runtime}`),
);

const VALID_RAW_CATALOG_ENTRIES = RAW_CATALOG_ENTRIES.filter((entry) => {
  if (entry.runtime !== 'OLLAMA') {
    return true;
  }

  const taggedKey = `${entry.name}:${entry.tag}`;
  const ollamaKey = entry.ollamaName ?? taggedKey;
  const [ollamaName = entry.name, ollamaTag = entry.tag] = ollamaKey.split(':');
  const rawKey = `${entry.name}:${entry.tag}:${entry.runtime}`;
  const ollamaReferenceKey = `${ollamaName}:${ollamaTag}:${entry.runtime}`;

  return (
    REGISTRY_CATALOG_ENTRY_KEYS.has(rawKey) || REGISTRY_CATALOG_ENTRY_KEYS.has(ollamaReferenceKey)
  );
});

// REGISTRY entries come first so hand-curated RAW entries can override their
// auto-generated category/description/isRecommended. The dedup Map keeps the last
// write per (name, tag, runtime), so RAW wins — which is the intent since registry
// entries get generic categories like "VISION" that don't match our routing logic.
const MERGED_CATALOG_ENTRIES = [...REGISTRY_CATALOG_ENTRIES, ...VALID_RAW_CATALOG_ENTRIES];

const DEDUPED_CATALOG_ENTRIES = [
  ...new Map(
    MERGED_CATALOG_ENTRIES.map((entry) => [`${entry.name}:${entry.tag}:${entry.runtime}`, entry]),
  ).values(),
];

export const CATALOG_ENTRIES = DEDUPED_CATALOG_ENTRIES.filter((entry) => {
  const taggedKey = `${entry.name}:${entry.tag}`;
  const ollamaKey = entry.ollamaName ?? taggedKey;
  const [ollamaName = entry.name, ollamaTag] = ollamaKey.split(':');

  return (
    !isDeprecatedDefaultLocalModel(entry.name, entry.tag) &&
    !isDeprecatedDefaultLocalModel(ollamaName, ollamaTag)
  );
});
