When router usage is defined ensure that router model is defined too (#481)

This commit is contained in:
Adil Hafeez 2025-05-23 08:46:12 -07:00 committed by GitHub
parent 218e9c540d
commit d050dfb85a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 7 deletions

View file

@ -84,12 +84,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
info!("listening on http://{}", bind_address);
let listener = TcpListener::bind(bind_address).await?;
// if routing is null then return gpt-4o as model name
//TODO: fail if routing is null
let model = arch_config
.routing
.as_ref()
.map_or_else(|| "gpt-4o".to_string(), |routing| routing.model.clone());
let model = arch_config.routing.as_ref().unwrap().model.clone();
let router_service: Arc<RouterService> = Arc::new(RouterService::new(
arch_config.llm_providers.clone(),