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

# ProviderPreferencesSort

The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.

## Supported Types

### ProviderSort

```go theme={null}
providerPreferencesSort := components.CreateProviderPreferencesSortProviderSort(components.ProviderSort{/* values here */})
```

### ProviderSortConfig

```go theme={null}
providerPreferencesSort := components.CreateProviderPreferencesSortProviderSortConfig(components.ProviderSortConfig{/* values here */})
```

## Union Discrimination

Use the `Type` field to determine which variant is active, then access the corresponding field:

```go theme={null}
switch providerPreferencesSort.Type {
	case components.ProviderPreferencesSortTypeProviderSort:
		// providerPreferencesSort.ProviderSort is populated
	case components.ProviderPreferencesSortTypeProviderSortConfig:
		// providerPreferencesSort.ProviderSortConfig is populated
}
```
