Under the hood
Bedrock now uses its native token-counting API instead of a workaround request.
The Bedrock SDK client wrapper now exposes a countTokens method that calls Bedrock's native CountTokens API through a lazily-created client, with a fallback warning path that uses a max_tokens: 1 request for the aborted-request token count if the call fails.