---
title: "Apply the route with modifiers"
lesson_id: "03"
---

# Apply the route with modifiers

- **Lesson ID:** 03
- **Goal:** Map a route key to one Dynamic Profile with .model and .reasoningLevel.
- **Human lesson:** [03-profiles-and-modifiers.html](03-profiles-and-modifiers.html)

## Prerequisites

- Lesson 02 choose().

## Inputs, outputs, and artifacts

- **Inputs:** Route key and the three model instances.
- **Outputs:** A DynamicProfile body.

## Agent build steps

1. Switch on the route inside `body`.
2. Apply `.model` and, for PCC plan tasks, `.reasoningLevel`.
3. Trim history when moving to a smaller window.
4. Keep one active Profile.

## Constraints

Illustrative Swift. Cite [WWDC26 241](https://developer.apple.com/videos/play/wwdc2026/241/)/[WWDC26 242](https://developer.apple.com/videos/play/wwdc2026/242/) lightly. No em dashes.

## Key concepts

- A routed Dynamic Profile switches on the route key.
- Apply `.model` and `.reasoningLevel` on the active Profile.
- Trim transcript with `historyTransform` when hopping from PCC to the system model.
- One Profile. The body re-evaluates each prompt.

## Takeaways

- The router returns a key. The Profile body is the switch.
- Only force-unwrap a Core AI model after `choose` proved it is available.
- Do not keep two sessions just in case.

## Acceptance checks

- All three branches exist.
- One Profile is stated.
- Agent brief link is present.
