"""Model family detection: a safetensors header read cold, then handed to whichever model module claims it. Core never names a family -- these tests prove that split holds, not any one architecture's signature (that belongs to modules/models/minimax_h3's own tests). """ import json import struct import sys import types from pathlib import Path import pytest from core import probe from core.contract import ModuleSpec from core.registry import Registry def _write_safetensors(path, keys): header = {k: {"dtype": "F16", "shape": [1], "data_offsets": [0, 0]} for k in keys} header["__metadata__"] = {"format": "pt"} body = json.dumps(header).encode("utf-8") path.write_bytes(struct.pack("