> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bioptimus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# config_loader

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

```python theme={null}
@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

```python theme={null}
@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

```python theme={null}
@property
def endpoint_path() -> str
```

Primary endpoint path (backward compatibility).

#### genes\_endpoint\_path

```python theme={null}
@property
def genes_endpoint_path() -> str | None
```

Genes/metadata endpoint path (backward compatibility).

#### load\_model\_config

```python theme={null}
def load_model_config(path: Path) -> ModelConfig
```

Loads a single model config YAML file.

<ParamField body="path" type="Path" required>
  Path to the YAML file.
</ParamField>

<ResponseField name="returns" type="ModelConfig">
  A `ModelConfig` with the parsed spec and routing.
</ResponseField>

#### load\_all\_model\_configs

```python theme={null}
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`.

<ParamField body="configs_dir" type="Path | None">
  Directory to scan. Defaults to the package-bundled `configs/` directory.
</ParamField>

<ResponseField name="returns" type="Dict[str, ModelConfig]">
  Mapping of model name to `ModelConfig`.
</ResponseField>
