Coverage for src / lilbee / modelhub / model_manager / types.py: 100%
17 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-05-15 20:55 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-05-15 20:55 +0000
1"""Public value types for model lifecycle management."""
3from dataclasses import dataclass
4from enum import Enum
6from lilbee.catalog.types import ModelTask
7from lilbee.providers.backend_names import BackendName
10class ModelNotFoundError(RuntimeError):
11 """Raised when a model ref is not found in any source or the catalog.
13 Subclasses RuntimeError so pre-existing `except RuntimeError` call
14 sites still catch it.
15 """
18@dataclass
19class RemoteModel:
20 """A model from the SDK backend with inferred task classification."""
22 name: str
23 task: ModelTask
24 family: str
25 parameter_size: str
26 provider: str = BackendName.REMOTE
29class ValidationResult(Enum):
30 """Outcome of validating a persisted model ref against current state."""
32 OK = "ok"
33 NOT_INSTALLED = "not_installed" # Local ref but no GGUF on disk.
34 NO_KEY = "no_key" # API ref but no provider key configured.
35 UNKNOWN = "unknown" # Ref string is malformed or its provider is unknown.