fix(rust): align legacy lifecycle preparation

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Yujong Lee 2026-09-19 23:07:25 +00:00
parent 7e5a96c4fb
commit 8b57953295
2 changed files with 4 additions and 4 deletions

View file

@ -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::<String>().ok()),

View file

@ -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