Models for agents: tool calling, context growth and the bill

Every text model here supports tool calling. What separates them for a 40-turn loop is context headroom and input price — the transcript is re-billed on every turn.

Tool calling is table stakes; the differences are elsewhere

Every text model in this catalog lists the tools capability — all 12 Claude ids, all 7 text OpenAI ids, the 3 text Grok ids and all 5 Gemini ids. Picking an agent model is therefore never a question of whether tool calling works.

Two ids are text plus tools and nothing else: Grok Composer 2.5 Fast and Claude Haiku 4.5 Stable. Every other text id adds extended thinking. Whether an agent benefits from thinking between tool calls depends on how much planning each step needs, and it costs output tokens either way.

The four image and video ids — gpt-image-2, grok-imagine-image, grok-imagine-image-quality and grok-imagine-video-1.5 — carry only image or video capabilities. They are things an agent calls, not models that drive one.

One turn of a tool-calling loop: the model is offered a tool and answers with a call.
export TOKEN_SHARE_KEY="<your-pool-api-key>"

curl -sS https://token-share.app/v1/chat/completions \
  -H "Authorization: Bearer $TOKEN_SHARE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.6",
    "messages": [
      {"role": "user", "content": "What files changed in the last commit?"}
    ],
    "tools": [{
      "type": "function",
      "function": {
        "name": "run_shell",
        "description": "Run a read-only shell command in the repo",
        "parameters": {
          "type": "object",
          "properties": {"command": {"type": "string"}},
          "required": ["command"]
        }
      }
    }]
  }' | jq '.choices[0].message.tool_calls, .usage'

The transcript is re-billed on every turn

An agent turn sends the entire conversation so far: system prompt, tool schemas, every previous call and every tool result. Turn 40 pays for turns 1 through 39 again. Spend does not grow with the number of turns, it grows with their running total.

Put numbers on it. Start at a 5,000-token prompt and add 3,000 tokens per turn — a modest tool result. By turn 40 the request carries about 122,000 tokens, and the 40 turns together bill roughly 2.5 million input tokens. On Grok 4.6 (0.2×, $0.40/M consumer input) that is about $1.02; on Claude Opus 5 (0.1×, $0.50/M) about $1.27; on Gemini 3 Flash (0.1×, $0.050/M) about $0.13.

Output adds to that but rarely dominates: 40 turns at 500 output tokens is 20,000 tokens, which is $0.024 on Grok 4.6 and $0.05 on Claude Opus 5. The input side is where a runaway loop shows up on the invoice.

Context headroom sets the wall the loop hits

The same growth curve decides how long the agent can run before the window is full. At 3,000 tokens per turn from a 5,000-token start, a 200,000-token window (Claude Sonnet 4.6, Grok Composer 2.5 Fast, Claude Haiku 4.5 Stable) fills at turn 66; a 500,000-token window (Grok 4.6, Grok 4.5) at turn 166; a 1,000,000-token window (the 1M Claude ids, every Gemini id) at turn 332.

GPT 6 Astra Stable has the largest window in the catalog at 1,050,000 tokens, and it is a 0.2× lane rather than 0.1× — $2.00/M consumer input against $0.50/M for Claude Opus 5, whose official rate is the same $10/M in Astra's case and $5/M in Opus's. Headroom and multiplier move independently; read both off the model page.

The wall is not the only reason to keep the transcript short. Because every turn re-bills what came before, trimming old tool output is simultaneously a way to run longer and a way to spend less. A loop that summarises its own history every ten turns changes both curves at once.

Route shape and how to compare two candidates

Agents talk to three request shapes here. Grok and Gemini ids answer on /v1/chat/completions with Authorization: Bearer. OpenAI ids answer on /v1/responses with the same header. Claude ids — and GPT 6 Astra Stable, which is routed Anthropic-shaped — answer on /v1/messages with x-api-key plus anthropic-version: 2023-06-01. Tool definitions differ between the shapes, so a harness written against one needs an adapter for another.

Within a shape, swapping ids is a one-field change. That makes the honest comparison cheap: run the same task list through two candidates, log tokens per completed task rather than per turn, and multiply by the consumer rate.

Tokens per completed task is the number that matters, and it is the one a price table cannot give you. A model that solves the task in 12 turns at $0.50/M can easily beat one that flails for 60 turns at $0.050/M, and only your own task list can tell you which is which.

Common questions

Do I need extended thinking for an agent?
It is available on every text id except Grok Composer 2.5 Fast and Claude Haiku 4.5 Stable, which are text plus tools only. Thinking spends output tokens on planning between calls, so it pays off when a wrong tool call is expensive to undo and wastes money when the next step is obvious. Run your task list both ways and compare tokens per completed task.
Why did my agent cost 10× what I estimated from the per-turn price?
Because a per-turn estimate assumes each turn sends only the new message. It sends the whole transcript. Forty turns growing by 3,000 tokens each bill around 2.5 million input tokens in total, not the 122,000 the last request carried. Estimate the cumulative total, not the final request.
Does a stable-* lane make an agent more reliable?
A stable-* id is a dedicated lane for the same upstream model, served on our own key rather than the shared account pool, and it does not participate in pool failover. It costs more — 0.4× against 0.1× on Claude, 0.2× on GPT 6 Astra Stable. No uptime figure is published for either path, so treat the choice as a routing decision rather than a reliability grade.