Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
Skip scheduling cancelled requests, always reload unloaded runners (#4189)
Jeffrey Morganc9f98622b1da
diff --git a/server/sched.go b/server/sched.goindex 164814a3e..c4a071c10 100644--- a/server/sched.go+++ b/server/sched.go@@ -100,6 +100,12 @@ func (s *Scheduler) processPending(ctx context.Context) {returncase pending := <-s.pendingReqCh:// Block other requests until we get this pending request running++ if pending.ctx.Err() != nil {+ slog.Debug("pending request cancelled or timed out, skipping scheduling")+ continue+ }+for {var runnerToExpire *runnerRefs.loadedMu.Lock()@@ -435,6 +441,10 @@ func (runner *runnerRef) needsReload(ctx context.Context, req *LlmRequest) booltimeout = 2 * time.Minute // Initial load can take a long time for big models on slow systems...}+ if runner.Options == nil {+ return true+ }+// Don't reload runner if num_gpu=-1 was providedoptsExisting := runner.Options.RunneroptsNew := req.opts.Runner