Fix dev mode sidecar launch and engine reload on mode change
1. Dev mode: use `uv run python` instead of bare `python` to ensure the project venv is used. Also use CARGO_MANIFEST_DIR to find the project root reliably. 2. Engine reload: changing remote.mode (local/managed/byok) now triggers a full engine reload. Previously only model and device changes triggered reload, so switching to Deepgram had no effect until the app was restarted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -577,12 +577,18 @@ class AppController:
|
||||
if self.config.get('server_sync.enabled', False):
|
||||
self._start_server_sync()
|
||||
|
||||
# Check if model/device changed
|
||||
# Check if model/device/remote mode changed -- any of these require
|
||||
# a full engine reload since they change which engine class is used
|
||||
new_model = self.config.get('transcription.model', 'base.en')
|
||||
new_device = self.config.get('transcription.device', 'auto')
|
||||
new_remote_mode = self.config.get('remote.mode', 'local')
|
||||
current_remote_mode = 'local'
|
||||
if self.transcription_engine:
|
||||
current_remote_mode = getattr(self.transcription_engine, 'mode', 'local')
|
||||
engine_reload_needed = (
|
||||
self.current_model_size != new_model
|
||||
or self.current_device_config != new_device
|
||||
or current_remote_mode != new_remote_mode
|
||||
)
|
||||
|
||||
if engine_reload_needed:
|
||||
|
||||
Reference in New Issue
Block a user