Improve token count accuracy using Anthropic's API (#44943)

Closes #38533

<img width="807" height="425" alt="Screenshot 2025-12-16 at 2 32 21 PM"
src="https://github.com/user-attachments/assets/6ebb915c-91d3-4158-a2b9-9fe17d301dd6"
/>


Release Notes:

- Use up-to-date token counts from LLM responses when reporting tokens
used per thread

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
d16619a654Richard Feldman committed on 12/16/2025, 7:32:41 PM· committed by GitHubparent0c91f06
5 files changedLine totals unavailable