# Class ModelRegistry

The unified model-metadata registry. Construct once, share across the process. `getEntry(modelId)` always returns something.

- Defined in packages/nexus-agents/src/config/model-registry.ts:167

##### Index

### Constructors

constructor

### Methods

getEntry
hasAuthoritative
allEntries
toMap

## Constructors

### constructor

- new ModelRegistry(options?: ModelRegistryOptions): ModelRegistry

  #### Parameters

  - options: ModelRegistryOptions = {}

  #### Returns ModelRegistry

  - Defined in packages/nexus-agents/src/config/model-registry.ts:171

## Methods

### getEntry

- getEntry(modelId: string, hints?: ModelHints): ModelEntry

  Resolve a model id to its full metadata entry. Always returns — unknown models get a derived entry with sensible defaults.

  #### Parameters

  - modelId: string
  - `Optional` hints: ModelHints

  #### Returns ModelEntry

  - Defined in packages/nexus-agents/src/config/model-registry.ts:188

### hasAuthoritative

- hasAuthoritative(modelId: string): boolean

  Has the registry got an authoritative entry for this id? Consumers use this to distinguish "we know X" from "we guessed."

  #### Parameters

  - modelId: string

  #### Returns boolean

  - Defined in packages/nexus-agents/src/config/model-registry.ts:204

### allEntries

- allEntries(): readonly ModelEntry[]

  All authoritative entries (in-tree + models.dev + manifest, deduped).

  #### Returns readonly ModelEntry[]

  - Defined in packages/nexus-agents/src/config/model-registry.ts:209

### toMap

- toMap(): ReadonlyMap<string, ModelEntry>

  Snapshot of canonical id → entry mapping.

  #### Returns ReadonlyMap<string, ModelEntry>

  - Defined in packages/nexus-agents/src/config/model-registry.ts:214