# Add support for getting the token count for all parts of Gemini generation requests \(\#29630\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 76ad1a29a5dfe461358ea30f8a7616a3e8fa2206

Requested commit: 76ad1a29a5dfe461358ea30f8a7616a3e8fa2206

Commit: 76ad1a29a5dfe461358ea30f8a7616a3e8fa2206

Tree: a72230890288619371c95c1786c66f41d7a3ee8d

Author: Michael Sloan

Committer: GitHub

## Message

```
Add support for getting the token count for all parts of Gemini generation requests (#29630)

* `CountTokensRequest` now takes a full `GenerateContentRequest` instead
of just content.

* Fixes use of `models/` prefix in `model` field of
`GenerateContentRequest`, since that's required for use in
`CountTokensRequest`. This didn't cause issues before because it was
always cleared and used in the path.

Release Notes:

- N/A
```

## Parents

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

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