Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 1fcc881

Browse files
fix: get model from db for model list API (#1506)
Co-authored-by: vansangpfiev <sang@jan.ai>
1 parent 789d1b3 commit 1fcc881

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

engine/controllers/models.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ void Models::ListModel(
115115
.string());
116116
auto model_config = yaml_handler.GetModelConfig();
117117
Json::Value obj = model_config.ToJson();
118-
obj["id"] = model_config.model;
118+
obj["id"] = model_entry.model;
119119
obj["model_alias"] = model_entry.model_alias;
120+
obj["model"] = model_entry.model;
120121
data.append(std::move(obj));
121122
yaml_handler.Reset();
122123
} catch (const std::exception& e) {

0 commit comments

Comments
 (0)