> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.nvidia.com/dynamo/llms.txt. For full content including API reference and SDK examples, see https://docs.nvidia.com/dynamo/llms-full.txt.

# dynamo.router

`dynamo.router` publishes 2 classes and 3 functions. Source: [`components/src/dynamo/router/__init__.py`](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/__init__.py)

#### DynamoRouterArgGroup (class)

CLI argument group for standalone router options.

```python
from dynamo.router.args import DynamoRouterArgGroup
```

[`components/src/dynamo/router/args.py#L71`](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/args.py#L71)

**Public methods**

<h4 id="api-dynamo-router-args-dynamorouterarggroup-add-arguments">
  add_arguments
</h4>

```python
add_arguments(parser) -> None
```

Add router-owned arguments to parser.

[source](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/args.py#L76)

#### DynamoRouterConfig (class)

Typed configuration for the standalone KV router (router-owned options only).

```python
from dynamo.router.args import DynamoRouterConfig
```

[`components/src/dynamo/router/args.py#L22`](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/args.py#L22)

**Public methods**

<h4 id="api-dynamo-router-args-dynamorouterconfig-validate">
  validate
</h4>

```python
validate() -> None
```

Validate config invariants (aligned with Rust KvRouterConfig where applicable).

[source](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/args.py#L30)

#### build\_aic\_perf\_config (function)

No summary available.

```python
from dynamo.router.args import build_aic_perf_config
```

```python
build_aic_perf_config(router_config: DynamoRouterConfig) -> AicPerfConfig | None
```

[`components/src/dynamo/router/args.py#L118`](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/args.py#L118)

#### build\_kv\_router\_config (function)

Build KvRouterConfig from DynamoRouterConfig.

```python
from dynamo.router.args import build_kv_router_config
```

```python
build_kv_router_config(router_config: DynamoRouterConfig) -> KvRouterConfig
```

[`components/src/dynamo/router/args.py#L113`](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/args.py#L113)

#### parse\_args (function)

Parse command-line arguments for the standalone router.

```python
from dynamo.router.args import parse_args
```

```python
parse_args(argv: Optional[list[str]] = None) -> DynamoRouterConfig
```

**Returns**

* `DynamoRouterConfig` — Parsed and validated configuration.

[`components/src/dynamo/router/args.py#L126`](https://github.com/ai-dynamo/dynamo/blob/v1.4.0/components/src/dynamo/router/args.py#L126)