01 / 19
Model types, their strengths and weaknesses; chat, editor and terminal-based tools.
In frontend development, AI has two layers:
The model: the AI that produces the code (e.g. the Claude, GPT, Gemini versions).
The tool: the interface that reads files, understands the project and runs commands (e.g. Cursor, Claude Code).
The model you pick decides most of the quality of the code you get. The tool matters too: the same model can give different results in different tools, because each one sends the model a different context. You will see this in the Prompt and context engineering guide.
On the tool side, the real split is between chat and agent. If you have a chat tool write a useCart hook, you copy the code into the project yourself. An agent (Claude Code, or Cursor's agent mode) writes the same hook straight into the file, runs the test and fixes it itself when something breaks1.
The ranking tables below are built from the Frontend filter of the Arena AI site's WebDev leaderboard, as it stood on October 16, 20262. Arena is a coding leaderboard where users compare the interfaces two models built and vote. New tests and votes can move the ranking daily; check the site for the current results.
Looking at the Arena AI data by the company that develops the model (October 16, 2026, 782,515 votes across 145 models), the table is this:
| Rank | Company | Best model | Model score |
|---|---|---|---|
| 1. | Anthropic | Claude Opus 5.5 | 1,850 |
| 2. | OpenAI | GPT-6 Astra | 1,799 |
| 3. | Gemini 4 Argon | 1,688 | |
| 4. | Alibaba | Qwen 3.8 | 1,686 |
| 5. | Meta | Muse Spark 1.3 | 1,673 |
The same evaluation, ranked by model (October 16, 2026, 782,515 votes across 145 models), looks like this:
| Rank | Model | Score | Price (input / output, $ / 1M tokens) |
|---|---|---|---|
| 1. | Claude Opus 5.5Anthropic | 1,850 | $4 / $20 |
| 2. | Claude Sonnet 5.5Anthropic | 1,807 | $2 / $10 |
| 3. | GPT-6 AstraOpenAI | 1,799 | $10 / $50 |
| 4. | Claude Fable 5.1Anthropic | 1,775 | $10 / $50 |
| 5. | GPT-6.1 SolOpenAI | 1,769 | $2 / $10 |
| 8. | Gemini 4 ArgonGoogle | 1,688 | $2 / $10 |
| 10. | Qwen 3.8Alibaba | 1,686 | $2 / $6 |
| 13. | Muse Spark 1.3Meta | 1,673 | $1.25 / $4.25 |
| 29. | Claude Haiku 5.5Anthropic | 1,603 | $0.10 / $0.50 |
Two things to keep in mind while you read the table:
The scores are mostly measured with the models' highest effort setting (max or xhigh). In daily use, a lower setting can mean a lower score2.
The same model's place in the general WebDev leaderboard, or under the React filter, can be different.
For frontend work the Claude models sit at the top of the leaderboard. Within that family, Claude Sonnet 5.5 strikes the balance between price and performance.
Anthropic describes Sonnet 5.5 as the faster, cheaper counterpart to Opus 5.5. Opus 5.5 is for complex work that needs careful judgement, while Sonnet 5.5 suits well-defined daily tasks and bug fixing3.
Models fall into three tiers along the axes of power, latency and cost.
The strongest tier. For complex reasoning, designing a system architecture from scratch and hard debugging. Expensive and relatively slow. Example: Claude Opus 5.5, GPT-6 Astra.
The balanced tier. The main choice for writing day-to-day components and hooks, building features and reviewing code. The tier with the best balance of speed, cost and quality. Example: Claude Sonnet 5.5, GPT-6.1 Sol.
The fast, cheap tier. For mechanical work that needs low latency: bulk import updates, type fixes and clearing lint errors. Example: Claude Haiku 5.5, GPT-6 Luna ($0.10 / $0.50).
Reasoning models are strong on multi-step, complex work but are generally slower and more expensive. Small models are faster and cheaper4.
The model sets the ceiling of what is possible. Effort sets how much work the model puts in: how many files it reads, how much it verifies6. For most work the default setting is enough.
When the result comes out wrong, ask yourself: does the model not know, or did it not try hard enough? Say CartSummary is calculating the total incorrectly:
If the model patched something on the surface without reading the relevant file, the problem is effort. Raise it.
If it read the files and ran the test and is still getting it wrong, the problem is the model. Move up a tier6.
In Claude Code you change it with /effort. Reach for high or xhigh when the cases are easy to overlook (a bug in code you didn't write, a flaky test), and low for quick sketches and small renames. Save max for a truly hard problem, because it tends to overthink ordinary work.7 Phrases like "think it through" won't lift the model past its effort setting. For deeper reasoning on a single message, put ultrathink in that message.7
Google's Gemini 3 guide says something similar: the model already thinks on its own. Telling it to "think very hard" can improve performance but it spends extra thinking tokens8.
Tools are usually grouped by where they run. The lines are blurring: alongside the terminal, Claude Code also runs as an IDE extension, on the desktop and on the web9.
| Tool type | How it works | Example | When |
|---|---|---|---|
| Chat | You talk in a browser or an app and copy the code yourself | ClaudeChatGPTGemini | Getting ideas, learning a concept, a short snippet |
| Editor | Runs inside your code editor, with completion, chat and an agent mode | CursorGitHub Copilot | Daily coding, seeing a change as a diff and approving it |
| Terminal | Reads the project, edits files, runs commands and tests | Claude CodeCodexGemini CLI | Multi-file work, writing and running tests, the debugging loop |
Warning
Do not paste API keys, the contents of .env or customer data into a chat. At work, follow your company's AI policy.
Here is how you can apply this tier logic and these model choices while building the cart and checkout of an online store.
| Task | Tier and tool | Why |
|---|---|---|
| Designing the cart and checkout architecture | The strongest tier (Claude Opus) + terminal (CLI) or chat | Getting stock consistency, state management and the security steps right needs deep reasoning. |
Writing the CartItem component and the useCart hook | The balanced tier (Claude Sonnet) + editor (Cursor or GitHub Copilot) | In daily interface work, what matters is high code quality at a reasonable speed and cost. |
| Updating import paths across 30 files | The fast, cheap tier (Claude Haiku) + terminal (CLI) or editor | Mechanical updates that carry no logical risk should not go to an expensive model. |
However strong a model is, it has four limits. Knowing them tells you how far to trust its output.
Its knowledge stops at its training date. When the installed library is newer than what the model knows, it suggests the old API. You saw the Next.js examples of this in the Next.js with AI agents lesson. The fix is to put the current docs in its context.
It can make things up. It can suggest a prop, a function or a package that does not exist. A study of 576,000 code samples generated by 16 models found that commercial models suggested non-existent packages at least 5.2% of the time, and open models 21.7% of the time.10 Attackers can publish fake packages under those names (see Secret and dependency security). Check every suggested package on npm before installing it.
Sounding sure is not the same as being right. A model writes a wrong answer in exactly the same tone. Anthropic says that giving the model permission to "say I don't know if you are not sure" and asking it for sources for its claims reduces made-up answers noticeably.11
It does not see the running application. Without a browser, a test or a screenshot, it cannot know what the interface actually looks like. Give it a way to check its own work (see Testing, evals and code review).
Don't
Committing code you cannot explain.
Approving payment, authorization and personal-data code without reading it.
Installing a suggested package without looking up its name.
Sources
The difference between a chat that only suggests code and a coding agent that writes, runs and fixes it.
The frontend coding leaderboard the company and model rankings come from.
Where Sonnet 5.5 stands next to Opus 5.5: speed, cost and daily tasks.
The trade-offs between reasoning, large and small models (the "Choosing a model" section).
Input and output tokens, pricing and how they relate to cost.
What the model and the effort level each change, and which one to reach for when.
The `/effort` levels, when to change them, and `ultrathink`.
Gemini 3's thinking behaviour (the "Enhancing reasoning and planning" section).
The places Claude Code runs: terminal, IDE, desktop and web.
Spracklen et al., USENIX Security 2025. Rates of non-existent package suggestions across 16 models.
Permission to say "I don't know", grounding with quotes and verifying with sources.
Check the lesson's main ideas with three questions.
Your progress is stored only in this browser.
Last updated: November 3, 2026