fix panic in brightstaff

make router section optional in arch_config
This commit is contained in:
Adil Hafeez 2025-05-23 09:35:59 -07:00
parent a0d10153f9
commit c1a3f37576
No known key found for this signature in database
GPG key ID: 9B18EF7691369645

View file

@ -84,7 +84,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
info!("listening on http://{}", bind_address);
let listener = TcpListener::bind(bind_address).await?;
let model = arch_config.routing.as_ref().unwrap().model.clone();
let model = arch_config
.routing
.as_ref()
.and_then(|r| Some(r.model.clone()))
.unwrap_or_else(|| "none".to_string());
let router_service: Arc<RouterService> = Arc::new(RouterService::new(
arch_config.llm_providers.clone(),