File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
tools/server/webui/src/lib/stores Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -279,14 +279,21 @@ class ModelsStore {
279279 * Fetch props for a specific model from /props endpoint
280280 * Uses caching to avoid redundant requests
281281 *
282+ * In ROUTER mode, this will only fetch props if the model is loaded,
283+ * since unloaded models return 400 from /props endpoint.
284+ *
282285 * @param modelId - Model identifier to fetch props for
283- * @returns Props data or null if fetch failed
286+ * @returns Props data or null if fetch failed or model not loaded
284287 */
285288 async fetchModelProps ( modelId : string ) : Promise < ApiLlamaCppServerProps | null > {
286289 // Return cached props if available
287290 const cached = this . modelPropsCache . get ( modelId ) ;
288291 if ( cached ) return cached ;
289292
293+ if ( serverStore . isRouterMode && ! this . isModelLoaded ( modelId ) ) {
294+ return null ;
295+ }
296+
290297 // Avoid duplicate fetches
291298 if ( this . modelPropsFetching . has ( modelId ) ) return null ;
292299
You can’t perform that action at this time.
0 commit comments