litellm/litellm-rust/crates/callbacks-legacy-python
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
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): make Python hooks async fns 2026-10-13 21:38:55 -07:00
python_contract.json fix(lens): price agent traces by joining gen_ai.response.id to spend logs (#44738) 2026-10-06 19:55:26 +00:00