{
  "$defs": {
    "BundleManifest": {
      "additionalProperties": false,
      "description": "The platform-signed manifest of a bundle (``manifest.json`` + ``manifest.sig``).\n\nBinds tenant, run, base digest, overlay hash, spec hash, data hash and every\n*destination* generation. URLs to a bundle are minted only after this signature checks.",
      "examples": [
        {
          "attempt": 1,
          "base_image": "base-bayes@2026.10",
          "catalog_digest": "sha256:cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
          "data_hash": "sha256:efefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
          "kind": "fit",
          "model_id": "mdl_01jabcdefghjkmnpqrstvwxyz0",
          "model_version": 1,
          "objects": {
            "bundle.zarr.zip": {
              "bucket": "mapi-local-bundles",
              "content_type": "application/zip",
              "crc32c": "AAAAAA==",
              "generation": 1760520000000001,
              "key": "t/default/models/mdl_01jabcdefghjkmnpqrstvwxyz0/1/bundle.zarr.zip",
              "md5": "1B2M2Y8AsgTpgAmY7PhCfg==",
              "size": 2097152
            }
          },
          "project_id": "default",
          "run_id": "run_01jabcdefghjkmnpqrstvwxyz0",
          "schema_version": "mapi.bundle-manifest/v1",
          "signature": {
            "alg": "HS256",
            "key_id": "local-1",
            "value": "0000000000000000000000000000000000000000000000000000000000000000"
          },
          "signed_at": "2026-10-15T10:21:00Z",
          "source_manifest_crc32c": "4waSgw==",
          "spec_hash": "sha256:abababababababababababababababababababababababababababababababab",
          "status": "complete",
          "tenant_id": "default"
        }
      ],
      "properties": {
        "attempt": {
          "minimum": 1,
          "title": "Attempt",
          "type": "integer"
        },
        "base_image": {
          "anyOf": [
            {
              "maxLength": 256,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Base Image"
        },
        "catalog_digest": {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "title": "Catalog Digest",
          "type": "string"
        },
        "data_hash": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data Hash"
        },
        "kind": {
          "$ref": "#/$defs/RunKind"
        },
        "model_id": {
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
          "title": "Model Id",
          "type": "string"
        },
        "model_version": {
          "minimum": 1,
          "title": "Model Version",
          "type": "integer"
        },
        "objects": {
          "additionalProperties": {
            "$ref": "#/$defs/BundleObject"
          },
          "maxProperties": 10000,
          "title": "Objects",
          "type": "object"
        },
        "overlay_hash": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Overlay Hash"
        },
        "project_id": {
          "examples": [
            "default"
          ],
          "pattern": "^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$",
          "title": "Project Id",
          "type": "string"
        },
        "run_id": {
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
          "title": "Run Id",
          "type": "string"
        },
        "schema_version": {
          "const": "mapi.bundle-manifest/v1",
          "default": "mapi.bundle-manifest/v1",
          "title": "Schema Version",
          "type": "string"
        },
        "signature": {
          "anyOf": [
            {
              "$ref": "#/$defs/ManifestSignature"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "signed_at": {
          "format": "date-time",
          "title": "Signed At",
          "type": "string"
        },
        "source_manifest_crc32c": {
          "description": "CRC32C as GCS reports it: base64 of the big-endian 4-byte checksum",
          "examples": [
            "4waSgw=="
          ],
          "pattern": "^[A-Za-z0-9+/]{6}==$",
          "title": "Source Manifest Crc32C",
          "type": "string"
        },
        "spec_hash": {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "title": "Spec Hash",
          "type": "string"
        },
        "status": {
          "enum": [
            "complete",
            "partial"
          ],
          "title": "Status",
          "type": "string"
        },
        "tenant_id": {
          "examples": [
            "default"
          ],
          "pattern": "^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$",
          "title": "Tenant Id",
          "type": "string"
        }
      },
      "required": [
        "tenant_id",
        "project_id",
        "model_id",
        "model_version",
        "run_id",
        "attempt",
        "kind",
        "status",
        "spec_hash",
        "catalog_digest",
        "source_manifest_crc32c",
        "signed_at"
      ],
      "title": "BundleManifest",
      "type": "object"
    },
    "BundleObject": {
      "additionalProperties": false,
      "description": "A verified object after the server-side copy into the bundles bucket.",
      "properties": {
        "bucket": {
          "maxLength": 63,
          "title": "Bucket",
          "type": "string"
        },
        "content_type": {
          "anyOf": [
            {
              "maxLength": 256,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Content Type"
        },
        "crc32c": {
          "description": "CRC32C as GCS reports it: base64 of the big-endian 4-byte checksum",
          "examples": [
            "4waSgw=="
          ],
          "pattern": "^[A-Za-z0-9+/]{6}==$",
          "title": "Crc32C",
          "type": "string"
        },
        "generation": {
          "minimum": 1,
          "title": "Generation",
          "type": "integer"
        },
        "key": {
          "maxLength": 1024,
          "minLength": 1,
          "title": "Key",
          "type": "string"
        },
        "md5": {
          "description": "MD5 as GCS reports it: base64 of the 16-byte digest",
          "pattern": "^[A-Za-z0-9+/]{22}==$",
          "title": "Md5",
          "type": "string"
        },
        "size": {
          "minimum": 0,
          "title": "Size",
          "type": "integer"
        }
      },
      "required": [
        "bucket",
        "key",
        "generation",
        "size",
        "crc32c",
        "md5"
      ],
      "title": "BundleObject",
      "type": "object"
    },
    "Capabilities": {
      "additionalProperties": false,
      "description": "What a model plugin can do (declared in its manifest).",
      "properties": {
        "calibration": {
          "default": [],
          "description": "Calibration data the model uses from a spec's calibration block (M3)",
          "items": {
            "enum": [
              "business_priors",
              "lift_tests"
            ],
            "type": "string"
          },
          "title": "Calibration",
          "type": "array",
          "uniqueItems": true
        },
        "checkpointable": {
          "default": false,
          "title": "Checkpointable",
          "type": "boolean"
        },
        "conditions_on_actuals": {
          "default": false,
          "description": "A forecast can be conditioned on actuals sent with the request (target values for periods after, or at the end of, the fitted history): the model updates its state with them without re-estimating its parameters and forecasts from the last actual (mapi_spec.actuals). Models without it refuse such requests with ACTUALS_NOT_SUPPORTED instead of ignoring the actuals",
          "title": "Conditions On Actuals",
          "type": "boolean"
        },
        "contribution_scale": {
          "default": "none",
          "enum": [
            "additive",
            "multiplicative",
            "none"
          ],
          "title": "Contribution Scale",
          "type": "string"
        },
        "decision": {
          "default": false,
          "title": "Decision",
          "type": "boolean"
        },
        "deterministic_given_seed": {
          "default": true,
          "title": "Deterministic Given Seed",
          "type": "boolean"
        },
        "evidence": {
          "default": false,
          "title": "Evidence",
          "type": "boolean"
        },
        "fast_score": {
          "default": false,
          "title": "Fast Score",
          "type": "boolean"
        },
        "identified_quantities": {
          "items": {
            "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,127}$",
            "type": "string"
          },
          "title": "Identified Quantities",
          "type": "array"
        },
        "inference": {
          "enum": [
            "mcmc",
            "vi",
            "map",
            "smc",
            "kalman",
            "point",
            "bootstrap",
            "custom"
          ],
          "title": "Inference",
          "type": "string"
        },
        "input": {
          "default": "dataset",
          "description": "M4: 'tree' models also receive the whole tree dataset (the bound xr.DataTree) next to the flat pipeline output; 'dataset' models only the flat one. v0.15: 'collection' models implement fit_batches/score_batches and train on every image of an image collection through a lazy loader; they also read plain datasets",
          "enum": [
            "dataset",
            "tree",
            "collection"
          ],
          "title": "Input",
          "type": "string"
        },
        "loo_invalid_reason": {
          "anyOf": [
            {
              "maxLength": 500,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Loo Invalid Reason"
        },
        "loo_valid": {
          "default": true,
          "title": "Loo Valid",
          "type": "boolean"
        },
        "owns": {
          "default": [],
          "items": {
            "enum": [
              "scaling",
              "carryover",
              "inverse_units",
              "recursion"
            ],
            "type": "string"
          },
          "title": "Owns",
          "type": "array",
          "uniqueItems": true
        },
        "recommend": {
          "default": false,
          "title": "Recommend",
          "type": "boolean"
        },
        "representation": {
          "$ref": "#/$defs/Representation"
        },
        "score_modes": {
          "items": {
            "enum": [
              "predict",
              "forecast",
              "counterfactual",
              "simulate",
              "filter",
              "evaluate"
            ],
            "type": "string"
          },
          "minItems": 1,
          "title": "Score Modes",
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "inference",
        "representation",
        "score_modes"
      ],
      "title": "Capabilities",
      "type": "object"
    },
    "Diagnostic": {
      "additionalProperties": false,
      "description": "A diagnostic finding that rolls up into the sanity scorecard.",
      "properties": {
        "code": {
          "pattern": "^[A-Z][A-Z0-9_]{1,63}$",
          "title": "Code",
          "type": "string"
        },
        "coords": {
          "patternProperties": {
            "^[A-Za-z_][A-Za-z0-9_.\\-]{0,127}$": {
              "$ref": "#/$defs/JsonValue"
            }
          },
          "title": "Coords",
          "type": "object"
        },
        "message_expert": {
          "maxLength": 2000,
          "title": "Message Expert",
          "type": "string"
        },
        "message_plain": {
          "maxLength": 2000,
          "title": "Message Plain",
          "type": "string"
        },
        "metric": {
          "anyOf": [
            {
              "pattern": "^[a-z][a-z0-9_]{0,63}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metric"
        },
        "severity": {
          "default": "warning",
          "enum": [
            "info",
            "warning",
            "error"
          ],
          "title": "Severity",
          "type": "string"
        },
        "suggested_action": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Suggested Action"
        },
        "threshold": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Threshold"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        },
        "var": {
          "anyOf": [
            {
              "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Var"
        }
      },
      "required": [
        "code",
        "message_expert",
        "message_plain"
      ],
      "title": "Diagnostic",
      "type": "object"
    },
    "JsonValue": {},
    "Lineage": {
      "description": "Everything a model version came from (plan \u00a78.6).",
      "examples": [
        {
          "attempt": 1,
          "base_image": "base-bayes@2026.10",
          "dataset_sha": "sha256:efefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
          "engine": "nutpie",
          "executor": "local-process",
          "lib_versions": {
            "pymc": "5.25.1"
          },
          "plugin": "mmm.bayesian@1.3.2",
          "resource_class": "M",
          "run_id": "run_01jaf3q2x8m9v7k5h4g3f2e1d0",
          "seed": 20261014,
          "spec_hash": "sha256:3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f"
        }
      ],
      "properties": {
        "attempt": {
          "minimum": 1,
          "title": "Attempt",
          "type": "integer"
        },
        "base_image": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Base Image"
        },
        "catalog_digest": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Catalog Digest"
        },
        "dataset_sha": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Dataset Sha"
        },
        "engine": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Engine"
        },
        "evaluation_of": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "evaluate_then_refit: the evaluation model version this refit pairs",
          "title": "Evaluation Of"
        },
        "executor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Executor"
        },
        "lib_versions": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Lib Versions",
          "type": "object"
        },
        "overlay_hash": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Overlay Hash"
        },
        "plugin": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "mmm.bayesian@1.3.2"
          ],
          "title": "Plugin"
        },
        "resource_class": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResourceClass"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "run_id": {
          "examples": [
            "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
          ],
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
          "title": "Run Id",
          "type": "string"
        },
        "seed": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Seed"
        },
        "side_tables": {
          "additionalProperties": {
            "pattern": "^sha256:[0-9a-f]{64}$",
            "type": "string"
          },
          "title": "Side Tables",
          "type": "object"
        },
        "spec_hash": {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "title": "Spec Hash",
          "type": "string"
        }
      },
      "required": [
        "run_id",
        "attempt",
        "spec_hash"
      ],
      "title": "Lineage",
      "type": "object"
    },
    "ManifestSignature": {
      "additionalProperties": false,
      "description": "Platform signature over :func:`bundle_manifest_signing_bytes`.\n\n``HS256`` (HMAC-SHA256 with a server-held key) is the local/M1 signer; KMS asymmetric\nsigners (M2) use their own ``alg`` and the same signing bytes.",
      "properties": {
        "alg": {
          "enum": [
            "HS256",
            "KMS-EC-P256-SHA256",
            "KMS-RSA-PSS-SHA256"
          ],
          "title": "Alg",
          "type": "string"
        },
        "key_id": {
          "maxLength": 256,
          "minLength": 1,
          "title": "Key Id",
          "type": "string"
        },
        "value": {
          "maxLength": 2048,
          "minLength": 1,
          "title": "Value",
          "type": "string"
        }
      },
      "required": [
        "alg",
        "key_id",
        "value"
      ],
      "title": "ManifestSignature",
      "type": "object"
    },
    "ObjectRef": {
      "description": "A stored object exposed through ``\u2026/artifacts/{name}`` (fetch it as an ArtifactLink).",
      "examples": [
        {
          "content_type": "application/json",
          "name": "preview.json",
          "size": 20480
        }
      ],
      "properties": {
        "content_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Content Type"
        },
        "crc32c": {
          "anyOf": [
            {
              "description": "CRC32C as GCS reports it: base64 of the big-endian 4-byte checksum",
              "examples": [
                "4waSgw=="
              ],
              "pattern": "^[A-Za-z0-9+/]{6}==$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Crc32C"
        },
        "name": {
          "examples": [
            "preview.json"
          ],
          "maxLength": 1024,
          "title": "Name",
          "type": "string"
        },
        "size": {
          "minimum": 0,
          "title": "Size",
          "type": "integer"
        }
      },
      "required": [
        "name",
        "size"
      ],
      "title": "ObjectRef",
      "type": "object"
    },
    "Representation": {
      "description": "How a model encodes uncertainty in its outputs.",
      "enum": [
        "draws",
        "quantiles",
        "interval",
        "point",
        "moments"
      ],
      "title": "Representation",
      "type": "string"
    },
    "ResourceClass": {
      "description": "Executor resource class. Ordered: ``S < M < L < XL < GPU``.\n\n``GPU`` is the last (highest-rank) member on purpose: a quota whose\n``max_resource_class`` is below it refuses it, and :meth:`next_up` never offers it.",
      "enum": [
        "S",
        "M",
        "L",
        "XL",
        "GPU"
      ],
      "title": "ResourceClass",
      "type": "string"
    },
    "RunKind": {
      "description": "What a run does. ``validate`` is the explicit sandboxed dry-run of a spec.\n\n``sweep``, ``backtest``, ``sbc`` and ``campaign`` are fan-out *parents* (plan \u00a76.2,\nM4): they own child runs and never execute on an executor themselves.",
      "enum": [
        "ingest",
        "describe",
        "validate",
        "fit",
        "score",
        "evaluate",
        "derive",
        "render",
        "optimize",
        "sweep",
        "backtest",
        "sbc",
        "campaign",
        "translate_priors",
        "workflow",
        "workflow_node",
        "explore",
        "governance",
        "inspect"
      ],
      "title": "RunKind",
      "type": "string"
    },
    "Scorecard": {
      "description": "Sanity scorecard: convergence, holdout error and plausibility checks rolled up.",
      "examples": [
        {
          "items": [
            {
              "code": "RHAT_OK",
              "message_plain": "All chains got the same answer.",
              "metric": "r_hat_max",
              "status": "pass",
              "threshold": 1.01,
              "title": "Chains agree",
              "value": 1.004
            },
            {
              "code": "HOLDOUT_MAPE",
              "message_plain": "The forecast error on the last 8 weeks was 14%.",
              "metric": "mape",
              "status": "warn",
              "suggested_action": "Add holidays, or look at the data for the last weeks.",
              "threshold": 0.1,
              "title": "Holdout error",
              "value": 0.14
            }
          ],
          "overall": "warn"
        }
      ],
      "properties": {
        "items": {
          "items": {
            "$ref": "#/$defs/ScorecardItem"
          },
          "title": "Items",
          "type": "array"
        },
        "overall": {
          "enum": [
            "pass",
            "warn",
            "fail"
          ],
          "title": "Overall",
          "type": "string"
        },
        "skipped": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "M3: checks that could not run, with the reason (check id -> text)",
          "maxProperties": 64,
          "title": "Skipped",
          "type": "object"
        }
      },
      "required": [
        "overall"
      ],
      "title": "Scorecard",
      "type": "object"
    },
    "ScorecardItem": {
      "examples": [
        {
          "code": "RHAT_OK",
          "message_plain": "All chains got the same answer.",
          "metric": "r_hat_max",
          "status": "pass",
          "threshold": 1.01,
          "title": "Chains agree",
          "value": 1.004
        },
        {
          "category": "holdout",
          "check": "holdout.mape",
          "code": "HOLDOUT_MAPE",
          "docs_anchor": "check-holdout-mape",
          "message_plain": "The forecast error on the holdout periods was 14%.",
          "metric": "mape",
          "status": "warn",
          "suggested_action": "Look for gaps or one-time events in the last weeks of data.",
          "threshold": 0.1,
          "title": "Holdout error",
          "value": 0.14
        }
      ],
      "properties": {
        "category": {
          "anyOf": [
            {
              "enum": [
                "convergence",
                "holdout",
                "plausibility",
                "data"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "M3: the check's category",
          "title": "Category"
        },
        "check": {
          "anyOf": [
            {
              "pattern": "^[a-z]+\\.[a-z0-9_]{1,63}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "M3: the stable check id (SCORECARD_CHECKS), e.g. holdout.mape",
          "title": "Check"
        },
        "code": {
          "pattern": "^[A-Z][A-Z0-9_]{1,63}$",
          "title": "Code",
          "type": "string"
        },
        "docs_anchor": {
          "anyOf": [
            {
              "pattern": "^[a-z0-9][a-z0-9-]{0,99}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "M3: anchor on the scorecard docs page that explains the check",
          "title": "Docs Anchor"
        },
        "message_expert": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Message Expert"
        },
        "message_plain": {
          "maxLength": 2000,
          "title": "Message Plain",
          "type": "string"
        },
        "metric": {
          "anyOf": [
            {
              "pattern": "^[a-z][a-z0-9_]{0,63}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metric"
        },
        "status": {
          "enum": [
            "pass",
            "warn",
            "fail"
          ],
          "title": "Status",
          "type": "string"
        },
        "suggested_action": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Suggested Action"
        },
        "threshold": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Threshold"
        },
        "title": {
          "maxLength": 200,
          "title": "Title",
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "required": [
        "code",
        "status",
        "title",
        "message_plain"
      ],
      "title": "ScorecardItem",
      "type": "object"
    }
  },
  "$id": "https://schemas.mapi.dev/v1/api-ModelVersion.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A verified bundle: signed manifest, diagnostics, scorecard, lineage and metrics.",
  "examples": [
    {
      "artifacts": [
        {
          "content_type": "application/zip",
          "name": "bundle.zarr.zip",
          "size": 2097152
        }
      ],
      "created_at": "2026-10-15T09:30:00Z",
      "diagnostics": [
        {
          "code": "RHAT_OK",
          "message_expert": "max r-hat 1.004",
          "message_plain": "All chains converged to the same answer.",
          "metric": "r_hat_max",
          "severity": "info",
          "threshold": 1.01,
          "value": 1.004
        }
      ],
      "id": "mv_01jaf3e1f2g3h4j5k6m7n8p9q0",
      "lineage": {
        "attempt": 1,
        "base_image": "base-bayes@2026.10",
        "dataset_sha": "sha256:efefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
        "engine": "nutpie",
        "executor": "local-process",
        "lib_versions": {
          "pymc": "5.25.1"
        },
        "plugin": "mmm.bayesian@1.3.2",
        "resource_class": "M",
        "run_id": "run_01jaf3q2x8m9v7k5h4g3f2e1d0",
        "seed": 20261014,
        "spec_hash": "sha256:3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f"
      },
      "manifest": {
        "attempt": 1,
        "base_image": "base-bayes@2026.10",
        "catalog_digest": "sha256:cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
        "data_hash": "sha256:efefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
        "kind": "fit",
        "model_id": "mdl_01jabcdefghjkmnpqrstvwxyz0",
        "model_version": 1,
        "objects": {
          "bundle.zarr.zip": {
            "bucket": "mapi-local-bundles",
            "content_type": "application/zip",
            "crc32c": "AAAAAA==",
            "generation": 1760520000000001,
            "key": "t/default/models/mdl_01jabcdefghjkmnpqrstvwxyz0/1/bundle.zarr.zip",
            "md5": "1B2M2Y8AsgTpgAmY7PhCfg==",
            "size": 2097152
          }
        },
        "project_id": "default",
        "run_id": "run_01jabcdefghjkmnpqrstvwxyz0",
        "schema_version": "mapi.bundle-manifest/v1",
        "signature": {
          "alg": "HS256",
          "key_id": "local-1",
          "value": "0000000000000000000000000000000000000000000000000000000000000000"
        },
        "signed_at": "2026-10-15T10:21:00Z",
        "source_manifest_crc32c": "4waSgw==",
        "spec_hash": "sha256:abababababababababababababababababababababababababababababababab",
        "status": "complete",
        "tenant_id": "default"
      },
      "metrics": {
        "coverage_90": 0.88,
        "mape": 0.14
      },
      "model_id": "mdl_01jaf3c1d2e3f4g5h6j7k8m9n0",
      "project_id": "default",
      "ref": "model://default/eu-geo-mmm@v1",
      "run_id": "run_01jaf3q2x8m9v7k5h4g3f2e1d0",
      "scorecard": {
        "items": [
          {
            "code": "RHAT_OK",
            "message_plain": "All chains got the same answer.",
            "metric": "r_hat_max",
            "status": "pass",
            "threshold": 1.01,
            "title": "Chains agree",
            "value": 1.004
          },
          {
            "code": "HOLDOUT_MAPE",
            "message_plain": "The forecast error on the last 8 weeks was 14%.",
            "metric": "mape",
            "status": "warn",
            "suggested_action": "Add holidays, or look at the data for the last weeks.",
            "threshold": 0.1,
            "title": "Holdout error",
            "value": 0.14
          }
        ],
        "overall": "warn"
      },
      "spec_hash": "sha256:3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f",
      "status": "ready",
      "tenant_id": "default",
      "version": 1
    }
  ],
  "properties": {
    "artifacts": {
      "items": {
        "$ref": "#/$defs/ObjectRef"
      },
      "title": "Artifacts",
      "type": "array"
    },
    "capabilities": {
      "anyOf": [
        {
          "$ref": "#/$defs/Capabilities"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "diagnostics": {
      "items": {
        "$ref": "#/$defs/Diagnostic"
      },
      "title": "Diagnostics",
      "type": "array"
    },
    "id": {
      "examples": [
        "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
      ],
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
      "title": "Id",
      "type": "string"
    },
    "lineage": {
      "$ref": "#/$defs/Lineage"
    },
    "manifest": {
      "$ref": "#/$defs/BundleManifest"
    },
    "metrics": {
      "patternProperties": {
        "^[a-z][a-z0-9_]{0,63}$": {
          "type": "number"
        }
      },
      "title": "Metrics",
      "type": "object"
    },
    "model_id": {
      "examples": [
        "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
      ],
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
      "title": "Model Id",
      "type": "string"
    },
    "project_id": {
      "pattern": "^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$",
      "title": "Project Id",
      "type": "string"
    },
    "ref": {
      "description": "model://project/name@vN",
      "title": "Ref",
      "type": "string"
    },
    "run_id": {
      "examples": [
        "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
      ],
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
      "title": "Run Id",
      "type": "string"
    },
    "scorecard": {
      "anyOf": [
        {
          "$ref": "#/$defs/Scorecard"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "spec_hash": {
      "pattern": "^sha256:[0-9a-f]{64}$",
      "title": "Spec Hash",
      "type": "string"
    },
    "status": {
      "enum": [
        "ready",
        "partial"
      ],
      "title": "Status",
      "type": "string"
    },
    "tenant_id": {
      "pattern": "^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$",
      "title": "Tenant Id",
      "type": "string"
    },
    "version": {
      "minimum": 1,
      "title": "Version",
      "type": "integer"
    }
  },
  "required": [
    "id",
    "model_id",
    "tenant_id",
    "project_id",
    "version",
    "ref",
    "status",
    "run_id",
    "spec_hash",
    "manifest",
    "lineage",
    "created_at"
  ],
  "title": "ModelVersion",
  "type": "object",
  "x-mapi-contract-version": "0.2"
}
