server : allow model downloads at model limit fix issue #26809 (#28530)

This commit is contained in:
MiaoMing Chen
2026-09-12 11:50:35 +02:00
committed by GitHub
parent c8edceb061
commit 56381e407c
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -1129,7 +1129,8 @@ void server_models::load(const std::string & name, const load_options & opts) {
// exceeding models_max. Without this, the window between unload_lru()
// releasing its lock and this lock_guard acquiring allows multiple
// threads to each observe capacity and all proceed to load.
if (base_params.models_max > 0) {
// Download workers do not use models_max slots.
if (opts.mode == SERVER_CHILD_MODE_NORMAL && base_params.models_max > 0) {
size_t count_active = 0;
for (const auto & m : mapping) {
if (m.second.meta.is_running()) {