Registry Mirror
Skip to content

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

The Whisper and VAD model downloads had no stall limit, unlike the word aligners (30 s without a byte). When the connection goes silent, for example on a filtered route that drops packets instead of refusing them, the 264 MB download stays pending forever. The editor shows "Downloading speech model" with no error and no way to retry, which matches the screenshot in #1636.

ensureModels now uses the same stall limit (DOWNLOAD_STALL_MS, renamed from ALIGNER_STALL_MS). A silent download fails with "download stalled", leaves no .partial file, and the existing retry path applies.

Proxy handling is not the cause here: since #1330 the downloads already go through Chromium's net.fetch, which honours the system proxy (shipped in v2.2.0).

This makes the failure visible and retryable. It does not make huggingface.co reachable where it is blocked; that would need a mirror, which is a product decision.

Related issue

Refs #1636

Type of change

  • Bug fix

Release impact

  • Patch

Desktop impact

  • Not platform-specific

Testing

  • New test: ensureModels against a server that never answers rejects with stalled. It times out on the old code and passes with the fix.
  • npx vitest --run electron/stt/modelManager.test.ts: 20 passed.
  • npx tsc --noEmit and npx tsc -p tsconfig.test.json --noEmit: clean.
  • biome check on the changed files: clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Model and aligner downloads now detect when a transfer stalls and stop waiting after the timeout, rather than remaining stuck indefinitely.
    • Incomplete files from stalled downloads are cleaned up, allowing downloads to be retried without leftover partial files.

The word aligners already abort after 30 s without a byte, but the Whisper
and VAD model downloads had no such limit. A connection that goes silent,
such as a filtered route that drops packets rather than refusing them,
left the 264 MB download pending forever: the editor showed "Downloading
speech model" with no error and no way to retry.

ensureModels now uses the same stall limit, so a silent download fails
with "download stalled" and the existing retry path applies.

Refs #1636
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Model and aligner downloads now share a 30-second stall timeout. ensureModels accepts an optional timeout override. A test verifies that a stalled model download rejects and leaves no partial file.

Changes: Download stall timeout

Layer / File(s) Summary
Timeout configuration and handling
electron/stt/modelManager.ts, electron/stt/modelManager.test.ts
The exported default timeout is renamed to DOWNLOAD_STALL_MS and applies to model and aligner downloads. ensureModels accepts an optional stallMs override. A test checks that a stalled download rejects after the configured timeout and leaves no .partial file.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Merge Risk: Minimal · up to eb0e9

Model downloads that stop delivering data now fail after 30 seconds with a "download stalled" error instead of staying pending, and the existing retry path can start a new attempt. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a Whisper model download that stops receiving data is now given up on. It matches the objective of applying the stall limit to ensureModels. It uses a conventional fix…
Description check Passed The description follows the repository template. It has a Summary that explains the stall problem and the fix, and a Related issue that uses the correct partial-reference form (Refs #1636). The Type o…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a Whisper model download that stops receiving data is now given up on. It matches the objective of applying the stall limit to ensureModels. It uses a conventional fix(stt) prefix and is specific enough for a scanning teammate. It is 71 characters, which is slightly long but acceptable.

Full details: Description check

Explanation

The description follows the repository template. It has a Summary that explains the stall problem and the fix, and a Related issue that uses the correct partial-reference form (Refs #1636). The Type of change, Release impact, and Desktop impact sections are filled in. The Testing section lists the new test and the commands run. The Screenshots section is absent, but the change is not a UI change, so that omission is acceptable. The template's 'Fixes #' line is replaced by 'Refs #1636', which the template permits for partial work. Only the Type of change list omits the other checkboxes, which is normal.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d1685d0f-808c-4783-aca0-3cca5acdb560
Commits

Reviewing files that changed from the base of the PR and between 254e858 and eb0e991.

Files selected for processing: 2

  • electron/stt/modelManager.test.ts
  • electron/stt/modelManager.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@EtienneLescot
EtienneLescot merged commit 73058de into main Nov 23, 2026
20 checks passed
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