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

# Sort - Go SDK

> Sort type definition

<Warning>
  The Go SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/go-sdk/issues).
</Warning>

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

## Supported Types

### ProviderSort

```go lines theme={null}
sort := components.CreateSortProviderSort(components.ProviderSort{/* values here */})
```

### ProviderSortConfig

```go lines theme={null}
sort := components.CreateSortProviderSortConfig(components.ProviderSortConfig{/* values here */})
```

###

```go lines theme={null}
sort := components.CreateSortAny(any{/* values here */})
```

## Union Discrimination

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

```go lines theme={null}
switch sort.Type {
	case components.SortTypeProviderSort:
		// sort.ProviderSort is populated
	case components.SortTypeProviderSortConfig:
		// sort.ProviderSortConfig is populated
	case components.SortTypeAny:
		// sort.Any is populated
}
```
