mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-23 00:41:40 +00:00
Success, failure and request callbacks on the native OCR path no longer go through Logging.pre_call, post_call, success_handler or failure_handler. Core's DispatchCursor selects each target and leaf method; the bridge invokes it directly or through one labeled leaf in litellm.rust_bridge.leaves. Delivery follows the family: request and sync failure run inline, deployment hooks and async failure are awaited by drive(), sync success runs as one grouped WorkerJob on the executor, async success is a coroutine enqueued on the logging worker with the deferred gate held natively in DeferredSuccess. PrepareLogging (cost, standard payload, redaction) runs inside the dispatch delivery and never fails the request; Finalize keeps only public response metadata. Dedup markers stay on the shared logging object and are read as an eligibility fact. Caller-supplied Logging instances take a separate compat path that calls their own handlers. Tests prove the two-pass hook order, per-target hook containment, hook result replacement, marker write and honour, best-effort preparation, and a positive run with every legacy orchestration entry point patched to raise. |
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| tests | ||
| AGENTS.md | ||
| build.rs | ||
| Cargo.toml | ||
| CLAUDE.md | ||