Model configuration loader.
Reads model definition YAML files from the configs/ directory and builds ModelSpec instances. This is the single source of truth for all model specifications.
EndpointPaths
@dataclass(frozen=True)
class EndpointPaths()
Parsed endpoint routes for a model.
Each field corresponds to an optional endpoint type declared in the model’s YAML config under endpoints:.
ModelConfig
@dataclass(frozen=True)
class ModelConfig()
A fully parsed model configuration.
Combines the ModelSpec with routing metadata that is not part of the spec itself.
endpoint_path
@property
def endpoint_path() -> str
Primary endpoint path (backward compatibility).
genes_endpoint_path
@property
def genes_endpoint_path() -> str | None
Genes/metadata endpoint path (backward compatibility).
load_model_config
def load_model_config(path: Path) -> ModelConfig
Loads a single model config YAML file.
A ModelConfig with the parsed spec and routing.
load_all_model_configs
def load_all_model_configs(
configs_dir: Path | None = None) -> Dict[str, ModelConfig]
Discovers and loads all model configs from a directory.
Scans for *.yaml files and returns a dict keyed by model_name.
Directory to scan. Defaults to the package-bundled configs/ directory.
Mapping of model name to ModelConfig.