"""Shared model definitions for Hermes local model management.

Single source of truth — both auto-model-switch.py and model-health-watchdog.py import from here.
Add/edit models in ONE place.

LIVE PATH: ~/.hermes/scripts/models.py (systemd + cron reference this path)
This copy is canonical for reference.

⚠️ If this file has Q4_K_M quants in the model names BELOW, it is STALE.
The live copy at ~/.hermes/scripts/models.py has the correct quant names (Q4_K_S, Q6_K, etc.)
and includes all models (Qwen3-8B, Qwen3-4B-2507, Qwen3-14B, Gemma QAT).
Run diff to sync if needed.
"""

MODELS = [
    {
        "name": "Qwen3.6-35B",
        "desc": "🌟 BEST DAILY DRIVER: biggest brain, reasoning, coding, creative",
        "detail": "MoE 35B (3B active/tok) — UD Q4_K_S from tvall43. Big gun for complex reasoning, multi-file refactors, long creative tasks. ~20GB at Q4 so needs --n-cpu-moe offloading on 11GB VRAM.",
        "service": "llama-server.service",
        "port": 8081,
        "provider": "custom:local",
        "model_name": "Qwen3.6-35B-A3B-UD-Q4_K_S.gguf",
        "context": 128000,
        "short": "35b",
    },
    {
        "name": "Qwen3.5-9B",
        "desc": "🔓 UNCENSORED 9B: abliterated, no refusals, general chat & creative",
        "detail": "9B dense HauhauCS Aggressive Q6_K. Popular abliterated finetune, 0 refusals. Fits entirely on GPU. Must use --jinja flag.",
        "service": "llama-server-9b.service",
        "port": 8082,
        "provider": "custom:local",
        "model_name": "Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-Q6_K.gguf",
        "context": 64000,
        "short": "9b",
    },
    {
        "name": "Qwen3-8B",
        "desc": "⚡ QWEN3-8B: fast dense 8B, solid all-rounder for quick tasks",
        "detail": "8B dense Qwen3 UD Q6_K_XL. ~50-80 t/s on 1080 Ti. Full GPU fit.",
        "service": "llama-server-qwen8b.service",
        "port": 8086,
        "provider": "custom:local",
        "model_name": "Qwen3-8B-UD-Q6_K_XL.gguf",
        "context": 65536,
        "short": "8b",
    },
    {
        "name": "SmolLM3-3B",
        "desc": "🏎️ SMOLM3-3B: CPU-only, tiny/fast, for Hindsight memory",
        "detail": "3B SmolLM Q4_K_M — CPU-only (-ngl 0) on port 8087 for Hindsight memory. Do NOT switch this service via model-switcher.",
        "service": "llama-server-smol.service",
        "port": 8087,
        "provider": "custom:local",
        "model_name": "HuggingFaceTB_SmolLM3-3B-Q4_K_M.gguf",
        "context": 16384,
        "short": "smol",
    },
    {
        "name": "Qwen3-14B",
        "desc": "⚡ QWEN3-14B: dense 14B, fast ~25 t/s, solid all-rounder replacement",
        "detail": "14B dense Qwen3 UD Q4_K_XL. Full GPU fit. ~25 t/s gen, ~135-200 t/s prompt processing.",
        "service": "llama-server-qwen14b.service",
        "port": 8088,
        "provider": "custom:local",
        "model_name": "Qwen3-14B-UD-Q4_K_XL.gguf",
        "context": 65536,
        "short": "14b",
    },
    {
        "name": "Qwen3-4B-2507",
        "desc": "⚡ QWEN3-4B-2507: newest tiny Qwen, Q8 for quality, full GPU fit",
        "detail": "4B Qwen3-4B-Instruct-2507 UD Q8_K_XL. Full GPU fit. Fastest local option.",
        "service": "llama-server-qwen4b.service",
        "port": 8092,
        "provider": "custom:local",
        "model_name": "Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf",
        "context": 131072,
        "short": "4b",
    },
    {
        "name": "Gemma-4-26B-A4B",
        "desc": "🚀 GEMMA 4: Google's MoE, native vision, 256K ctx, 24 t/s",
        "detail": "MoE 26B (8 active/tok) UD-Q4_K_XL. Native 256K ctx (set to 128K). Full vision support via mmproj on CPU. ~24 t/s gen, ~40-55 t/s prompt. --n-cpu-moe 128. ~10GB/11GB VRAM.",
        "service": "llama-server-gemma4.service",
        "port": 8090,
        "provider": "custom:local",
        "model_name": "gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf",
        "context": 131072,
        "short": "gemma4",
    },
    {
        "name": "Gemma-3-12B",
        "desc": "🌟 GEMMA 3 12B: Google's 12B, native 128K ctx, UD uncensored variant",
        "detail": "12B dense Gemma 3 UD-Q5_K_XL. Full GPU (-ngl 99, ~7.7GB VRAM). ~20 t/s gen, ~120-150 t/s prompt. Native 128K ctx. Turbo4 KV. Text-only GGUF.",
        "service": "llama-server-gemma3.service",
        "port": 8089,
        "provider": "custom:local",
        "model_name": "gemma-3-12b-it-UD-Q5_K_XL.gguf",
        "context": 131072,
        "short": "gemma3",
    },
    {
        "name": "Gemma-3-12B-QAT",
        "desc": "🔬 GEMMA 3 12B QAT: quantization-aware-trained bonus model",
        "detail": "12B gemma-3-12b-it QAT Q4_0 on port 8091. Bonus/side model.",
        "service": "llama-server-gemma3-qat.service",
        "port": 8091,
        "provider": "custom:local",
        "model_name": "gemma-3-12b-it-qat-Q4_0.gguf",
        "context": 131072,
        "short": "gemma3qat",
    },
]
