tiktoken vs count_tokens: My Claude Budget Was 17% Off
This story is from 2026-09-16. It is preserved in the archive; the latest stories are on the live feed.
My budget guard said the prompt was 171,000 tokens. Haiku 4.5's context window is 200,000. Plenty of room. The API returned a 400 anyway: prompt too long. That was run 1,102 of a pipeline I'd been babysitting for three weeks, and it was the first time I seriously questioned the little function at t…
Read the full story at DEV Community — AI ↗
Timeline · 1 report
- 2026-09-16 16:59 · DEV Community — AI
tiktoken vs count_tokens: My Claude Budget Was 17% Off