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 two related behaviors as it goes: filling in a tool's arguments exactly as its schema defines them, and following an instruction about whether a tool must be used or must not be. 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 what makes an agent. A model that can't make the 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: each one completed a tool loop through the Responses API, filled in a strict tool's arguments exactly, and obeyed an instruction to call a tool or to leave tools alone. 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 efficient 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 check the course depends on, it is the course's default, and it is one of the lowest-cost routes on this list.
A few notes on the rest. Ministral 3B is a budget alternative and not a quality upgrade, so pick it on price. Luna and Terra are the efficient and balanced tiers of the newer 5.6 family; both passed the same checks, and being newer is not by itself a reason to leave Nano. Ministral 14B works but was slightly less consistent than the 3B on an extra check that combines tool calls with a strictly shaped final reply, which is why it sits lower. The course doesn't require that combination, so this is a tie-breaker rather than a warning.
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, copy it into AI_MODEL in your Scrimba environment, save, and get on with the course. 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.
Free models
Free endpoints exist, mostly through OpenRouter, and they're a good way to learn without spending anything.
The free model for this course is dots-studio/dots-3-note-preview:free on OpenRouter. It ran the course's agent loop in our checks on October 19, 2026: it called the OpenSwap tools with the right arguments, checked project health before saying a project was maintained, and answered from what the tools returned.
Free routes come and go. A free model that works today may be rate limited or withdrawn next month, so if the ID above stops working, check OpenRouter's model list for a free model with tool calling and try that.
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, including providers that may train on what you send, and that page is where you decide which ones are allowed. Free and paid models have separate settings there.
AI_MODEL, save, and carry on. A free model won't always behave exactly like the one in the recording. That's normal, and working out why is part of learning how agents behave.
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.
AI_MODEL, you're ready for the next page, which shows the request your code sends to that model. 
