litellm/litellm-rust/crates/python-bridge
Yujong Lee f0b877532c feat(python-bridge): dispatch OCR callbacks through the native cursor
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.
2026-09-16 17:50:11 +00:00
..
benches refactor(rust): extract domain-neutral Python interop 2026-09-02 12:16:26 -07:00
src feat(python-bridge): dispatch OCR callbacks through the native cursor 2026-09-16 17:50:11 +00:00
tests refactor(ocr): complete native lifecycle and preserve Azure auth (#40734) 2026-09-12 11:56:49 -07:00
AGENTS.md refactor(ocr): complete native lifecycle and preserve Azure auth (#40734) 2026-09-12 11:56:49 -07:00
build.rs feat: package Rust OCR bridge in LiteLLM wheel (#31267) 2026-06-25 12:32:55 -07:00
Cargo.toml move io to core 2026-09-16 17:50:11 +00:00
CLAUDE.md refactor(rust): extract domain-neutral Python interop 2026-09-02 12:16:26 -07:00