litellm/litellm-rust/crates
Yujong Lee b4bfd92a2a refactor(rust): route-neutral callback contract
Every legacy callback call from callbacks-legacy now goes through one typed
Python shim, litellm.rust_bridge.legacy_callbacks, the only Python module
the crate reaches. Before, the crate called Logging methods, litellm.utils
hooks, the logging worker, the executor and several litellm globals
directly, and its tests retyped those signatures by hand, so an outdated
fake could accept a call the real code rejects. python_contract.json lists
each shim function's parameters: a Python test pins it to the real
signatures and a Rust test pins it to the Rust enum.

The lifecycle contract changes to match the Python @client wrapper:
- the driver emits CallEvent::Started before begin, so every host sees one
  start time
- RequestContext carries the route-resolved api_key, so legacy pre_call and
  post_call receive it, and post_call's additional_args match the Python OCR
  path
- Passthrough and its re-aliasing are gone
- async deployment hooks always run, and the "no callbacks" shortcut that
  skipped the logging payload is removed, as in the Python path

The OCR api_key is a SecretValue from the wire request onward, so Debug
output upstream of the callback contract cannot leak it.

host-python's RouteHost now classifies native failures once through
classify, and host ops return HostOpError. The OCR route host keeps main's
public errors by sending both through the existing Python map_failure.
2026-09-18 15:43:08 -07:00
..
auth refactor(rust): route-neutral callback contract 2026-09-18 15:43:08 -07:00
auth-aws refactor(rust): extract auth and cache crates 2026-09-16 18:12:11 +00:00
auth-azure refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
auth-gcp refactor(rust): extract auth and cache crates 2026-09-16 18:12:11 +00:00
cache refactor(rust): extract auth and cache crates 2026-09-16 18:12:11 +00:00
cache-memory fix(rust): evict in-memory cache entries at the expiry boundary 2026-09-16 18:30:45 +00:00
cache-redis fix(rust): address Redis cache review findings 2026-09-16 23:19:28 +00:00
callbacks refactor(rust): route-neutral callback contract 2026-09-18 15:43:08 -07:00
callbacks-legacy refactor(rust): route-neutral callback contract 2026-09-18 15:43:08 -07:00
core refactor(rust): route-neutral callback contract 2026-09-18 15:43:08 -07:00
core-utils test(rust): rename the standalone 429 test to match the rule 2026-09-18 14:01:09 -07:00
framer feat(rust): add standalone framing crate 2026-09-17 00:30:43 +00:00
host-python refactor(rust): route-neutral callback contract 2026-09-18 15:43:08 -07:00
llms refactor(rust): route-neutral callback contract 2026-09-18 15:43:08 -07:00
python-bridge refactor(rust): route-neutral callback contract 2026-09-18 15:43:08 -07:00
token-counter test(rust): assert merge cost scales linearly instead of a wall-clock bound 2026-09-16 19:43:42 +00:00
types refactor(rust): add types and core-utils crates, unify the provider error 2026-09-17 22:01:14 -07:00