Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.261 ·

countTokens now falls back to gateway sampling only on HTTP 501

Token counting now only falls back to gateway sampling on a specific HTTP 501 error.

TierYou'll noticehow much it should matter to you
Useful1my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaElsewherewhat it touches
KindBug Fixesin v2.1.261,
You'll notice

Token counting now only falls back to gateway sampling on a specific HTTP 501 error.

When the direct beta.messages.countTokens call fails, Claude Code now checks that the failure is specifically an HTTP 501 before falling back to the gateway sample-count path. If that fallback itself fails, a new error is logged with the underlying failure message.

See this entry in the whole of v2.1.261 →

Feedback