litellm/litellm-rust/crates/token-counter/Cargo.toml
Yujong Lee 4432805bf7 refactor(rust-error): keep causes as sources across http, auth, secrets, cache and utility crates
Messages describe their own layer and every cause is a typed source,
predicates match exhaustively, and boundaries render with
litellm_error::Report. Media downloads no longer count as dispatched,
Error::upstream bounds the provider body itself, and a forwarded
header SigV4 cannot sign is the caller's fault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:33:59 -07:00

39 lines
1 KiB
TOML

[package]
name = "litellm-token-counter"
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
[features]
default = ["fast", "huggingface", "tiktoken"]
fast = ["dep:litellm-token-counter-fast"]
huggingface = ["dep:litellm-token-counter-huggingface"]
tiktoken = ["dep:litellm-token-counter-tiktoken"]
[dependencies]
indexmap = { version = "2.14.0", features = ["serde"] }
itoa = "1.0"
litellm-error.workspace = true
litellm-token-counter-fast = { workspace = true, optional = true }
litellm-token-counter-huggingface = { workspace = true, optional = true }
litellm-token-counter-tiktoken = { workspace = true, optional = true }
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
[dev-dependencies]
criterion.workspace = true
rand.workspace = true
rstest.workspace = true
tokenizers.workspace = true
[[bench]]
name = "token_counter"
harness = false
required-features = ["fast"]
[[bench]]
name = "allocations"
harness = false
required-features = ["fast"]