---
title: Models | Letta Docs
description: Use any model with Letta Code
---

Letta Code is **model-agnostic**. Agents can use Claude, GPT, Gemini, or other supported models. Users can change an agent’s underlying model at any time, even mid-conversation.

Although you can *technically* run Letta Code with any model, it is a very demanding agent harness, and smaller / less intelligent models may struggle to produce good results.

We recommend first-time users use one of the following models to start: **Opus 4.8** / **GPT-5.3-Codex** (excellent) or **Sonnet 4.6** / **GPT-5.3** (very good). You can also use **Auto** routing (`letta/auto` or `letta/auto-fast`) when available on your account. See [leaderboard.letta.com](https://leaderboard.letta.com) for benchmarks comparing model performance.

## Switching models

Use the `/model` command to switch models during a session:

Interactive

```
> /model
```

This opens a model selector with two categories:

- **Supported** - Pre-configured models with optimized settings
- **All Available** - All models available on your account, including custom BYOK (Bring Your Own Key) models

`letta/auto` and `letta/auto-fast` are API-gated and only appear when available from your Letta API account.

Use `Tab` to switch categories, arrow keys to navigate, and `j`/`k` to change pages.

You can also specify a model when starting Letta Code:

CLI

```
letta --model gpt-5-codex
letta --model openai/gpt-5.4-mini
letta --model chatgpt-plus-pro/gpt-5.4-mini
letta --model minimax/MiniMax-M2.7
letta -m haiku
```

## Reasoning tiers

Use `/reasoning` to control model thinking effort.

- Anthropic Sonnet 4.6 and recent Opus models support the max (`xhigh`) tier
- Opus 4.5 supports none/low/medium/high tiers
- Available tiers vary by model and are filtered automatically in the selector

## Toolsets

Different models are trained to work best with different tools. For example, GPT-5 models are trained to use a patch-based editing tool, while Claude models work better with string-based edit tools.

Letta Code handles this automatically with **toolsets** - optimized tool configurations for each model family. When you switch models with `/model`, Letta Code automatically switches to the optimal toolset.

For local inference with Ollama, LM Studio, or llama.cpp, configure the provider through [Providers](/letta-code/providers/index.md) and then choose the model with `/model`.

| Toolset | Optimized for             |
| ------- | ------------------------- |
| Default | Claude models (Anthropic) |
| Codex   | GPT models (OpenAI)       |
| Gemini  | Google models             |

### Default toolset (Claude)

The default toolset is optimized for Anthropic models (Claude Sonnet, Opus, Haiku).

| Category       | Tools                                                                    |
| -------------- | ------------------------------------------------------------------------ |
| File editing   | `Edit` (string-replace), `Write`                                         |
| File reading   | `Read`, `Glob`                                                           |
| Shell          | `Bash`                                                                   |
| Search         | `Grep` (ripgrep-based)                                                   |
| Task tracking  | `TodoWrite`                                                              |
| Agent features | `Task` (subagents), `Skill` (invoke skills), `AskUserQuestion`, `memory` |

### Codex toolset (OpenAI)

The Codex toolset is optimized for OpenAI models (GPT-5, GPT-5-Codex, GPT-5.4 Mini, GPT-5.4 Nano). Uses patch-based editing instead of string-replace.

| Category       | Tools                                                                                          |
| -------------- | ---------------------------------------------------------------------------------------------- |
| File editing   | `ApplyPatch` (unified patch-based edit and write)                                              |
| File reading   | `ReadFile`, `ListDir`, `view_image`                                                            |
| Shell          | `ShellCommand`, `Shell`                                                                        |
| Search         | `GrepFiles`                                                                                    |
| Task tracking  | `UpdatePlan`                                                                                   |
| Agent features | `Task` (subagents), `Skill` (invoke skills), `AskUserQuestion`, `memory`, `memory_apply_patch` |

### Gemini toolset (Google)

The Gemini toolset is optimized for Google models (Gemini Pro, Flash).

| Category       | Tools                                                                    |
| -------------- | ------------------------------------------------------------------------ |
| File editing   | `Replace` (string-replace), `WriteFileGemini`                            |
| File reading   | `ReadFileGemini`, `ReadManyFiles`, `ListDirectory`, `GlobGemini`         |
| Shell          | `RunShellCommand`                                                        |
| Search         | `SearchFileContent`                                                      |
| Task tracking  | `WriteTodos`                                                             |
| Agent features | `Task` (subagents), `Skill` (invoke skills), `AskUserQuestion`, `memory` |

### Memory tools

In addition to the client-side tools above, Letta Code also exposes model-specific memory editing tools for maintaining [memory blocks](/letta-code/memory/index.md):

- **Claude and Gemini models**: `memory` - an omni-tool with subcommands like create, view, str\_replace, insert, delete, rename, and description updates
- **OpenAI/Codex models**: `memory_apply_patch` - patch-based memory editing for memory files, alongside `memory` where supported

When you switch models with `/model`, Letta Code keeps the memory editing path aligned with the active toolset.

Letta Code toolsets are separate from the [Letta server built-in tools](/guides/core-concepts/tools/builtin-tools/index.md) (`web_search`, `run_code`). Server built-in tools are available when building agents via the SDK or API, not as part of Letta Code’s client-side toolsets.

### Manual toolset override

If you want to force a specific toolset:

CLI

```
letta --toolset codex
```

Interactive

```
> /toolset
```
