Recommended models
There are thousands of models you could point AI_MODEL at. Most of them will not work for this course, and the reason comes down to a single capability.
The one hard requirement: tool calling
An agent is a model that can ask your application to run something on its behalf. It doesn't run anything itself.
It returns a structured request saying, in effect, "call get_weather with the city set to Oslo, then tell me what came back." Your code runs the function and hands the result back.
That structured request is tool calling, and a model without it can't be turned into an agent however the surrounding code is written. It isn't a question of the model being weaker or slower. The message shape the whole course depends on isn't there at all.
Beyond tool calling, the course leans on a few related capabilities as it goes: passing strictly-typed arguments, controlling whether a tool is used at all, and returning structured output, meaning a reply shaped to a schema your interface can render instead of loose prose. Models vary in how reliably they do these, which is why the shortlist below exists.
If something breaks later, suspect the model
This is the single most useful debugging instinct for this course. If a lesson works for everyone else and not for you, and your code matches the solution, try a recommended model before assuming your code is wrong. A model limitation and a bug produce very similar-looking console output.
That back-and-forth is the whole idea of an agent. A model that can't make that request isn't a weaker agent, it isn't one at all, so this is the first thing to check about any model you're curious about.
The shortlist
Every model below has been tested against the course's actual agent workflow, not benchmarked in the abstract. They're all fast and low cost.
| Use this when | Model | Provider route |
|---|---|---|
| You want the default | gpt-5.4-nano | OpenAI |
| You want the cheapest non-OpenAI route | mistralai/ministral-3b-2512 | OpenRouter |
| You want more headroom | gpt-5.4-mini | OpenAI |
| You want the newest cost-light model | gpt-5.6-luna | OpenAI |
| You want a balanced newer model | gpt-5.6-terra | OpenAI |
| You want a larger Mistral | mistralai/ministral-14b-2512 | OpenRouter |
gpt-5.4-nano is the recommendation if you don't want to think about it. It passed every capability check the course depends on, and it's the cheapest verified route into the full workflow.
A few notes on the rest. Ministral 3B is a budget alternative and not a quality upgrade, so pick it on price. The 5.6 family is newer than 5.4, though newer doesn't mean cheaper, and Nano remains the cost-conscious default. Ministral 14B works but was slightly less consistent than the 3B on the course's combined tool-and-structured-output flow, which is why it sits lower.
OpenAI models are also reachable through OpenRouter if you'd rather keep one account and one key. openai/gpt-5.4-nano on OpenRouter is a verified route.
gpt-5.4-nano and get on with the course. It is the cheapest model that passed every check, and choosing a model is not the interesting part of this! If you want to try something else later, the table is here and nothing stops you.
Sequential versus parallel tool calls
Some models issue several tool calls in one turn, and some issue one call per turn and loop. Both complete the course.
If your model only ever calls one tool at a time, you'll still reach the same result. You won't see the batched turn demonstrated in a later lesson, where the model asks for two tools at once. That's a design choice in the model, and nothing you need to fix.
So if a lesson shows two tool calls in one reply and yours does them one after another, nothing is broken. It is the model's style, not your bug.
Free models
Free endpoints exist, mostly through OpenRouter, and they're a reasonable way to learn without spending anything.
The free route suggested for this course is google/gemma-4-26b-a4b-it:free on OpenRouter. Treat it as an experiment instead of one of the recommendations above, because free endpoints are rate limited, meaning the provider caps how many requests you can make in a period and refuses the rest, often enough that it hasn't been through the same testing.
Two caveats apply to any free route:
- Availability changes. A free model that works today may be rate limited or withdrawn next month, and free-tier policies shift frequently enough that any list printed in documentation goes stale.
- Consistency changes too. Free routes often shuffle between backing providers, so the same prompt can behave differently from one run to the next. When you're learning a new concept, that variability makes it hard to tell whether an odd result came from your code or from the route.
If a free route interrupts a lesson, switch to a verified paid model above for a few cents. That is the fastest way to rule the model out as the cause and keep going.
Check the Privacy settings first
Before enabling free endpoints at all, open OpenRouter's Privacy settings. Free routes may send your requests to providers with different data policies, and that page is where you decide which ones are allowed.
The reason is simple: you cannot tell an odd answer from an odd route, and that is exactly what you need to tell apart while learning. If a lesson starts misbehaving, spend a few cents on a paid model before you spend an hour on your code!
Going off the list
Experiment freely. That's most of the fun. Hold onto the one debugging rule from above: when something doesn't work as expected in a later lesson, check whether it's a model limitation before you go hunting through your code.
Model catalogs and prices change faster than documentation does, so treat any specific model name here as a snapshot. The provider's own model page is always the current truth on what exists and what it costs.
Two habits keep it painless: check the model can call tools before you blame your code, and copy model IDs from the provider's own page rather than from anything written a while ago, this page included!
Where this goes next
Chat Completions and Responses covers the two API shapes you'll encounter and why this course settles on one of them. If your provider values aren't saved yet, Provider setup is the page that does it.

