Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const parseDomainOptions = (domains: unknown[]): SelectOption[] => {
}
});

return options;
return options.sort((a, b) => a.label.localeCompare(b.label));
};

interface ModelSelectionModalProps {
Expand Down Expand Up @@ -562,10 +562,12 @@ const ModelSelectionModal = ({
className={
lockModelSelection ? 'mode-of-evaluation-select-disabled' : undefined
}
options={aiModels.map((model) => ({
value: model.id,
label: model.displayName || model.name,
}))}
options={aiModels
.map((model) => ({
value: model.id,
label: model.displayName || model.name,
}))
.sort((a, b) => a.label.localeCompare(b.label))}
value={selectedModelId || ''}
onChange={(value) => {
setSelectedModelId(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ const NewEvaluationContent: React.FC<NewEvaluationContentProps> = ({
}
});

options.sort((a, b) => a.label.localeCompare(b.label));

setEvaluationScopeOptions(options);
} catch {
setEvaluationScopeOptions([]);
Expand Down Expand Up @@ -2137,10 +2139,12 @@ const NewEvaluationContent: React.FC<NewEvaluationContentProps> = ({
<Select
name="modelSelect"
label="Select AI Model"
options={aiModels.map((model) => ({
value: model.id,
label: model.displayName || model.name,
}))}
options={aiModels
.map((model) => ({
value: model.id,
label: model.displayName || model.name,
}))
.sort((a, b) => a.label.localeCompare(b.label))}
value={selectedModelId || ''}
onChange={(value) => {
setSelectedModelId(value);
Expand Down