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

# Mode - Go SDK

> Mode type definition

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

## Supported Types

### ModeAuto

```go lines theme={null}
mode := components.CreateModeModeAuto(components.ModeAuto{/* values here */})
```

### ModeRequired

```go lines theme={null}
mode := components.CreateModeModeRequired(components.ModeRequired{/* values here */})
```

## Union Discrimination

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

```go lines theme={null}
switch mode.Type {
	case components.ModeTypeModeAuto:
		// mode.ModeAuto is populated
	case components.ModeTypeModeRequired:
		// mode.ModeRequired is populated
}
```
