diff --git a/crates/brightstaff/src/handlers/agent_chat_completions.rs b/crates/brightstaff/src/handlers/agent_chat_completions.rs index 576a4619..010f2b8e 100644 --- a/crates/brightstaff/src/handlers/agent_chat_completions.rs +++ b/crates/brightstaff/src/handlers/agent_chat_completions.rs @@ -186,15 +186,6 @@ async fn handle_agent_chat( let message: Vec = client_request.get_messages(); - // let chat_completions_request: ChatCompletionsRequest = - // serde_json::from_slice(&chat_request_bytes).map_err(|err| { - // warn!( - // "Failed to parse request body as ChatCompletionsRequest: {}", - // err - // ); - // AgentFilterChainError::RequestParsing(err) - // })?; - // Extract trace parent for routing let trace_parent = request_headers .iter() @@ -263,7 +254,7 @@ async fn handle_agent_chat( for (agent_index, selected_agent) in selected_agents.iter().enumerate() { let is_last_agent = agent_index == agent_count - 1; - + debug!( "Processing agent {}/{}: {}", agent_index + 1, @@ -351,7 +342,7 @@ async fn handle_agent_chat( // For intermediate agents, collect the full response and pass to next agent debug!("Collecting response from intermediate agent: {}", agent_name); let response_text = response_handler.collect_full_response(llm_response).await?; - + // Create a new message with the agent's response as assistant message // and add it to the conversation history current_messages.push(OpenAIMessage { diff --git a/crates/brightstaff/src/handlers/agent_selector.rs b/crates/brightstaff/src/handlers/agent_selector.rs index ad281d7c..0733035b 100644 --- a/crates/brightstaff/src/handlers/agent_selector.rs +++ b/crates/brightstaff/src/handlers/agent_selector.rs @@ -176,7 +176,6 @@ mod tests { fn create_test_orchestrator_service() -> Arc { Arc::new(OrchestratorService::new( - vec![], // empty providers for testing "http://localhost:8080".to_string(), "test-model".to_string(), "test-provider".to_string(), diff --git a/crates/brightstaff/src/handlers/integration_tests.rs b/crates/brightstaff/src/handlers/integration_tests.rs index 2dae9808..c4542b9a 100644 --- a/crates/brightstaff/src/handlers/integration_tests.rs +++ b/crates/brightstaff/src/handlers/integration_tests.rs @@ -20,7 +20,6 @@ mod integration_tests { fn create_test_orchestrator_service() -> Arc { Arc::new(OrchestratorService::new( - vec![], // empty providers for testing "http://localhost:8080".to_string(), "test-model".to_string(), "test-provider".to_string(), diff --git a/crates/brightstaff/src/main.rs b/crates/brightstaff/src/main.rs index 5ed15805..41c6597b 100644 --- a/crates/brightstaff/src/main.rs +++ b/crates/brightstaff/src/main.rs @@ -10,7 +10,7 @@ use brightstaff::state::memory::MemoryConversationalStorage; use brightstaff::utils::tracing::init_tracer; use bytes::Bytes; use common::configuration::{Agent, Configuration}; -use common::consts::{CHAT_COMPLETIONS_PATH, MESSAGES_PATH, OPENAI_RESPONSES_API_PATH}; +use common::consts::{CHAT_COMPLETIONS_PATH, MESSAGES_PATH, OPENAI_RESPONSES_API_PATH, PLANO_ORCHESTRATOR_MODEL_NAME}; use common::traces::TraceCollector; use http_body_util::{combinators::BoxBody, BodyExt, Empty}; use hyper::body::Incoming; @@ -101,9 +101,8 @@ async fn main() -> Result<(), Box> { )); let orchestrator_service: Arc = Arc::new(OrchestratorService::new( - arch_config.model_providers.clone(), llm_provider_url.clone() + CHAT_COMPLETIONS_PATH, - "Plano-Orchestrator".to_string(), + PLANO_ORCHESTRATOR_MODEL_NAME.to_string(), routing_llm_provider, )); diff --git a/crates/brightstaff/src/router/plano_orchestrator.rs b/crates/brightstaff/src/router/plano_orchestrator.rs index 13f91e2a..5a47a0d3 100644 --- a/crates/brightstaff/src/router/plano_orchestrator.rs +++ b/crates/brightstaff/src/router/plano_orchestrator.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, sync::Arc}; use common::{ - configuration::{LlmProvider, AgentUsagePreference, OrchestrationPreference}, + configuration::{AgentUsagePreference, OrchestrationPreference}, consts::ARCH_PROVIDER_HINT_HEADER, }; use hermesllm::apis::openai::{ChatCompletionsResponse, Message}; @@ -36,7 +36,6 @@ pub type Result = std::result::Result; impl OrchestratorService { pub fn new( - _providers: Vec, orchestrator_url: String, orchestration_model_name: String, orchestration_provider_name: String, diff --git a/crates/common/src/consts.rs b/crates/common/src/consts.rs index ce34fad5..73a11e0a 100644 --- a/crates/common/src/consts.rs +++ b/crates/common/src/consts.rs @@ -33,3 +33,4 @@ pub const OTEL_POST_PATH: &str = "/v1/traces"; pub const LLM_ROUTE_HEADER: &str = "x-arch-llm-route"; pub const ENVOY_RETRY_HEADER: &str = "x-envoy-max-retries"; pub const BRIGHT_STAFF_SERVICE_NAME : &str = "brightstaff"; +pub const PLANO_ORCHESTRATOR_MODEL_NAME: &str = "Plano-Orchestrator";