{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://atlas.local/schemas/model.schema.json",
  "title": "Atlas model record",
  "type": "object",
  "required": [
    "provider",
    "id",
    "status",
    "sources"
  ],
  "properties": {
    "provider": {
      "enum": [
        "openai",
        "anthropic",
        "xai",
        "gemini"
      ]
    },
    "id": {
      "type": "string"
    },
    "display_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "aliases": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "object"
        ]
      }
    },
    "snapshots": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "object"
        ]
      }
    },
    "family": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "array",
      "items": {
        "$ref": "common.schema.json#/$defs/status"
      }
    },
    "release_date": {
      "type": [
        "string",
        "null"
      ]
    },
    "knowledge_cutoff": {
      "type": [
        "string",
        "object",
        "null"
      ]
    },
    "context_window": {
      "type": [
        "integer",
        "string",
        "null"
      ]
    },
    "max_output": {
      "type": [
        "integer",
        "string",
        "null"
      ]
    },
    "modalities": {
      "type": "object",
      "properties": {
        "input": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "output": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "capabilities": {
      "type": "object",
      "additionalProperties": {
        "$ref": "common.schema.json#/$defs/tristate"
      }
    },
    "endpoints": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "object"
        ]
      },
      "description": "endpoint names/routes as strings, or {name, route, ...} objects"
    },
    "tools": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "object"
        ]
      },
      "description": "tool type strings, or {type, category, beta_header, ...} objects"
    },
    "pricing": {
      "type": [
        "object",
        "string",
        "null"
      ]
    },
    "rate_limits": {},
    "beta_headers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "restrictions": {},
    "availability": {
      "type": [
        "object",
        "null"
      ]
    },
    "deprecation": {
      "type": [
        "object",
        "array",
        "null"
      ]
    },
    "last_verified": {
      "type": [
        "string",
        "null"
      ]
    },
    "verification": {
      "$ref": "common.schema.json#/$defs/verification"
    },
    "sources": {
      "type": "array",
      "items": {
        "$ref": "common.schema.json#/$defs/source"
      }
    }
  }
}
