Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.295 ·

Bedrock gateways now count tokens with AWS CountTokens

On Bedrock gateways, count_tokens now calls AWS CountTokens with a 10-minute retry backoff, and the built-in gateway guide says the same

Group of 2 You'll notice Improvements
JSON All of v2.1.295
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
LLM GatewayArea: what it touches
ImprovementsKind: in v2.1.295,
ImprovementsSection of the release

What

A gateway is a proxy between Claude Code and the model provider. Bedrock is Amazon's model service. count_tokens asks how many tokens (pieces of text the model counts) a request uses.

  • The Bedrock upstream now answers count_tokens with AWS CountTokens, with a 10-second timeout, instead of failing at once.
  • If that fails it retries only every 10 minutes, and meanwhile falls back to the next upstream or to a billed one-token request.
  • The built-in gateway guide now says to answer count_tokens with Bedrock's CountTokens and return {"input_tokens": N}, using 501 only if that fails or the model is an application inference profile. Before, it said Bedrock had no count-tokens API.

Why

Token counts on Bedrock gateways can now come from Amazon directly. The AWS identity the gateway uses needs permission for bedrock:CountTokens, or it falls back as described.

Read from
Names in the bundlecount_tokens
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Added since A small documentation edit on advisor-tool touched a line naming count_tokens after this was published. | [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) | Returns the executor's first-iteration input tokens only. For a rough advisor estimate, call `client.beta.messages.count_tokens()` (typescript: `cli… agents-and-tools/tool-use/advisor-tool see the edit
Confirmed since Anthropic's documentation has since written up count_tokens, on api-and-data-retention. | [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) | `/v1/messages/count_tokens` | <Eligible>Yes</Eligible> | <Eligible>Yes</Eligible> | Count tokens before sending requests. | manage-claude/api-and-data-retention see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up count_tokens, on api-and-data-retention.

See this entry in the whole of v2.1.295 →

Feedback