# ModelRouter

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/runtime/model-router.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/runtime/model-router.ts#L118)

Resolves the model to use for a given task.

Usage:
```typescript
const router = new ModelRouter(GPT54_FAMILY_ROUTING_TABLE, 'gpt-5.6-terra');
const model = router.route('explore');  // → 'gpt-5.6-luna'
const model = router.route('plan');     // → 'gpt-5.6-terra'
const model = router.route();           // → 'gpt-5.6-terra' (default)
```

## Methods

| Method | Signature | Returns |
|---|---|---|
| `route` | `route(category: TaskCategory, explicitModel: string)` | `string` |
| `isActive` | `isActive()` | `boolean` |
| `summary` | `summary()` | `Record<string, string>` |

## Where it refuses work

- `ModelRouter` stops the work with an early return when `explicitModel`.
- `ModelRouter` stops the work with an early return when `category && this.table.routes[category]`.
- `ModelRouter` stops the work with an early return when `this.table.default`.
