File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1154,10 +1154,11 @@ pub async fn run_local(ctx: &mut Context) -> Result<()> {
11541154 } ) ;
11551155 } ) ;
11561156
1157- // Wait for the API server to be ready (model loading can take seconds )
1157+ // Wait for the API server to be ready (large MoE models with expert pre-warming can take minutes )
11581158 let client = Client :: new ( ) ;
11591159 let mut ready = false ;
1160- for i in 0 ..120 {
1160+ let max_wait_iters = 1200 ; // 600 seconds = 10 minutes
1161+ for i in 0 ..max_wait_iters {
11611162 tokio:: time:: sleep ( std:: time:: Duration :: from_millis ( 500 ) ) . await ;
11621163 match client. get ( format ! ( "{server_url}/v1/models" ) ) . send ( ) . await {
11631164 Ok ( resp) if resp. status ( ) . is_success ( ) => {
@@ -1173,7 +1174,7 @@ pub async fn run_local(ctx: &mut Context) -> Result<()> {
11731174 }
11741175
11751176 if !ready {
1176- anyhow:: bail!( "local server did not start within 60 seconds" ) ;
1177+ anyhow:: bail!( "local server did not start within {} seconds" , max_wait_iters / 2 ) ;
11771178 }
11781179
11791180 // Suppress logs and take over terminal for TUI
You can’t perform that action at this time.
0 commit comments