From f8427e72a0ab1fd5edfa8f0964559167036ac74f Mon Sep 17 00:00:00 2001 From: Alexander Kucera Date: Fri, 24 Oct 2025 11:06:48 +0200 Subject: [PATCH] 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 --- services/modelService.ts | 4 ++-- types.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/modelService.ts b/services/modelService.ts index 579def9..0bfbeea 100644 --- a/services/modelService.ts +++ b/services/modelService.ts @@ -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)); } diff --git a/types.ts b/types.ts index 87b6584..b13e426 100644 --- a/types.ts +++ b/types.ts @@ -63,7 +63,7 @@ export interface CleanupResult { export interface ModelInfo { id: string; - display_name?: string; + display_name: string; created_at: string; type: string; }