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

# DeferredToolsSearchStrategy

Router-local regex/BM25 or caller-owned custom search.

## Supported Types

### DeferredBm25Search

```go theme={null}
deferredToolsSearchStrategy := components.CreateDeferredToolsSearchStrategyBm25(components.DeferredBm25Search{/* values here */})
```

### DeferredCustomSearch

```go theme={null}
deferredToolsSearchStrategy := components.CreateDeferredToolsSearchStrategyCustom(components.DeferredCustomSearch{/* values here */})
```

### DeferredRegexSearch

```go theme={null}
deferredToolsSearchStrategy := components.CreateDeferredToolsSearchStrategyRegex(components.DeferredRegexSearch{/* values here */})
```

## Union Discrimination

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

```go theme={null}
switch deferredToolsSearchStrategy.Type {
	case components.DeferredToolsSearchStrategyTypeBm25:
		// deferredToolsSearchStrategy.DeferredBm25Search is populated
	case components.DeferredToolsSearchStrategyTypeCustom:
		// deferredToolsSearchStrategy.DeferredCustomSearch is populated
	case components.DeferredToolsSearchStrategyTypeRegex:
		// deferredToolsSearchStrategy.DeferredRegexSearch is populated
}
```
