[PR #1210] [CLOSED] populate '/models' also in lazy mode #3312

Closed
opened 2026-11-07 14:40:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1210
Author: @vehystrix
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: lazy-models-populate


📝 Commits (1)

  • cff737e populate '/models' also in lazy mode

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 serve/server.py (+1 -1)

📄 Description

Currently starting the server in lazy mode (--lazy) shows no models on the /models endpoint. It only gets populated as soon as the model actually gets loaded, and stays populated even when a model gets unloaded after.

With this surgical fix, the endpoint is populated even before the first load:

  • mock engine -> not a StrataEngine; it already lists as loaded via the no-alive path - unchanged.
  • cold-lazy start -> not a MockEngine, is a StrataEngine -> listed as "unloaded".
  • loaded after one cycle / idle-unloaded -> still a StrataEngine, same branch.
  • loading/running -> alive() true -> svc.loaded() true -> falls through, listed as "loaded" - unchanged.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1210 **Author:** [@vehystrix](https://github.com/vehystrix) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `lazy-models-populate` --- ### 📝 Commits (1) - [`cff737e`](https://github.com/Niko1221/Strata/commit/cff737e0825a17a43420ae5aebc53d2ce3926b2f) populate '/models' also in lazy mode ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+1 -1) </details> ### 📄 Description Currently starting the server in lazy mode (`--lazy`) shows no models on the `/models` endpoint. It only gets populated as soon as the model actually gets loaded, and stays populated even when a model gets unloaded after. With this surgical fix, the endpoint is populated even before the first load: - mock engine -> not a `StrataEngine`; it already lists as loaded via the no-alive path - unchanged. - cold-lazy start -> not a `MockEngine`, is a` StrataEngine` -> listed as "unloaded". - loaded after one cycle / idle-unloaded -> still a `StrataEngine`, same branch. - loading/running -> `alive()` true -> `svc.loaded()` true -> falls through, listed as "loaded" - unchanged. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:40:33 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3312
No description provided.