litellm/litellm-rust/crates/host-python
Yujong Lee 08ab24c70e refactor(rust): compose callback lifecycles in a chain and tighten both contracts
Compose the legacy and v1 lifecycles behind one PythonLifecycle through
LifecycleChain, built once in python-bridge, and simplify the boundary:

- drop LifecycleEvent::Started; begin carries the start time and is the first
  thing a lifecycle hears of a call
- give PythonLifecycle pass-through defaults for the threading steps and the
  stream notices, and document which steps thread and which observe
- export one is_cancellation from litellm-host-python
- callbacks-v1: private RequestFacts fields, a golden file per EventKind by
  construction, Python EVENTS and SUPPORTED_SCHEMAS pinned to the goldens
- callbacks-v1-python: the snapshot only parses (register is the only place
  that rejects), Handler owns call/is_async, Pending keeps a subscriber index
- callbacks-legacy-python: LegacyCallbacks becomes inherent PythonLogger
  methods, deployment hooks become free functions, retained headers are
  traversed and cleared
- define the shared terms in host-python/AGENTS.md and each contract's own
  terms in its crate
- remove test_loader.py, whose fork hook was never committed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 23:31:31 +00:00
..
src refactor(rust): compose callback lifecycles in a chain and tighten both contracts 2026-09-19 23:31:31 +00:00
tests refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
AGENTS.md refactor(rust): compose callback lifecycles in a chain and tighten both contracts 2026-09-19 23:31:31 +00:00
Cargo.toml refactor(rust): rename litellm-callbacks to litellm-host and HostOpError to InvokeError 2026-09-18 15:45:08 -07:00