TLDRocket
Sign in

The Same TypeScript Costs 73% More Tokens on Claude Than GPT

TLDR Dev Covered by 3 sources

Anthropic's new tokenizer for Claude models (Sonnet 5, Opus 4.8, Fable 5) produces approximately 30% more tokens from the same code than the previous tokenizer while maintaining the same list price. On identical TypeScript files, Claude's new tokenizer generates 1.73 times more tokens than GPT's o200k tokenizer, making Opus 4.8's effective price approximately $7.50/$37.50 rather than the listed $5.00/$25.00. Users comparing model prices must account for tokenizer differences rather than relying on published per-token rates, as the same work costs 32% more on Claude's newer models despite identical list pricing.

Why it matters

The cost of using different AI tokenizers varies significantly, as Anthropic's newer tokenizer generates approximately 30% more tokens compared to previous versions, leading to higher effective costs for certain content types like TypeScript.

Also covered by

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads 60+ sources, removes duplicate coverage, and summarises the day in two minutes. Free, no spam, unsubscribe anytime.