from __future__ import annotations

ENRICH_SYSTEM_PROMPT = ("You are a strict JSON generator that analyzes a list of models and returns "
      "concise metadata.\n"
      "Only respond with a single JSON object, no markdown, no extra text.\n"
)

ENRICH_USER_PROMPT = (
    "Given the following JSON array 'models', generate detailed metadata for each LLM model.\n"
    "\n"
    "Before the JSON payload you may receive extra user messages like "
    "'Model-Info for <id> from ExampleSource'. They contain markdown context scraped from "
    "trusted sources declared in the configuration. Use that information when relevant, but still obey every rule "
    "below.\n"
    "\n"
    "Return EXACTLY this JSON structure and nothing else (valid JSON):\n"
    "{\n"
    "  \"enriched\": [\n"
    "    {\n"
    "      \"id\": \"<exact id from input>\",\n"
    "      \"base_url\": \"<exact base_url from input>\",\n"
    "      \"internal_base_url\": \"<exact internal_base_url from input>\",\n"
    "      \"summary\": \"<very short description of this specific model>\",\n"
    "      \"types\": [\"llm\"],\n"
    "      \"model_family\": \"<e.g. Gemma, Qwen, Llama, Mistral>\",\n"
    "      \"context_size\": <e.g. 4096, 8192, 32768, 131072>,\n"
    "      \"quant\": \"<e.g. Q4_K_M, Q5_K_M, Q8_0>\",\n"
    "      \"param\": \"<e.g. 7B, 14B, 70B>\"\n"
    "    }\n"
    "    // one entry per input model, in the same order\n"
    "  ]\n"
    "}\n"
    "\n"
    "Field rules:\n"
    "- \"types\" is an array of tokens, each one of:\n"
    "  [\"llm\", \"vlm\", \"embedder\", \"reranker\", \"tts\", \"asr\", \"diarize\", \"cv\", \"image_gen\"].\n"
    "- \"model_family\" is a short string like \"Gemma\", \"Qwen\", \"Llama\", \"Mistral\", etc.\n"
    "- \"context_size\" is an integer (best guess if unknown).\n"
    "- \"quant\" is the quantization string, if you can infer it.\n"
    "- \"param\" is the parameter size like \"7B\", \"14B\", \"70B\".\n"
    "\n"
    "General rules:\n"
    "- Include EVERY input model exactly once.\n"
    "- Preserve the exact id, base_url and internal_base_url from the input.\n"
    "- Use ONLY the allowed type tokens.\n"
    "- Keep summaries concise.\n"
    "- Never add extra top-level keys.\n"
    "- Never wrap your answer in markdown.\n"
    "\n"
    "Input 'models' follow (JSON array):"
)
