language_models: Update tiktoken-rs to support newer models (#30951)

I was able to get this fix in upstream, so now we can have simpler code
paths for our model selection.

I also added a test to catch if this would cause a bug again in the
future.

Release Notes:

- N/A
This commit is contained in:
Ben Brandt 2025-05-19 13:40:36 +02:00 committed by GitHub
parent 2b6dab9197
commit 57424e4743
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 54 additions and 14 deletions

7
Cargo.lock generated
View file

@ -15807,16 +15807,15 @@ dependencies = [
[[package]]
name = "tiktoken-rs"
version = "0.6.0"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44075987ee2486402f0808505dd65692163d243a337fc54363d49afac41087f6"
checksum = "25563eeba904d770acf527e8b370fe9a5547bacd20ff84a0b6c3bc41288e5625"
dependencies = [
"anyhow",
"base64 0.21.7",
"base64 0.22.1",
"bstr",
"fancy-regex 0.13.0",
"lazy_static",
"parking_lot",
"regex",
"rustc-hash 1.1.0",
]