diff --git a/litellm-rust/crates/callbacks-legacy/src/adapter.rs b/litellm-rust/crates/callbacks-legacy/src/adapter.rs index 77d35acc13a..0e63b4cb892 100644 --- a/litellm-rust/crates/callbacks-legacy/src/adapter.rs +++ b/litellm-rust/crates/callbacks-legacy/src/adapter.rs @@ -20,9 +20,9 @@ use crate::{ PublicCall, PythonLogger, after_deployment_failure, after_deployment_success, before_deployment_call, deferred::{PendingLogging, PendingSuccess}, - finalize, is_internal_call, prepare, + finalize, is_internal_call, legacy_python::Streaming, - setup, + prepare, setup, }; /// What the legacy contract needs to know about the route it is logging. @@ -124,7 +124,7 @@ impl LegacyPythonLifecycle { if self.surface.updates_logging_before_preparation { let model = self.call.lookup(py, "model")?; let provider = self.call.lookup(py, "custom_llm_provider")?; - self.logger()?.update_before_preparation( + self.logger()?.initialize_failure_context( py, self.call.kwargs(), model.and_then(|model| model.extract::().ok()), diff --git a/litellm-rust/crates/callbacks-legacy/src/callbacks.rs b/litellm-rust/crates/callbacks-legacy/src/callbacks.rs index 7719e4b697b..6fea2c4ad48 100644 --- a/litellm-rust/crates/callbacks-legacy/src/callbacks.rs +++ b/litellm-rust/crates/callbacks-legacy/src/callbacks.rs @@ -6,8 +6,8 @@ use litellm_host::event::{RequestContext, WireRequest}; use litellm_host_python::to_py; use pyo3::{exceptions::PyBaseException, prelude::*, types::PyDict}; -use crate::logger::PythonLogger; use crate::legacy_python::{Logging, Wrapper}; +use crate::logger::PythonLogger; impl PythonLogger { /// `Logging.update_from_kwargs`: what the logger is told about the request it is