Which AI model should you use, and what does it cost?
Questions and answers by Ali Ameen. Updated 14 October 2026.
Which is the best AI model for TypeScript coding?
No public benchmark measures TypeScript on its own, so there is no proven single winner. On the Artificial Analysis Intelligence Index, the five top models among the 17 compared here are Claude Opus 5.5 (54), Claude Fable 5.1 (51), GPT-6 Astra (51), GPT-6.1 Sol (50) and Claude Sonnet 5.5 (47). For most TypeScript work, Sonnet 5.5 or GPT-6.1 Sol is the value pick at $2 input and $10 output per million tokens.
Opus 5.5 costs $4 input and $20 output per million tokens. Fable 5.1 and GPT-6 Astra cost $10 and $50. Use Opus 5.5 for hard type-level work and architecture decisions, and a $2 model for everyday edits.
The Index is a general score, not a TypeScript score. Aider Polyglot includes TypeScript among several languages, but coverage says its published results were last updated in November 2025. SWE-bench Verified uses Python repositories.
To settle it for your codebase, run 30 real tasks (type errors, refactors, generics, test fixes) through two models and compare how many pass your tests.
Frontend work has a direct test: Arena's WebDev leaderboard, where people vote on web apps that models build. Reports from September and October 2026 put GPT-6 Astra and Anthropic's Claude Fable 5.1 and Opus 5.5 at the top, trading places between snapshots, so treat the order as unsettled.
One October report said the leading model had fewer than 900 votes, so its lead is less certain than on the general leaderboard. Check the live board before you decide.
The price gap is large: Astra and Fable 5.1 cost $10 input and $50 output per million tokens, Opus 5.5 costs $4 and $20, and Sonnet 5.5 and GPT-6.1 Sol cost $2 and $10.
A practical split: use a top-rated model for the first draft of a screen, then a cheaper one for small fixes and iterations.
What is the cheapest AI model that is still good enough?
Three models score between 33 and 42 on the Intelligence Index while charging $0.50 per million output tokens: GLM-5.3-Flash (42), Claude Haiku 5.5 (38) and GPT-6 Luna (33). Sonnet 5.5 scores 47 at $10 output, which is 20 times the price for 5 to 14 more points.
Good enough depends on the task. Classification, extraction and short summaries rarely need more. Multi-file edits and design decisions usually do.
Gemini 3.8 Flash scores 41 at $0.75 input and $3.75 output. Its price doubles on 1 January 2027.
A cache read costs 2.5% to 19% of the normal input price, depending on the model, so cached input is 81% to 97.5% cheaper. At a 90% hit rate on Claude Sonnet 5.5, the cached part of each request is 83% cheaper, not 90%, because the 10% of misses pay a 25% write premium.
Cache reads as a share of input price: Haiku 5.5 10% ($0.01 against $0.10), Sonnet 5.5 and Opus 5.5 5%, Fable 5.1 2.5%, GPT-6.1 Sol 5%, GLM-5.3 19%.
Not every vendor publishes a cache price. Alibaba lists a discount without a number.
To get hits, keep the system prompt, tool list and reference material first and unchanged. Put timestamps and per-request data last.
Why does AI usage run out so fast when the cache expires?
Anthropic's default cache lasts 5 minutes. After a longer break, the whole conversation is written to the cache again at 125% of the input price instead of read at 5% to 10%. On Sonnet 5.5, that one turn costs 25 times more than a cached turn ($2.50 against $0.10 per million input tokens).
A 1-hour cache is available at 2 times the input price for writes.
Compact the conversation after each finished feature, while the cache is warm. A shorter history is cheaper to re-write after a break, and cheaper to read on every turn.
The calculator's Cache clock tab simulates a 40-turn session with breaks.
On the Vectara leaderboard, updated 22 September 2026, GPT-6 Sol has the lowest rate in the GPT-6 family at 6.5%, ahead of GPT-6 Astra at 8.7%. Claude's newest models are not on the board yet; the latest Claude entries run from 9.8% (Haiku 4.5) to 12.0% (Opus 4.7). Smaller models score lowest overall, such as GPT-5.4 nano at 3.1% and Gemini 2.5 Flash-Lite at 3.3%.
The leaderboard measures how often a model adds claims that are not in a document it was asked to summarise. It does not measure open-ended factual questions. Lower is better.
Add a citation check to any pipeline where wrong claims are costly: require a quote from the source and verify that the quote exists.
Is it worth sending simple tasks to a cheaper model?
Yes, when part of the work is simple. Claude Haiku 5.5 charges $0.10 per million input tokens against $2 for Sonnet 5.5, which is 20 times less, and scores 38 against 47 on the Intelligence Index. Classification, extraction and short summaries rarely need the stronger model.
In the calculator's example team, moving 30% of calls to Haiku cuts the remaining monthly bill from $954 to $684, a 28% drop.
Adopt a routing rule only after a test: run 30 real examples of the task through the cheaper model and keep it if the pass rate is within 3 points of your current one. Escalate any answer that fails an automatic check to the stronger model.
Half. Anthropic and OpenAI both list a 50% discount on input and output tokens for the Batch API, in exchange for results that can take up to 24 hours. It suits evaluations, backfills, nightly reports and bulk edits.
Batching stacks with caching. Send anything a person is not waiting on through the batch route.
What should an engineering team do first to cut LLM costs?
Make three changes: keep the start of every conversation identical so it caches, compact the conversation after each finished feature, and put a dollar cap on every automated run. In the calculator's example team, caching alone cuts a $5,148 monthly bill to $1,243.
Then route simple tasks to a cheaper model, batch anything that can wait, and ask for shorter answers.
Measure before and after: record input, cached input, output tokens and dollars per call, and revert any change that makes the numbers worse.
In the calculator's example (12 developers, 150 model calls a day each, 60,000 tokens of history, Sonnet 5.5), the bill is $5,148 a month, or $429 per developer, with no savings measures. With caching, compaction, routing and batching it is $616, or $51 per developer.
These figures come from modelled assumptions, not from a measured team. Change the inputs in the calculator to match your own usage.