Skip to content

feat(SPEC-044): free local models while a remote endpoint is selected - #116

Merged
wine-fall merged 1 commit into
mainfrom
zachg-0821--delete-models-when-remote
Aug 21, 2026
Merged

wine-fall merged 1 commit into
mainfrom
zachg-0821--delete-models-when-remote

Conversation

@wine-fall

Copy link
Copy Markdown
Collaborator

SPEC

SPEC-044 (Remote transcription endpoint)

Milestone

M3

Why

On the remote backend no local model is loaded, yet Settings still refused to delete the selected one (large-v3 = ~3 GB) — disk the user cannot reclaim while nothing uses it.

Change

  • SpeechModelCatalog.canDelete(variant:selected:loaded:remoteBackend:dictating:) — pure rule: local backend protects selected + loaded, remote protects nothing, any in-flight dictation protects all
  • Switching to remote now releases the loaded engine (weights leave memory) unless a dictation is mid-flight
  • AppState.isDictating extracted so the view and the delegate share one definition
  • Delete confirmation notes that a deleted-but-still-selected model re-downloads when switching back to local

Tests

  • SpeechModelCatalogTests: local protection, remote frees selection, dictation protects both backends
  • swift build && swift test green locally (304 tests)

Privacy impact

None — local disk/memory management only; no change to what leaves the machine.

Out of scope

Auto-clearing the model selection when its files are deleted (selection stays, download resumes on switch-back).

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wine-fall
wine-fall merged commit 0cae559 into main Aug 21, 2026
1 check passed
@wine-fall
wine-fall deleted the zachg-0821--delete-models-when-remote branch August 21, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant