litellm/litellm-rust/crates/host-python
Yujong Lee b4d4016701 refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python
Rust's run_call built Python streams itself and imported
litellm.rust_bridge.streams by name, so sync calls were driven in Rust
while async calls came back as a Rust-made coroutine. Every native
inference entrypoint now returns one unstarted Execution and
public_execution.py drives it with lifecycle.run or lifecycle.drive,
wrapping streams and _hidden_params on the Python side. Rust only
imports the lifecycle step classes through StepTypes, and
python-bridge/src/lifecycle.rs, PythonLifecycle and streams.py are gone.

The adapter trusts the _native.pyi contract with a single cast instead
of a per-request runtime_checkable isinstance. Binding tests assert the
adapter starts the execution and returns its completed value rather
than checking callable identity.
2026-10-13 21:35:17 -07:00
..
src refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python 2026-10-13 21:35:17 -07:00
tests refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python 2026-10-13 21:35:17 -07:00
AGENTS.md refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python 2026-10-13 21:35:17 -07:00
Cargo.toml refactor(host-python): run the Python driver as one async body 2026-10-13 20:03:58 -07:00