> This page is for version 0.2.1.
> For other versions, use one of these documentation indexes:
> - Main (default): https://docs.nvidia.com/nemo/gym/main/llms.txt
> - 0.7.0: https://docs.nvidia.com/nemo/gym/v0.7.0/llms.txt
> - 0.6.0: https://docs.nvidia.com/nemo/gym/v0.6.0/llms.txt
> - 0.5.1: https://docs.nvidia.com/nemo/gym/v0.5.1/llms.txt
> - 0.5.0: https://docs.nvidia.com/nemo/gym/v0.5.0/llms.txt
> - 0.4.0: https://docs.nvidia.com/nemo/gym/v0.4.0/llms.txt
> - 0.3.0: https://docs.nvidia.com/nemo/gym/v0.3.0/llms.txt
> - 0.2.1: https://docs.nvidia.com/nemo/gym/v0.2.1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# nemo_gym.environment.model_registry

Registry of model servers under `responses_api_models/<name>/`.

Maps each model dir to the config flavors it ships (`configs/<flavor>.yaml`), so they can be
enumerated by the token passed to `--model-type` (see `ModelEntry.model_types`). Reads the
directory tree only; never loads a config.

## Module Contents

### Classes

| Name                                                            | Description                                                  |
| --------------------------------------------------------------- | ------------------------------------------------------------ |
| [`ModelEntry`](#nemo_gym-environment-model_registry-ModelEntry) | A discovered model server: its name, group, and config file. |

### Functions

| Name                                                                                      | Description                                                                                   |
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [`_discover_models_in_dir`](#nemo_gym-environment-model_registry-_discover_models_in_dir) | Map model name -> `ModelEntry` for every config flavor under one `responses_api_models/` dir. |
| [`discover_models`](#nemo_gym-environment-model_registry-discover_models)                 | Map model name -> `ModelEntry` for every discoverable model server.                           |

### Data

[`MODELS_DIR`](#nemo_gym-environment-model_registry-MODELS_DIR)

[`MODELS_SUBDIR`](#nemo_gym-environment-model_registry-MODELS_SUBDIR)

[`MODEL_CONFIGS_SUBDIR`](#nemo_gym-environment-model_registry-MODEL_CONFIGS_SUBDIR)

### API

```python
class nemo_gym.environment.model_registry.ModelEntry(
    name: str,
    model_group: str,
    config_path: pathlib.Path
)
```

Dataclass

A discovered model server: its name, group, and config file.

**`config_path`** `Path`

---

**`model_group`** `str`

---

**`name`** `str`

---

```python
nemo_gym.environment.model_registry._discover_models_in_dir(
    models_dir: pathlib.Path
) -> typing.Dict[str, nemo_gym.environment.model_registry.ModelEntry]
```

Map model name -> `ModelEntry` for every config flavor under one `responses_api_models/` dir.

One entry per `configs/<flavor>.yaml`: `<dir>` for the flavor named after the model, `<dir>/<flavor>`
for the rest. A config-less dir contributes nothing. Returns an empty dict if the directory is missing.

```python
nemo_gym.environment.model_registry.discover_models() -> typing.Dict[str, nemo_gym.environment.model_registry.ModelEntry]
```

Map model name -> `ModelEntry` for every discoverable model server.

Scans the `responses_api_models/` subdir of every `component_search_roots`
root (`NEMO_GYM_EXTRA_ROOTS` + cwd + built-ins), merged so user models shadow same-named built-ins.

```python
nemo_gym.environment.model_registry.MODELS_DIR = PARENT_DIR / MODELS_SUBDIR
```

```python
nemo_gym.environment.model_registry.MODELS_SUBDIR = 'responses_api_models'
```

```python
nemo_gym.environment.model_registry.MODEL_CONFIGS_SUBDIR = 'configs'
```