# Add helper method for checking if the LLM token needs to be refreshed \(\#47511\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 097cfae77e619b537233a35567d11d9261c255b2

Requested commit: 097cfae77e619b537233a35567d11d9261c255b2

Commit: 097cfae77e619b537233a35567d11d9261c255b2

Tree: 14effd0707e3674fd5b0833ddc7ce973674fb947

Author: Marshall Bowers

Committer: GitHub

## Message

```
Add helper method for checking if the LLM token needs to be refreshed (#47511)

This PR adds a new `needs_llm_token_refresh` helper method for checking
if the LLM token needs to be refreshed.

We were duplicating the check for the `x-zed-expired-token` header in a
number of spots, and it will be gaining an additional case soon.

Release Notes:

- N/A
```

## Parents

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

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