mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-02 01:28:38 +00:00
Drop the gateway-side admission layer (identity cache, /key/info lookups, process-local budget/TPM/RPM limits) and keep only the CPU work in Rust: a typed litellm-core token counter that parses the raw body once and counts input tokens with the GIL released, exposed as TokenCounter in the PyO3 bridge. The Python proxy's existing auth dependency passes the raw body into budget reservation, which uses the Rust count for models on the Anthropic tokenizer and falls back to Python for anything Rust declines, when the bridge is disabled, or when the native module is unavailable. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| tests | ||
| AGENTS.md | ||
| build.rs | ||
| Cargo.toml | ||
| CLAUDE.md | ||