From 7fecea17f708a388a9e0ba906ecc4cc25082485c Mon Sep 17 00:00:00 2001 From: Troy Mitchell Date: Tue, 28 Apr 2026 16:55:22 +0800 Subject: [PATCH] llm handler: capture request_path for failover forwarding Clone request_path into the retry closure so that failover requests to alternate providers preserve the original request path. Signed-off-by: Troy Mitchell --- crates/brightstaff/src/handlers/llm/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/brightstaff/src/handlers/llm/mod.rs b/crates/brightstaff/src/handlers/llm/mod.rs index aad0ce07..b65215bd 100644 --- a/crates/brightstaff/src/handlers/llm/mod.rs +++ b/crates/brightstaff/src/handlers/llm/mod.rs @@ -941,6 +941,7 @@ async fn send_upstream_with_retry( // Capture references for the forward_fn closure let base_url = upstream_url.to_string(); let original_headers = request_headers.clone(); + let request_path_owned = request_path.to_string(); let primary_model = alias_resolved_model.to_string(); let http_client = http_client.clone(); @@ -950,6 +951,7 @@ async fn send_upstream_with_retry( let target_provider = target_provider.clone(); let base_url = base_url.clone(); let original_headers = original_headers.clone(); + let _request_path_owned = request_path_owned.clone(); let primary_model = primary_model.clone(); let http_client = http_client.clone();