Skip to content

Commit 3a802ad

Browse files
committed
fix: propagate ops correctly
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent efaf137 commit 3a802ad

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/http/endpoints/localai/edit_model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func EditModelEndpoint(cl *config.ModelConfigLoader, appConfig *config.Applicati
196196
func ReloadModelsEndpoint(cl *config.ModelConfigLoader, appConfig *config.ApplicationConfig) echo.HandlerFunc {
197197
return func(c echo.Context) error {
198198
// Reload configurations
199-
if err := cl.LoadModelConfigsFromPath(appConfig.SystemState.Model.ModelsPath); err != nil {
199+
if err := cl.LoadModelConfigsFromPath(appConfig.SystemState.Model.ModelsPath, appConfig.ToConfigLoaderOptions()...); err != nil {
200200
response := ModelResponse{
201201
Success: false,
202202
Error: "Failed to reload configurations: " + err.Error(),

core/http/endpoints/localai/import_model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func ImportModelEndpoint(cl *config.ModelConfigLoader, appConfig *config.Applica
185185
return c.JSON(http.StatusInternalServerError, response)
186186
}
187187
// Reload configurations
188-
if err := cl.LoadModelConfigsFromPath(appConfig.SystemState.Model.ModelsPath); err != nil {
188+
if err := cl.LoadModelConfigsFromPath(appConfig.SystemState.Model.ModelsPath, appConfig.ToConfigLoaderOptions()...); err != nil {
189189
response := ModelResponse{
190190
Success: false,
191191
Error: "Failed to reload configurations: " + err.Error(),

core/services/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (g *GalleryService) modelHandler(op *GalleryOp[gallery.GalleryModel, galler
8585
}
8686

8787
// Reload models
88-
err = cl.LoadModelConfigsFromPath(systemState.Model.ModelsPath)
88+
err = cl.LoadModelConfigsFromPath(systemState.Model.ModelsPath, g.appConfig.ToConfigLoaderOptions()...)
8989
if err != nil {
9090
return err
9191
}

0 commit comments

Comments
 (0)