Compare commits

...
Author SHA1 Message Date
James PineandClaude Opus 4.7 d5763a8abf 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) <[email protected]>
2026-04-18 03:13:42 -07:00
+3 -1
View File
@@ -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 }),