Cut off the text as soon as any stop words occur.
Check if all requirements for Anthropic count_tokens() are met.
Get the number of tokens in a string of text.
Get the token IDs for a string of text.
Helper function to validate AWS credentials and create an AWS client.
Check if the thinking parameter is enabled in the request.
Trim trailing whitespace from final AIMessage content.