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

# DSL Overview

> Introduction to the Open Next Router syntax

Open Next Router (ONR) uses a custom, nginx-like Domain Specific Language (DSL) to define provider configurations. These `.conf` files specify how requests should be mapped, authorized, rewritten, and tracked for each upstream API provider.

## Where are configs stored?

The main DSL entry point is typically `config/onr.conf` in the ONR environment, and that file usually includes `config/providers/*.conf` plus global preset files under `config/modes/*.conf`.
You can still force directory mode via the `providers.dir` setting in `onr.yaml` or via the `ONR_PROVIDERS_DIR` environment variable.

Whenever you modify these DSL files, ONR can reload them dynamically without dropping traffic (via the Admin Panel or API).

## File Structure

A standard provider file follows this layout:

```nginx theme={null}
syntax "next-router/0.1";

provider "openai" {
  defaults {
    # Default variables and configurations that apply to all requests for this provider
  }

  # Match blocks intercept specific API operations (e.g. Chat vs Embeddings)
  match api = "chat.completions" stream = true {
    # Specific streaming configurations
  }
}
```

Learn about [Conventions](/dsl/conventions) to start writing your own configs.
