{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "$id": "https://miruntime.com/downloads/miruntime-model-adapter-capability.schema.json",
  "title": "MiRuntime Model Adapter Capability",
  "description": "Conceptual capability record used for provider-neutral model route selection and evidence.",
  "x-miruntime": {
    "artifactVersion": "2.8.1",
    "editorialStatus": "Conceptual reference",
    "reviewedAtUtc": "2026-06-24T00:00:00Z",
    "disclaimer": "Conceptual MiRuntime editorial reference. This is not a product SDK, certification profile, or industry standard.",
    "description": "Conceptual capability record used for provider-neutral model route selection and evidence."
  },
  "required": [
    "schemaVersion",
    "editorialStatus",
    "description",
    "reviewedAtUtc",
    "disclaimer",
    "routeKey",
    "adapterVersion",
    "modelIdentity",
    "contextLimit",
    "capabilities",
    "placement"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string",
      "const": "1.0"
    },
    "editorialStatus": {
      "type": "string",
      "const": "Conceptual reference"
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "reviewedAtUtc": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "disclaimer": {
      "type": "string",
      "minLength": 1
    },
    "routeKey": {
      "type": "string",
      "minLength": 1
    },
    "adapterVersion": {
      "type": "string",
      "minLength": 1
    },
    "modelIdentity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "version"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "contextLimit": {
      "type": "integer",
      "minimum": 1
    },
    "capabilities": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "streaming",
        "toolCalls",
        "embeddings",
        "structuredOutput"
      ],
      "properties": {
        "streaming": {
          "type": "boolean"
        },
        "toolCalls": {
          "type": "boolean"
        },
        "embeddings": {
          "type": "boolean"
        },
        "structuredOutput": {
          "type": "boolean"
        }
      }
    },
    "placement": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "locality",
        "regions"
      ],
      "properties": {
        "locality": {
          "type": "string",
          "enum": [
            "local",
            "managed",
            "hybrid"
          ]
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true
        }
      }
    },
    "safeRetryCodes": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "costProfile": {
      "type": "object"
    },
    "latencyProfile": {
      "type": "object"
    }
  }
}
