> This page is for version Latest (default).
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemo/guardrails/latest/llms.txt
> - v0.25.0: https://docs.nvidia.com/nemo/guardrails/v0.25.0/llms.txt
> - v0.24.1: https://docs.nvidia.com/nemo/guardrails/v0.24.1/llms.txt
> - v0.24.0: https://docs.nvidia.com/nemo/guardrails/v0.24.0/llms.txt
> - v0.23.0: https://docs.nvidia.com/nemo/guardrails/v0.23.0/llms.txt
> - v0.22.0: https://docs.nvidia.com/nemo/guardrails/v0.22.0/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/guardrails/llms.txt.

# nemoguardrails.server.experimental.application

Python configuration and assembly for the transparent proxy.

Use ProxyConfig for reviewed built-ins, or pass explicit ProviderIntegration
objects to the same factory for custom Python composition. Both use the same
application lifespan, HTTP owner, routing, and Rails repository. This surface
does not load YAML, export contracts, or construct policy from generated files.

## Module Contents

### Classes

| Name                                                                                  | Description                                                              |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [`ConfigEntry`](#nemoguardrails-server-experimental-rails-config-ConfigEntry)         | Associate a deployment-owned identifier with a Rails config directory.   |
| [`ProviderConfig`](#nemoguardrails-server-experimental-_configuration-ProviderConfig) | Select one built-in provider instance and its guarded operations.        |
| [`ProxyConfig`](#nemoguardrails-server-experimental-_configuration-ProxyConfig)       | Declare built-in instances and one shared Rails configuration catalogue. |

### Functions

| Name                                                                                                    | Description                                                          |
| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`create_proxy_application`](#nemoguardrails-server-experimental-_application-create_proxy_application) | Create one proxy from a declaration or explicit Python integrations. |

### API

```python
class nemoguardrails.server.experimental.application.ConfigEntry(
    id: str,
    config_path: pathlib.Path
)
```

Dataclass

Associate a deployment-owned identifier with a Rails config directory.

**`__pydantic_config__`** `ConfigDict`

---

**`config_path`** `Path`

---

**`id`** `str`

---

```python
class nemoguardrails.server.experimental.application.ProviderConfig()
```

**Bases:** `BaseModel`

Select one built-in provider instance and its guarded operations.

An omitted dialect selects the provider's reviewed native bindings.
Operations install guard bindings, not an HTTP route allowlist. Other
routes retain passthrough behavior. A fixed Rails ID bypasses the user
resolver; otherwise the application must supply a trusted resolver.

**`base_url`** `StrictStr = Field(repr=False)`

---

**`dialect`** `Literal['litellm'] | None = None`

---

**`instance_id`** `StrictStr`

---

**`model_config`**

---

**`mount_path`** `StrictStr = ''`

---

**`operations`** `tuple[Literal['chat_completions', 'responses'], ...] = Field(min_length=1)`

---

**`provider`** `Literal['openai']`

---

**`rails_config_id`** `StrictStr | None = None`

---

```python
nemoguardrails.server.experimental.application.ProviderConfig.fixed_config_id(
    value: str | None
) -> str | None
```

classmethod

Accept an exact catalogue ID or an explicit dynamic selection.

```python
nemoguardrails.server.experimental.application.ProviderConfig.ordered_operations(
    value: object
) -> object
```

classmethod

Require an ordered concrete selection and reject coercible containers.

```python
nemoguardrails.server.experimental.application.ProviderConfig.unique_operations(
    value: tuple[str, ...]
) -> tuple[str, ...]
```

classmethod

Reject duplicates instead of silently collapsing the declared policy.

```python
class nemoguardrails.server.experimental.application.ProxyConfig()
```

**Bases:** `BaseModel`

Declare built-in instances and one shared Rails configuration catalogue.

Construction validates data without reading configuration files. Paths are
resolved by application assembly using the existing Python path semantics.
Callbacks are supplied to the application factory, not stored in this model.

**`config_resolution_timeout`** `float`

---

**`max_request_body_bytes`** `StrictInt`

---

**`max_response_body_bytes`** `StrictInt`

---

**`model_config`**

---

**`path_prefix`** `StrictStr = ''`

---

**`providers`** `tuple[ProviderConfig, ...] = Field(min_length=1)`

---

**`rails_configs`** `tuple[ConfigEntry, ...] = Field(min_length=1)`

---

**`timeout`** `float`

---

```python
nemoguardrails.server.experimental.application.ProxyConfig.config_references() -> typing_extensions.Self
```

Check catalogue identity and fixed references without filesystem I/O.

```python
nemoguardrails.server.experimental.application.ProxyConfig.ordered_entries(
    value: object
) -> object
```

classmethod

Snapshot lists or tuples rather than consuming arbitrary iterables.

```python
nemoguardrails.server.experimental.application.create_proxy_application(
    config: nemoguardrails.server.experimental._configuration.ProxyConfig | None = None,
    providers: collections.abc.Sequence[nemoguardrails.server.experimental.provider.integration.ProviderIntegration] | None = None,
    rails_configs: collections.abc.Sequence[nemoguardrails.server.experimental.rails.ConfigEntry] | None = None,
    config_resolver: nemoguardrails.server.experimental.rails.ConfigResolver | None = None,
    config_resolution_timeout: object = _UNSET_CONFIG_RESOLUTION_TI...,
    local_routers: collections.abc.Sequence[fastapi.APIRouter] = (),
    path_prefix: str | None = None,
    http_transport_factory: nemoguardrails.server.experimental._application.HttpTransportFactory | None = None,
    max_request_body_bytes: int | None = None,
    max_response_body_bytes: int | None = None,
    timeout: float | None = None
) -> fastapi.FastAPI
```

Create one proxy from a declaration or explicit Python integrations.

A ProxyConfig cannot be combined with direct assembly settings; callbacks
and local routers remain separate Python arguments. Declarative fixed Rails
IDs bypass the user resolver, while dynamic providers require it. Direct
calls retain their existing single-entry inference and explicit-resolver
behavior.

Configuration and route validation run before lifespan-owned HTTP and Rails
resources are created. No upstream calls are made during construction.