{"version":"2.1.260","anchor":"bedrock-upstream-gains-native-counttokens-support","canonical_anchor":"bedrock-upstream-gains-native-counttokens-support","heading":"Bedrock upstream gains native CountTokens support","tier":"internal","area":"Bedrock","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.260\/e\/bedrock-upstream-gains-native-counttokens-support","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.260","markdown":"### Bedrock upstream gains native CountTokens support\n\nBedrock now uses its native token-counting API instead of a workaround request.\n\nThe 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.\n\n- Area: Bedrock\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 1\/5"}