# Interface ModelNotFoundFallbackOptions

Adapters exports - Model adapters (Claude, OpenAI, Gemini, Ollama) Split from index.ts for file size compliance (Issue #285)

interface ModelNotFoundFallbackOptions {
cache?: AvailableModelsCache;
registry?: ModelRegistry;
adapterFactory?: (modelId: string) => IModelAdapter;
onRetirement?: (info: RetirementInfo) => void;
}

- Defined in packages/nexus-agents/src/adapters/model-not-found-fallback.ts:46

##### Index

### Properties

cache?
registry?
adapterFactory?
onRetirement?

## Properties

### `Optional` `Readonly` cache

cache?: AvailableModelsCache

Process-local cache of routable models. Refreshed on a 404. Defaults to `getDefaultAvailableModelsCache()` — passing one explicitly is the right move for tests and for multi-cache topologies.

- Defined in packages/nexus-agents/src/adapters/model-not-found-fallback.ts:52

### `Optional` `Readonly` registry

registry?: ModelRegistry

Registry used to resolve vendor/family from a model id. Defaults to global.

- Defined in packages/nexus-agents/src/adapters/model-not-found-fallback.ts:54

### `Optional` `Readonly` adapterFactory

adapterFactory?: (modelId: string) => IModelAdapter

Optional adapter factory used to build a new IModelAdapter for the fallback model id. When provided, the wrapper retries through the factory's adapter. When omitted, the wrapper logs + emits a `MODEL_NOT_FOUND` error enriched with the suggested fallback id — the caller (orchestrator / router) is responsible for re-routing.

- Defined in packages/nexus-agents/src/adapters/model-not-found-fallback.ts:62

### `Optional` `Readonly` onRetirement

onRetirement?: (info: RetirementInfo) => void

Optional callback invoked when a retirement is detected. Use for telemetry / sticky-state updates. Failures in the callback are swallowed — the user's call is what matters.

- Defined in packages/nexus-agents/src/adapters/model-not-found-fallback.ts:68