ZIm/crates/language_models
Ben Brandt 3a3d3c05e8
Improve token counting for OpenAI models (#30242)
tiktoken_rs is a bit behind (and even upstream tiktoken doesn't have all
of these models)

We were incorrectly using the cl100k tokenizer for some models that
actually use the o200k tokenizers. So that is updated.

I also made the match arms specific so that we do a better job of
catching whether or not tiktoken-rs accurately supports new models we
add in.

I will also do a PR upstream to see if we can move some of this logic
back out if tiktoken better supports the newer models.

Release Notes:

- Improved tokenizer support for openai models.
2025-05-08 13:09:29 +00:00
..
src Improve token counting for OpenAI models (#30242) 2025-05-08 13:09:29 +00:00
Cargo.toml Send up Zed version with edit prediction and completion requests (#30136) 2025-05-07 15:44:30 +00:00
LICENSE-GPL Add language_models crate to house language model providers (#20945) 2024-11-20 18:49:34 -05:00