import os, glob, pytest def _model_dir(): env = os.environ.get("TITAN_MODEL_DIR") if env: return env hits = glob.glob(os.path.expanduser("~/.cache/huggingface/hub/models--mlx-community--OLMoE-1B-7B-0125-Instruct-4bit/snapshots/*")) return hits[0] if hits else None @pytest.fixture(scope="session") def model_dir(): d = _model_dir() if d is None: pytest.skip("OLMoE-1B-7B-0125-Instruct-4bit not in the HF cache (set TITAN_MODEL_DIR)") return d