# model Option

> The option that picks which Claude model runs your agent.

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** Agent SDK model, setModel(), Claude Agent SDK model

## Think of it like

It is like picking which cook makes your meal today.

## Definition

model is the Agent SDK option that picks which Claude model runs the agent. You give it a short alias, such as sonnet, or a full model name. If you leave it out, the agent uses the same default that Claude Code would use. In streaming input mode you can switch models in the middle of a session with setModel(). Subagents can use a different model from the main agent.

## 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.

## Example code

```typescript
model: "sonnet"
```

Run this agent on the Sonnet model.

## Why it matters

The model sets the speed, the cost and how well the agent copes with hard jobs.

## Common mistake

Leaving it out and expecting the same model forever. The default can change when Claude Code updates.

## Three principles

- **Alias or full name.** sonnet, or a pinned ID.
- **Default from the CLI.** When left out.
- **Switch mid-session.** With setModel().

## Related terms

- [ClaudeAgentOptions](https://learn.benibix.com/term/ai/claude-agent-options)
- [fallbackModel Option](https://learn.benibix.com/term/ai/fallback-model-option)
- [effort Option](https://learn.benibix.com/term/ai/effort-option)
- [Claude Code Model Alias](https://learn.benibix.com/term/ai/claude-code-model-alias)
- [model Setting](https://learn.benibix.com/term/ai/model-setting)
- [Model Snapshot](https://learn.benibix.com/term/ai/model-snapshot)

![Your agent sends a request to the model named in model, Opus, which is tried first. A dashed arrow, marked only if it fails, leads to the model named in fallbackModel, Sonnet. Both paths lead to the same end: the run goes on with no error for the user.](https://learn.benibix.com/diagrams/ai9-sdk-fallback.svg)

---

Source: https://learn.benibix.com/term/ai/model-option
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
