From d5763a8abf5e028fdec18fa7f41955f357d7486a Mon Sep 17 00:00:00 2001 From: James Pine Date: Sat, 18 Apr 2026 03:13:42 -0700 Subject: [PATCH] fix(api-client): declare moved + errors on migrateModels response type ModelManagement.tsx reads migrationResult.moved (added in #433) but apiClient.migrateModels() was typed as returning only { source, destination }. The backend actually returns { moved: int, errors: list[str], source, destination } (backend/routes/models.py:140, 168). Widen the TS return type so the check typechecks under the new CI gate from #418. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/src/lib/api/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/lib/api/client.ts b/app/src/lib/api/client.ts index dbff4e87..045ea454 100644 --- a/app/src/lib/api/client.ts +++ b/app/src/lib/api/client.ts @@ -390,7 +390,9 @@ class ApiClient { return this.request<{ path: string }>('/models/cache-dir'); } - async migrateModels(destination: string): Promise<{ source: string; destination: string }> { + async migrateModels( + destination: string, + ): Promise<{ source: string; destination: string; moved: number; errors: string[] }> { return this.request('/models/migrate', { method: 'POST', body: JSON.stringify({ destination }),