Topic
Cost and model routing
Ways to spend fewer tokens for the same result: a cheaper model first, a lower effort setting, a leaner context.
In the section Agents at work
14 days · 16 stories · 6 briefs, newest first
An open plugin makes coding agents cheaper the longer they work in a project
TokenEconomizer, from UC Berkeley, Microsoft Research and Microsoft Security, learns from a coding agent's finished sessions in a repository. On 277 SWE-Bench tasks it lowered the mean cost per task by 18.4 to 30.9% across five combinations of agent and model. Microsoft Research described it on 16 November; the paper was submitted on 15 October.
Practical takeaway
The plugin works with Claude Code, Codex, GitHub Copilot's command-line tool and Pi, and keeps what it learns on the developer's own machine. It pays off in projects visited often: the first few tasks can cost more while it learns, and in the tests every project was cheaper by the sixth task.
Agent securityCost and routing
Bait prompts catch AI providers leaking what customers send them
A research team at Dragos led by HD Moore sent approximately two million prompts carrying unique URLs and canary credentials to widely used AI services from July through November 2026 and watched where the secrets surfaced. On 22 November OpenRouter said it had off-boarded three providers and removed 125 endpoints from Zero Data Retention eligibility.
Practical takeaway
Dragos's advice is to choose where prompts go, or the lowest price will choose. For sensitive work, go straight to one large provider or run the model in-house, and on a routing service pick the providers by hand. A fake password placed in the text an agent sends, with an alarm on its use, shows whether anything leaks.
OpenAI shows when a much faster coding agent is worth using
A post on OpenAI's developer blog of 20 November describes working with Ultrafast, the mode launched with GPT-6.2 Astra and Sol that offers up to 4.5 times faster token generation in Codex. In the API it is promoted at 3 times Standard pricing through 28 February 2027 and costs 6 times Standard from 1 March.
Practical takeaway
Speed pays where the model's own writing is the wait. For quick back-and-forth, keep each request small, use a low reasoning setting, watch the result live, and leave the tests until the result looks right. Where builds, tests or image generation take most of the time, the extra cost buys little.
Deep diveCost and routingCoding agents
Changing models mid-session throws away the cache a coding agent paid for
A post from Edgee, which runs a gateway that routes coding agents between models, argues that choosing the cheapest capable model for each request is only half of routing. Every change of model throws away the prompt cache, so the other half is deciding when a running session should move, and that has the shape of a classic rent-or-buy problem.
Practical takeaway
Before moving a long session to a cheaper model, count what it costs to make the new model read the whole conversation again. The cheap moments to switch are right after the conversation has been compacted or after a long pause, when everything has to be read again anyway. Move up to a stronger model as soon as the work needs it.
In brief
llama.cpp can now run small models that choose instead of write (opens in a new tab)
llama.cpp, the widely used program for running models on one's own computer, now supports decision models: small models that do not write text but pick one of the options they are given and say how sure they are. They are a fast, cheap local way to sort requests, filter content or check whether an agent's step worked, without calling a large model.
huggingface.co
Google releases Gemini 4 Neon, a cheaper middle model that ranks third overall
Google released Gemini 4 Neon on 18 November, a model that sits between the large Gemini 4 Carbon and the fast Gemini 4 Hydrogen. It costs $3 per million input tokens and $15 per million output tokens, reads up to 1 million tokens, and ranks third with a score of 61 on the Artificial Analysis Intelligence Index at its highest thinking level.
Practical takeaway
Teams that use Google's largest model can run their own tasks on Neon and compare what one finished task costs, not the list price. Neon is in Google's paid developer tools, in Antigravity and in the Gemini app for paying subscribers.
OpenAI's GPT-6.2 arrives as Astra for hard problems, Sol for everyday agent work
OpenAI released two GPT-6.2 models on 17 November: Astra for the most demanding reasoning and coding, at $8 per million input tokens and $40 per million output tokens, and Sol for everyday coding and agents, at $2 and $10. Both read up to 1,050,000 tokens, and both change how the Responses API keeps a model's earlier reasoning.
Practical takeaway
Before switching, look for places where an application rewrites earlier developer messages or tool calls, or changes settings mid-session, and make the start of every request stay the same from turn to turn. Move standing instructions into a developer message at the start of the input. Check how often requests pass 272K input tokens, where the price of the whole request goes up, and remove any "be concise" instructions written for older models.
Deep diveLocal modelsContext and memory
Together AI with Ollama explain what breaks the prefix cache in long agent sessions
A coding agent sends the whole conversation again on every turn, and prefix caching is what keeps that affordable. In a joint post, Together AI, which runs an inference service, and Ollama, which connects coding harnesses to open models, set out what each side has to get right so a session stays fast at turn ninety.
Practical takeaway
A quick audit of any agent harness: render two consecutive requests and compare them from the first byte; the first difference shows where the cache breaks. Keep the system prompt and tool list identical for the whole session and across sessions, add late-loaded tools and changing values at the end, set the reasoning effort once, and make every truncated tool result say what was left out.
In brief
Linked billing, in beta, lets a customer link its Claude Platform organization to a platform such as Asana, Linear, Warp, Factory or Railway, so API usage is billed to that organization without any key changing hands. Customers approve each platform, set a monthly spend limit for it and can unlink at any time. Requests run in the platform's organization, so the customer's own settings such as IP allowlists, encryption keys and data retention do not apply.
claude.com
Requests to language models pick a provider among 80+ by live price, speed and reliability, and a failed try is retried on the next one within the same call. Code and prices stay the same, with no Hugging Face markup. The router speaks the OpenAI Chat Completions and Responses APIs and Anthropic's Messages API for every chat model.
huggingface.co
Google finds that coding agents on Kubernetes wait 78% of the day
A Google Cloud post works out what it costs to run 100 coding agents on GKE, with one Pod per session or with sandboxes that give their machine back while they wait. The answer turns on one number a team can measure: prompts per hour.
Practical takeaway
Before choosing a setup, take a week of prompts per hour from the gateway logs and compare the busiest hour with 4.5. Below that, parking idle sandboxes saves money; above it, one Pod per session does. In both cases, size the warm pool for the busiest hour and compare the options at the same CPU guarantee.
Model releasesCost and routing
Alibaba's Qwen team releases Qwen4-Max and says it finishes the same work with fewer tokens: its average cost per task fell from $4.43 to $1.67
Qwen4-Max is the first model of a new Qwen generation, with a one-million-token context window and built-in vision. It is available through the API today, and the team says smaller open-source models will follow.
Practical takeaway
When comparing models for agent work, compare the cost of a finished task and not the price per token: here most of the saving comes from the model needing fewer tokens. Teams that depend on open weights have nothing to download yet. The secure-coding figures are a reminder that generated code needs a security review whichever model wrote it.
In brief
Coding Agent Index 2.1: more effort is not always a better score (opens in a new tab)
Artificial Analysis now reports cost per task for each effort level. In Claude Code, Claude Fable 5.2 scores 58 at high for $7.51 per task and 58 at xhigh for $15.47, while max scores 56 for $44.22 because more attempts hit the time limit.
artificialanalysis.ai
Gemini 4 Hydrogen arrives with Orchestrator, which plans with Carbon and hands the edits and tests to Hydrogen
Google released Gemini 4 Hydrogen, the lowest-priced Gemini 4 model, and an Antigravity mode that switches between Carbon and Hydrogen inside one session. Google reports near-Carbon task success on 24% less quota, but until 1 December Hydrogen costs only 25% less per token than Carbon.
Practical takeaway
In Antigravity, pick Orchestrator (Carbon) on Ultra or Orchestrator (Argon) on Pro for everyday feature and debugging work, and keep plain Carbon for design-heavy tasks. In the API, try Hydrogen at
lowormediumfor routine edits and test runs, compare cost per finished task rather than per token, and check the bill again after the 1 December price change for Carbon and Argon.
Cost and routingContext and memory
A CLI used 1,421 tokens for a GitHub task that cost 59,417 through the default MCP server
OpenRouter measured the same GitHub question through a CLI, a skill and MCP on four models, and tool definitions and oversized results explain most of the gap.
Practical takeaway
run the published mcp_cost.py script against an MCP server to measure its per-request overhead on the model in use, then expose only the needed tools (for GitHub, --toolsets=issues,repos), request specific fields instead of full objects, and prefer a CLI plus a short skill where the agent has a shell.
Gemini Decisions API scores up to 1,000 yes/no, choice and rubric questions in one pass
A new endpoint and model, gemini-decision-1, returns probabilities instead of generated text for routing, policy checks and context grading.
Practical takeaway
replace a generative classification call, such as picking a tool, a model or a policy label, with one decisions call, and send low-confidence results to a fallback model or a human.
Amazon swapped Sonnet for a small decision model on ticket labels, behind a three-way switch
Two Amazon engineers replaced Claude Sonnet 4.6 with Strands Decider for sorting tickets into 20 categories, at about 98 percent less cost, after running both models side by side on live traffic.
Practical takeaway
If an LLM call only picks from a fixed list (triage, routing, tagging), put a flag in front of it with three modes: old model only, both in parallel, new model only. Run both on real traffic and read every disagreement before switching, and serialize JSON inputs with sorted keys (for example
json.dumps(obj, sort_keys=True)) so runs are comparable.
In brief
Gemini 4 Carbon is open to everyone, at a launch price (opens in a new tab)
$2/$10 per million input/output tokens until 1 December, then $4/$20, with low, medium and high thinking efforts (medium is the default). Simon Willison's
llm-gemini0.36 adds it.simonwillison.net
Meta's Muse Ember joins the cheap-model tier (opens in a new tab)
$0.10/$0.50 per million tokens for prompts up to 200k, higher above that, with six reasoning levels from
minimaltomax. Simon Willison's table sets its long-prompt pricing against GPT-6 Luna and Claude Haiku 5.5.simonwillison.net
A cheaper model looked equal until Datadog read the traces
Datadog split live traffic between GPT-5.6 Luna and GPT-6 Luna in its own agent and found the price win came with more bad tool calls.
Practical takeaway
Before swapping the model behind an agent, log tool-call errors and retries per task next to the judge score, run both models on the same real requests, and read a few traces where they differ. A quality score alone hides how much work recovery took.
Let the cheap model go first and hand only its unsure cases to Opus
Hightouch got close to Opus accuracy at under a quarter of the cost by escalating on confidence.
Practical takeaway
For any classify or judge step, log the cheap model's confidence, plot errors by confidence bucket, and route only the middle band to the big model. Claude Code has the same idea built in:
/advisor opuswith Sonnet as the main model.
Turn reasoning effort down: most of the score at a fraction of the price
Vals ran the top model from seven labs at low, middle and max reasoning across eight agentic benchmarks.
Practical takeaway
Default assistants and API scripts to low effort, raise it only for migrations, long terminal sessions and research, and compare a week of spend.
