{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://localai.apiroute.dev/data/agent-model-guide.schema.json",
  "title": "Can My GPU Run This LLM Agent Model Guide",
  "type": "object",
  "required": ["metadata", "context_profiles", "quantization_profiles", "models"],
  "additionalProperties": false,
  "properties": {
    "metadata": {
      "type": "object",
      "required": [
        "generated_at",
        "project",
        "dataset_type",
        "model_count",
        "source_files",
        "policy",
        "commercial_policy",
        "ranking_influenced_by_affiliate"
      ],
      "additionalProperties": true,
      "properties": {
        "generated_at": { "type": "string" },
        "project": { "type": "string" },
        "dataset_type": { "const": "agent_model_guide" },
        "model_count": { "type": "integer", "minimum": 0 },
        "source_files": { "type": "array", "items": { "type": "string" } },
        "policy": { "type": "string" },
        "commercial_policy": { "type": "string" },
        "ranking_influenced_by_affiliate": { "const": false }
      }
    },
    "context_profiles": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "label", "multiplier", "note"],
        "additionalProperties": false,
        "properties": {
          "id": { "type": "string" },
          "label": { "type": "string" },
          "multiplier": { "type": "number" },
          "note": { "type": "string" }
        }
      }
    },
    "quantization_profiles": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "bits"],
        "additionalProperties": false,
        "properties": {
          "id": { "type": "string" },
          "bits": { "type": "integer" }
        }
      }
    },
    "models": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "model_name",
          "provider",
          "ollama_tag",
          "best_for",
          "weak_for",
          "not_for",
          "memory_estimates_gb",
          "hardware",
          "routing_guidance",
          "sources",
          "confidence"
        ],
        "additionalProperties": true,
        "properties": {
          "id": { "type": "string" },
          "model_name": { "type": "string" },
          "provider": { "type": "string" },
          "ollama_tag": { "type": "string" },
          "best_for": { "type": "array", "items": { "type": "string" } },
          "weak_for": { "type": "array", "items": { "type": "string" } },
          "not_for": { "type": "array", "items": { "type": "string" } },
          "routing_guidance": {
            "type": "object",
            "required": ["green", "yellow", "red", "commercial_option_ids", "ranking_influenced_by_affiliate"],
            "additionalProperties": false,
            "properties": {
              "green": { "type": "string" },
              "yellow": { "type": "string" },
              "red": { "type": "string" },
              "commercial_option_ids": { "type": "array", "items": { "type": "string" } },
              "ranking_influenced_by_affiliate": { "const": false }
            }
          }
        }
      }
    }
  }
}
