litellm/litellm-rust/crates/host
Yujong Lee c63d46becc
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
refactor(host): split call hooks into facets with the policy in the return type
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
2026-10-14 10:16:21 -07:00
..
src refactor(host): split call hooks into facets with the policy in the return type 2026-10-14 10:16:21 -07:00
tests refactor(rust): centralize host execution and compose callbacks (#43515) 2026-09-28 19:20:27 +00:00
AGENTS.md refactor(host): split call hooks into facets with the policy in the return type 2026-10-14 10:16:21 -07:00
Cargo.toml refactor(rust): share call lifecycle across route-owned inference (#43461) 2026-09-27 16:05:30 -07:00