use super::helpers::{ModelRegistryVariantContract, capability, variant};

pub(super) fn cloudflare_variants() -> Vec<ModelRegistryVariantContract> {
  vec![
    variant(
      "cloudflare_workers_ai",
      "@cf/baai/bge-reranker-base",
      "@cf/baai/bge-reranker-base",
      &["@cf/baai/bge-reranker-base"],
      &[],
      vec![capability(&["text"], &["rerank"], true)],
      Some("openai_chat"),
      Some("cloudflare_workers_ai"),
      &[],
      Some("BGE Reranker Base"),
    ),
    variant(
      "cloudflare_workers_ai",
      "@cf/moonshotai/kimi-k2.5",
      "@cf/moonshotai/kimi-k2.5",
      &["@cf/moonshotai/kimi-k2.5"],
      &[],
      vec![capability(&["text"], &["text", "object", "rerank"], false)],
      Some("openai_chat"),
      Some("cloudflare_workers_ai"),
      &[],
      Some("Kimi K2.5"),
    ),
    variant(
      "cloudflare_workers_ai",
      "@cf/ibm-granite/granite-4.0-h-micro",
      "@cf/ibm-granite/granite-4.0-h-micro",
      &["@cf/ibm-granite/granite-4.0-h-micro"],
      &[],
      vec![capability(&["text"], &["text", "object", "rerank"], false)],
      Some("openai_chat"),
      Some("cloudflare_workers_ai"),
      &[],
      Some("Granite 4.0 H Micro"),
    ),
    variant(
      "cloudflare_workers_ai",
      "@cf/aisingapore/gemma-sea-lion-v4-27b-it",
      "@cf/aisingapore/gemma-sea-lion-v4-27b-it",
      &["@cf/aisingapore/gemma-sea-lion-v4-27b-it"],
      &[],
      vec![capability(&["text"], &["text", "object", "rerank"], false)],
      Some("openai_chat"),
      Some("cloudflare_workers_ai"),
      &[],
      Some("Gemma Sea Lion V4 27B IT"),
    ),
    variant(
      "cloudflare_workers_ai",
      "@cf/nvidia/nemotron-3-120b-a12b",
      "@cf/nvidia/nemotron-3-120b-a12b",
      &["@cf/nvidia/nemotron-3-120b-a12b"],
      &[],
      vec![capability(&["text"], &["text", "object", "rerank"], false)],
      Some("openai_chat"),
      Some("cloudflare_workers_ai"),
      &[],
      Some("Nemotron 3 120B A12B"),
    ),
    variant(
      "cloudflare_workers_ai",
      "@cf/zai-org/glm-4.7-flash",
      "@cf/zai-org/glm-4.7-flash",
      &["@cf/zai-org/glm-4.7-flash"],
      &[],
      vec![capability(&["text"], &["text", "object", "rerank"], false)],
      Some("openai_chat"),
      Some("cloudflare_workers_ai"),
      &[],
      Some("GLM 4.7 Flash"),
    ),
    variant(
      "cloudflare_workers_ai",
      "@cf/qwen/qwen3-30b-a3b-fp8",
      "@cf/qwen/qwen3-30b-a3b-fp8",
      &["@cf/qwen/qwen3-30b-a3b-fp8"],
      &[],
      vec![capability(&["text"], &["text", "object", "rerank"], false)],
      Some("openai_chat"),
      Some("cloudflare_workers_ai"),
      &[],
      Some("Qwen3 30B A3B FP8"),
    ),
  ]
}

pub(super) fn fal_variants() -> Vec<ModelRegistryVariantContract> {
  vec![
    variant(
      "fal",
      "flux-1/schnell",
      "flux-1/schnell",
      &["flux-1/schnell"],
      &[],
      vec![capability(&["text"], &["image"], true)],
      Some("fal_image"),
      Some("fal"),
      &[],
      None,
    ),
    variant(
      "fal",
      "lcm-sd15-i2i",
      "lcm-sd15-i2i",
      &["lcm-sd15-i2i"],
      &[],
      vec![capability(&["image"], &["image"], true)],
      Some("fal_image"),
      Some("fal"),
      &[],
      None,
    ),
    variant(
      "fal",
      "clarity-upscaler",
      "clarity-upscaler",
      &["clarity-upscaler"],
      &[],
      vec![capability(&["image"], &["image"], false)],
      Some("fal_image"),
      Some("fal"),
      &[],
      None,
    ),
    variant(
      "fal",
      "face-to-sticker",
      "face-to-sticker",
      &["face-to-sticker"],
      &[],
      vec![capability(&["image"], &["image"], false)],
      Some("fal_image"),
      Some("fal"),
      &[],
      None,
    ),
    variant(
      "fal",
      "imageutils/rembg",
      "imageutils/rembg",
      &["imageutils/rembg"],
      &[],
      vec![capability(&["image"], &["image"], false)],
      Some("fal_image"),
      Some("fal"),
      &[],
      None,
    ),
    variant(
      "fal",
      "workflowutils/teed",
      "workflowutils/teed",
      &["workflowutils/teed"],
      &[],
      vec![capability(&["image"], &["image"], false)],
      Some("fal_image"),
      Some("fal"),
      &[],
      None,
    ),
    variant(
      "fal",
      "lora/image-to-image",
      "lora/image-to-image",
      &["lora/image-to-image"],
      &[],
      vec![capability(&["image"], &["image"], false)],
      Some("fal_image"),
      Some("fal"),
      &[],
      None,
    ),
  ]
}

pub(super) fn perplexity_variants() -> Vec<ModelRegistryVariantContract> {
  vec![
    variant(
      "perplexity",
      "sonar",
      "sonar",
      &["sonar"],
      &[],
      vec![capability(&["text"], &["text"], true)],
      Some("openai_chat"),
      Some("chat_completions"),
      &["citations_include", "no_attachments"],
      Some("Sonar"),
    ),
    variant(
      "perplexity",
      "sonar-pro",
      "sonar-pro",
      &["sonar-pro"],
      &[],
      vec![capability(&["text"], &["text"], false)],
      Some("openai_chat"),
      Some("chat_completions"),
      &["citations_include", "no_attachments"],
      Some("Sonar Pro"),
    ),
    variant(
      "perplexity",
      "sonar-reasoning",
      "sonar-reasoning",
      &["sonar-reasoning"],
      &[],
      vec![capability(&["text"], &["text"], false)],
      Some("openai_chat"),
      Some("chat_completions"),
      &["citations_include", "no_attachments"],
      Some("Sonar Reasoning"),
    ),
    variant(
      "perplexity",
      "sonar-reasoning-pro",
      "sonar-reasoning-pro",
      &["sonar-reasoning-pro"],
      &[],
      vec![capability(&["text"], &["text"], false)],
      Some("openai_chat"),
      Some("chat_completions"),
      &["citations_include", "no_attachments"],
      Some("Sonar Reasoning Pro"),
    ),
  ]
}

pub(super) fn morph_variants() -> Vec<ModelRegistryVariantContract> {
  vec![
    variant(
      "morph",
      "morph-v2",
      "morph-v2",
      &["morph-v2"],
      &[],
      vec![capability(&["text"], &["text"], false)],
      Some("openai_chat"),
      Some("chat_completions"),
      &["no_structured", "no_embedding", "no_rerank"],
      None,
    ),
    variant(
      "morph",
      "morph-v3-fast",
      "morph-v3-fast",
      &["morph-v3-fast"],
      &[],
      vec![capability(&["text"], &["text"], false)],
      Some("openai_chat"),
      Some("chat_completions"),
      &["no_structured", "no_embedding", "no_rerank"],
      None,
    ),
    variant(
      "morph",
      "morph-v3-large",
      "morph-v3-large",
      &["morph-v3-large"],
      &[],
      vec![capability(&["text"], &["text"], false)],
      Some("openai_chat"),
      Some("chat_completions"),
      &["no_structured", "no_embedding", "no_rerank"],
      None,
    ),
  ]
}
