# Improve token count accuracy using Anthropic's API \(\#44943\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d16619a654780aad7534caa2f3562a9b7cab423c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d16619a654780aad7534caa2f3562a9b7cab423c

Requested commit: d16619a654780aad7534caa2f3562a9b7cab423c

Commit: d16619a654780aad7534caa2f3562a9b7cab423c

Tree: 0197d946c1c7bcdf2cbeae7e254e74ce5a9ea590

Author: Richard Feldman

Committer: GitHub

## Message

```
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>
```

## Parents

- [0c91f061c360468da86bd1cb88768ceae6f71308](https://git.cafe/gitcafe/zed/commit/0c91f061c360468da86bd1cb88768ceae6f71308?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d16619a654780aad7534caa2f3562a9b7cab423c?format=markdown)
