mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
The request crossed the boundary four times: Python bind_request into a dataclass, Rust re-reading each field back with its own precedence rules, a BridgeOcrRequest copy, then the core request. The dataclass was retained for the whole call only so map_failure could read model and kwargs at the end. Add a route-agnostic Signature binder that reproduces Python's positional and keyword binding rules and TypeError messages, and project straight from the bound arguments into the core request. This removes the Python LiteLLMOcrRequest dataclass, bind_request, PythonOcrInput, BridgeOcrRequest, and the retained boundary_request, document, api_key and callback_inputs Python objects. api_key for pre_call now comes from core's resolved connection, matching the legacy handler, and core no longer carries retained_fields or retains_document since the bridge stopped re-aliasing. |
||
|---|---|---|
| .. | ||
| lifecycle | ||
| routes | ||
| auth.rs | ||
| constants.rs | ||
| diagnostics.rs | ||
| errors.rs | ||
| execution.rs | ||
| lib.rs | ||
| marshal.rs | ||
| token_counter.rs | ||