Picking an LLM for an AI agent is less about a winner, and more about a budget and a contract. You need a model that can call tools, that fits the context you will actually send, and that you can afford when those tool traces get long.
This guide walks through those trade-offs using vendor documentation only: context windows, tool calling, and list prices from OpenAI, Anthropic and Google, as of November 2026. I have not benchmarked these models against each other, and I won't rank them by quality. If you want the wider agent picture first, start with what an AI agent is.
Some links are affiliate links; they don't change your price.

What should you look at when choosing an LLM for an agent?
An agent is a model in a loop: it reads a goal, it may call tools, it reads the results, and it continues until it should stop. The model is one part of that loop, next to the tools, the prompts and the guardrails.
From the vendor docs, these are the axes that actually change the design:
- Tool calling: can the model request structured tool calls, and through which API?
- Context window: how much history, tool output and instructions can one request hold, and what happens when you get close to the limit?
- Cost: input, output, cache, and any surcharge once a request gets long. Output and "thinking" tokens often dominate an agent loop.
- Limits and policies: max output tokens, rate tiers, retirement dates, and whether prompts on a free tier are used to improve the product.
Latency matters in a live agent, but it depends on load, tool time and how much the model writes. Vendors don't publish a single number you can treat as a truth, so I won't invent one. Measure it on your own traces if it matters to you.
The prompt still matters as much as the model. A clear goal, a tool list and a stop condition, the shape I use in prompts for AI agents, will usually do more than hopping mid-tier models.
How do the current flagship APIs compare on paper?
The table below is list pricing and documented limits, as of November 2026, for a mid-tier and a higher-tier model at each vendor. It is not a quality ranking. Always re-check the vendor's pricing page before you budget, because these numbers move.
| Model | Context window | Max output (documented) | Standard input / output per 1M tokens | Tool calling (documented) |
|---|---|---|---|---|
| OpenAI gpt-6.2-sol | 1,050,000 tokens (max input 922,000) | 128,000 tokens | $2 / $10 on short context | Function calling; built-in tools on the Responses API |
| OpenAI gpt-6.2-astra | See OpenAI's model page for the matching window | See vendor page | $8 / $40 on short context | Same family of API tools |
| Anthropic Claude Sonnet 5.5 | 1,000,000 tokens | 128,000 tokens | $2 / $10 | Tool use, billed as ordinary input and output tokens |
| Anthropic Claude Opus 5.5 | 1,000,000 tokens | 128,000 tokens | $4 / $20 | Same tool-use path |
| Google Gemini 4 Hydrogen | 1,000,000 tokens (unified window; long-decode up to 1M) | Vendor describes long-decode up to 1M | $1.50 / $7.50 paid; free tier available | Function calling; declarations can count when you use grounding |
| Google Gemini 4 Carbon | 1,000,000-token long-decode, per Google's model copy | Vendor describes long-decode up to 1M | $4 / $20 from 1 December 2026 (it was $2 / $10 through 30 November) | Function calling; not on the free tier |
A few footnotes from the same docs, because the headline rate is not the bill:
- OpenAI short-context rates apply until a request's input goes over 272,000 tokens. Above that, OpenAI says input and cache rates double and output is 1.5 times the short-context rate, for the full request. Cached input on gpt-6.2-sol is $0.10 per 1M tokens, and a 30-minute cache write is $2.50.
- Anthropic's Haiku 5.5, if you need a cheaper step in a pipeline, is $0.10 / $0.50 per 1M tokens for prompts up to 100,000 tokens, and $0.50 / $2.50 once the prompt is longer than that. It also has a 1M context window.
- Google's Gemini 4 Argon follows the same schedule as Carbon: $4 / $20 from 1 December 2026, up from $2 / $10. Google describes Argon as faster and as using fewer tokens per turn than Carbon. That's their description, not a test of mine. Gemini 4 Neon is listed at $3 / $15. On Gemini, thinking tokens are billed as output, and grounding has its own search charges after a monthly allowance.
- Gemini's pricing page says content on the Hydrogen free tier may be used to improve Google's products, and that paid-tier content is not. That's a policy difference, not a quality one.

OpenAI's model page calls gpt-6.2-sol the go-to model for everyday work, including agents at scale. That's a useful starting point from their own docs, not an independent verdict. Anthropic's mid-tier equivalent in this table is Sonnet 5.5, at the same $2 / $10 headline rate. Google's cheaper documented entry in the Gemini 4 line is Hydrogen.
How much context does an agent actually need?
A bigger window is not automatically better. Anthropic's context-window documentation says this outright: more context isn't automatically better, and as the token count grows, accuracy and recall can degrade, a problem they call context rot.
Everything in the request counts. For Claude, that includes the system prompt, the whole message list, tool results, images, documents, tool definitions, and the output the model is generating, including thinking. OpenAI and Google also count the content you send, including tool traces, against the window. A 1M window is a ceiling, not a target.
For an agent, the window fills faster than a chat does, because every tool result is another message. A crawler, a repo, or a long browser trace will chew through budget even when the user's request was short.
Practical design, still without any benchmark claim:
- Keep tool output short. Log the full payload on your side, and return a summary plus a handle the model can use to fetch more.
- Don't stuff the entire knowledge base into the prompt if you can retrieve a slice, which is the usual RAG pattern, or if you can attach a file the API will reference on demand.
- Watch the vendor's overflow behaviour. Anthropic documents a 400 error if the input alone is already too long, and a stop reason when generation hits the window on current models.
- For very long runs, look at the vendor's own context tools, such as Anthropic's documented compaction and context editing, rather than silently dropping random turns.

If you're already retrieving documents, my notes on structured extraction and on RAG are the next stop. The model choice does not replace a tight context.
How should tool calling affect the choice?
If the product is an agent, skip models that cannot call tools through a documented, structured interface. All three families in the table above can.
The details differ, and you should pick from the vendor's current API docs, not from memory:
- OpenAI documents function calling on gpt-6.2-sol, and a set of built-in Responses API tools, including web search, file search, hosted shell, computer use and MCP.
- Anthropic documents tool use as ordinary tokens, and has additional guidance for thinking plus tools, including signatures you must pass back.
- Google documents function calling on the Gemini API, and notes that function declarations can be billed when you use grounding.
What I would not do is pick a model because a third-party chart said it is "better at tools". The contract you can rely on is: does this API accept a schema, validate or parse the call, and give you a result you can send back? If you need a specific built-in tool, such as computer use or MCP, confirm that tool on the model page. If you plan to write your own tools, my walkthrough on building an MCP server shows what the model actually sees.
The rest of the agent should still be small and inspectable. That's why I like starting in n8n, as in my build an AI agent in n8n guide: the model is a node, the tools are other nodes, and you can see the trace.
Coding agents in a terminal are a slightly different shape. The CLI tools comparison is about those products, not about which base model "wins".
How would I actually choose, without a bake-off?
A decision path that stays honest:
- Step 1: write the tools down, and confirm each vendor's API supports that kind of call.
- Step 2: estimate tokens per turn: prompt, tool definitions, typical tool results, and a conservative output. Multiply by the number of turns you expect.
- Step 3: price that estimate on the mid-tier model at each vendor you can use, including cache discounts and any long-context surcharge. As of November 2026, the $2 / $10 mid-tiers in the table above are the first place I would do that maths.
- Step 4: run your own traces on one mid-tier model, on your tools, with logging. Look at failures, not at vibes.
- Step 5: move up to a higher-tier model only when the failure you saw matches what the vendor says that larger model is for, and after you have checked the new unit price. Move down to a cheaper model, such as Haiku 5.5 or Gemini 4 Hydrogen, for steps that are narrow and frequent.
- Step 6: set a spend cap and a max-turn cap. A model upgrade does not fix a loop that cannot stop.

Frequently asked questions
Choose the model the way you'd choose a host: from the contract, the bill, and a short trial on your own workload. The docs above are enough to shortlist. Your traces are what should decide.
If you only do one thing, price a mid-tier model against a realistic tool loop before you upgrade anything.


