🧩model Option
Also known as Agent SDK model, setModel(), Claude Agent SDK model
The option that picks which Claude model runs your agent.
Think of it like
It is like picking which cook makes your meal today.
Example
Zoe's agent sorts support tickets all day. She sets model to a small, fast model, and keeps the big one for the hard tickets.
Why it matters
The model sets the speed, the cost and how well the agent copes with hard jobs.
Definition
Example code
typescript
model: "sonnet"Common mistake
Key takeaways
- 1Alias or full name. sonnet, or a pinned ID.
- 2Default from the CLI. When left out.
- 3Switch mid-session. With setModel().