Enforces display name for model selection

Removes fallback to model ID for display names
Ensures consistent and user-friendly model representation

Improves model dropdown experience by requiring display names from API
This commit is contained in:
AlexKucera committed 2025-10-24 11:06:48 +02:00
1 parent de98d4a52d
commit f8427e72a0
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -158,14 +158,14 @@ export class ModelService {
/**
* Format ModelInfo array to ModelOption array for dropdown
* Uses display_name if available, otherwise falls back to id
* Uses display_name from API for user-friendly model names
* Sorted by displayName for consistent UX across cache/API ordering
*/
private formatModels(models: ModelInfo[]): ModelOption[] {
return models
.map(model => ({
id: model.id,
displayName: model.display_name || model.id
displayName: model.display_name
}))
.sort((a, b) => a.displayName.localeCompare(b.displayName));
}
+1 -1
View File
@@ -63,7 +63,7 @@ export interface CleanupResult {
export interface ModelInfo {
id: string;
display_name?: string;
display_name: string;
created_at: string;
type: string;
}