# Swap the brain

> Deepgram workshops › Build a voice agent › Swap the brain
> Web version: https://workshops.deepgram.com/voice-agent/swap-the-brain
> About 15 min (estimate). Optional.

Change the model that thinks, and hear what it costs.

- [Find the think block](https://workshops.deepgram.com/voice-agent/swap-the-brain/find-the-think-block.md)
- [Try another model](https://workshops.deepgram.com/voice-agent/swap-the-brain/try-another-model.md)

## Find the think block

This one runs in your own code, because the browser console doesn't expose the model. You need the [voice-agent-workshop](https://github.com/deepgram-devs/voice-agent-workshop) project you set up in First words, with `make run 00` working.

### Find the line

**Do:** Open First words in your language and find the `think` block in the Settings message. It names a provider type and a model.

Python, in `python/missions/00-first-words/start.py`:

```python
"think": {"provider": {"type": "open_ai", "model": "gpt-4o-mini"}, "prompt": PROMPT},
```

TypeScript, in `typescript/missions/00-first-words/start.ts`:

```ts
think: { provider: { type: 'open_ai', model: 'gpt-4o-mini' }, prompt: PROMPT },
```

Java, in `java/missions/m00_first_words/Start.java`:

```java
"think", obj("provider", obj("type", "open_ai", "model", "gpt-4o-mini"), "prompt", PROMPT),
```

**How it works**

The `think` block decides which model writes the agent's replies. The `listen` and `speak` blocks next to it don't change when you edit it, so the voice stays the same and only the thinking does.

Deepgram provides models from OpenAI, Anthropic, and Google, so you pick one by its provider `type` and `model` and leave `endpoint` out. The current list is in the [LLM models docs](https://developers.deepgram.com/docs/voice-agent-llm-models).

## Try another model

### Get your baseline

**Do:** Run `make run 00` as it is, and ask three questions you'll repeat later: "What's the weather like on Mars?", "Give me a one-line joke.", and "Explain what a mortgage is." Count the silence between the end of each question and the first word of the reply.

### Change one line

**Do:** Swap the `think` provider for Anthropic's `claude-haiku-4-5`, run `make run 00` again, and ask the same three questions.

Python:

```python
"think": {"provider": {"type": "anthropic", "model": "claude-haiku-4-5"}, "prompt": PROMPT},
```

TypeScript:

```ts
think: { provider: { type: 'anthropic', model: 'claude-haiku-4-5' }, prompt: PROMPT },
```

Java:

```java
"think", obj("provider", obj("type", "anthropic", "model", "claude-haiku-4-5"), "prompt", PROMPT),
```

**Listen for:** the wait before the first word, and how the replies are phrased.

### Compare the wait

**Do:** Try a bigger model from the same list, such as `gpt-4o`, with the same three questions. Is the wait longer? Does the reply sound better enough to be worth it?

**Check:** You ran two models and heard the difference.

**How it works**

A voice agent speaks as soon as the model sends words, so most of the silence you hear is the model's time to its first words. A bigger model often means a longer wait. Text chat hides that, and a phone call doesn't.

A stopwatch is enough here. You're comparing the wait to the first word across models, not benchmarking, so ask the same questions in the same room.

If the agent won't connect after your change, check the model id against the [LLM models docs](https://developers.deepgram.com/docs/voice-agent-llm-models). The prompt, the voice, and everything else in First words stay as they were. To adapt the agent to your own use case next, see [Adapt to your vertical](https://workshops.deepgram.com/voice-agent/second-vertical/adapt-to-your-vertical.md).
