mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-20 05:04:24 +00:00
One trait per payload replaces CallHooks and its on_event bag: ArgumentHooks, ProviderHooks, ResponseHooks and OutcomeHooks over a Surface type bag. Transforms fold through the groups and stop on the first error, outcomes reach every group and only a Cancelled group stops the rest, so ChainRuntime, HookGroupAdapter, DynCallHooks and the runtime terminal match are gone. Hooks<S> composes mounted groups, request stages in mount order, response and terminal stages in reverse host-python keeps PythonSurface, the per-stage cancellation guard behind PythonSurface::group, and report_unless_cancelled as the one place an ordinary outcome error becomes unraisable. The legacy adapter implements each facet in its own file under facets/, which also lists the Python callbacks each stage reaches, and mapping.rs only collects them. SdkPolicy does its work in prepare, so the logging-before-policy ordering rule is no longer load-bearing |
||
|---|---|---|
| .. | ||
| .agents/skills | ||
| crates | ||
| docs/adrs | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||