diff --git a/.github/workflows/test-rust.yml b/.github/workflows/test-rust.yml index bd66b81d29a..d3befb10e24 100644 --- a/.github/workflows/test-rust.yml +++ b/.github/workflows/test-rust.yml @@ -73,6 +73,9 @@ jobs: - name: Run Clippy run: cargo clippy --workspace --all-targets --locked -- -D warnings + - name: Run Clippy (python-config feature) + run: cargo clippy -p litellm-ai-gateway --all-targets --features python-config --locked -- -D warnings + - name: Run Rust tests run: cargo test --workspace --locked diff --git a/litellm-rust/crates/ai-gateway/src/python/config.rs b/litellm-rust/crates/ai-gateway/src/python/config.rs index 6ec9595469d..54b7a53bafa 100644 --- a/litellm-rust/crates/ai-gateway/src/python/config.rs +++ b/litellm-rust/crates/ai-gateway/src/python/config.rs @@ -17,7 +17,7 @@ use crate::gil; /// Load the router's `model_list` from `config_path` via the Python reader. pub fn load_router_from_config(config_path: &str) -> CoreResult { gil::record_acquisition(); - Python::with_gil(|py| { + Python::attach(|py| { let model_list = py .import("litellm.proxy.read_model_list") .and_then(|module| module.getattr("read_model_list"))