> ## 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.

# Top-Level Structure

> How a provider file is laid out.

Every provider configuration file requires a baseline structure to function.

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

provider "openai" {
  defaults { ... }

  match api = "chat.completions" stream = true { ... }
  match api = "chat.completions" stream = false { ... }
  match api = "embeddings" { ... }
}
```

### syntax

`syntax "next-router/0.1";` is a version marker. The parser currently does not strictly validate it, but it is recommended to keep it for future compatibility.

### provider

The `provider "<name>" { ... }` block encompasses all routing logic for that provider.

### defaults and match priority

A provider block typically contains a `defaults` block and several `match` blocks.

**Merge Rule (Important)**:

* Configurations defined in `defaults` are applied **first**.
* Configurations from the selected `match` block are applied **afterwards**.
* This means specific `match` settings will **merge** or **override** the generic settings set inside `defaults`.
