Kind: Class
Source: atloria-monorepo/libs/agent-core/src/runtime/model-router.ts
Resolves the model to use for a given task.
Usage:
typescriptconst 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
ModelRouterstops the work with an early return whenexplicitModel.ModelRouterstops the work with an early return whencategory && this.table.routes[category].ModelRouterstops the work with an early return whenthis.table.default.
Was this page helpful?