You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(whisper): stop the eager auto-load that undid residency eviction
useWhisperTranscription had a mount effect keyed on isModelLoaded that reloaded whisper
the instant the residency manager evicted it to make room for a text model — grabbing the
just-freed RAM and corrupting the override's post-evict measurement (the [MEM-SM] ~577MB
free). It was also redundant: whisper is warmed once at launch by modelPreloader.preloadStt
(fits-gated) and loaded on demand by startRecording (which already frees the generation
model first for a voice turn). Removed the eager effect so eviction sticks.
The store-level invariant (whisper.loadModel respects makeRoomFor fits=false and won't
co-reside with a resident text model) is already covered by sttResidency.test. Updated the
hook tests: assert it does NOT eager-load on mount (was the race trigger); dropped the
now-dead auto-load-error path test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
if(useRemoteServerStore.getState().activeRemoteTextModelId)remoteServerManager.clearActiveRemoteModel();// mutual exclusion: local deselects remote (all load paths, not just the picker hook)
128
120
// Fast path — model already loaded (no lock; just sync the store).
129
-
if(this.syncActiveIfCurrent(modelId))return;
121
+
if(this.isTextModelCurrent(modelId)){
122
+
conststore=useAppStore.getState();
123
+
if(store.activeModelId!==modelId){
124
+
store.setActiveModelId(modelId);
125
+
}
126
+
return;
127
+
}
130
128
// Everything else goes through the residency manager's global lock so no two
131
129
// model operations ever touch memory at once (the single load gateway).
0 commit comments