Skip to content

Commit 07d9378

Browse files
felix314159example name
andauthored
feat: pre-select models in the webui using alias (#25492)
Co-authored-by: example name <example@example.org>
1 parent 9f623c6 commit 07d9378

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tools/ui/src/lib/stores/models.svelte.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,12 @@ class ModelsStore {
633633
}
634634

635635
findModelByName(modelName: string): ModelOption | null {
636-
return this.models.find((model) => model.model === modelName) ?? null;
636+
return (
637+
this.models.find(
638+
(model) =>
639+
model.model === modelName || model.id === modelName || model.aliases?.includes(modelName)
640+
) ?? null
641+
);
637642
}
638643

639644
findModelById(modelId: string): ModelOption | null {

0 commit comments

Comments
 (0)