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

# Filter

## Supported Types

### ScalarFilter

```go theme={null}
filter := components.CreateFilterScalarFilter(components.ScalarFilter{/* values here */})
```

### SetFilter

```go theme={null}
filter := components.CreateFilterSetFilter(components.SetFilter{/* values here */})
```

## Union Discrimination

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

```go theme={null}
switch filter.Type {
	case components.FilterTypeScalarFilter:
		// filter.ScalarFilter is populated
	case components.FilterTypeSetFilter:
		// filter.SetFilter is populated
}
```
