From 98253996f4efe0f2e920498239a954de2d51bb0e Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Tue, 29 Sep 2026 13:39:29 +0200 Subject: [PATCH] ui : document the model list index pairing, fix an em-dash Assisted-by: pi:zai-org/GLM-5.3-Flash --- tools/ui/src/lib/services/index.ts | 2 +- tools/ui/src/lib/types/api.d.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/ui/src/lib/services/index.ts b/tools/ui/src/lib/services/index.ts index 960109c036..be6261bd62 100644 --- a/tools/ui/src/lib/services/index.ts +++ b/tools/ui/src/lib/services/index.ts @@ -136,7 +136,7 @@ export { ConversationTransferService } from './conversation-transfer.service'; * * **Server Mode Behavior:** * - **MODEL mode**: Only `list()` is relevant — single model always loaded - * - **ROUTER mode**: Full lifecycle — `list()`, `load()`, `unload()` + * - **ROUTER mode**: Full lifecycle - `list()`, `load()`, `unload()` * * **Endpoints:** * - `GET /v1/models` — OpenAI-compatible model list (both modes) diff --git a/tools/ui/src/lib/types/api.d.ts b/tools/ui/src/lib/types/api.d.ts index e1c3d4876a..5191b03bd8 100644 --- a/tools/ui/src/lib/types/api.d.ts +++ b/tools/ui/src/lib/types/api.d.ts @@ -456,6 +456,11 @@ export interface ApiModelsLoadResponse { export interface ApiModelsListResponse { object: string; data: ApiModelDataEntry[]; + /** + * Optional details aligned by index with `data`: `models[i]` describes + * `data[i]`. The server fills both arrays in one pass, so the pairing only + * holds while neither array is filtered independently. + */ models?: ApiModelDetails[]; }