Skip to content

chore: remove dead local-STT model download plumbing - #5650

Open
JMak-Security wants to merge 2 commits into
tinyhumansai:mainfrom
JMak-Security:fix/dead-stt-download-plumbing
Open

chore: remove dead local-STT model download plumbing#5650
JMak-Security wants to merge 2 commits into
tinyhumansai:mainfrom
JMak-Security:fix/dead-stt-download-plumbing

Conversation

@JMak-Security

@JMak-Security JMak-Security commented Aug 21, 2026

Copy link
Copy Markdown

Summary

Removes dead local-STT model download plumbing that issue #5462 identified.

download_asset() in �ssets.rs only accepts chat, �ision, embedding, and ts as capabilities (its match statement explicitly errors with "Unknown capability. Use one of: chat, vision, embedding, tts." for anything else). Despite that, download_file_with_progress() still had two leftover match arms handling a "stt" label that can never be reached from that entry point.

The frontend mirrored the same stale type: the capability parameter union in both �pp/src/utils/tauriCommands/localAi.ts and �pp/src/components/settings/panels/LocalModelDebugPanel.tsx still included 'stt', even though ModelDownloadSection.tsx never renders an STT download control.

What's intentionally NOT touched

stt_state / stt_model_id on LocalAiStatus (in ypes.rs) are still live — speech.rs sets stt_state = "ready" after a successful hosted STT transcription. Only the local-model-download trigger path was dead; state tracking for the hosted path is unaffected.

Changes

  • src/openhuman/inference/local/service/assets.rs: removed the two unreachable "stt" => ... match arms in download_file_with_progress().
  • �pp/src/utils/tauriCommands/localAi.ts: removed 'stt' from the capability union type.
  • �pp/src/components/settings/panels/LocalModelDebugPanel.tsx: removed 'stt' from the capability union type in riggerAssetDownload.

Testing

Traced the full call graph by hand (download_asset → download_file_with_progress, and the frontend ModelDownloadSection.tsx UI) to confirm the removed code paths are genuinely unreachable, not just unused-looking. No behavioral change for chat/�ision/embedding/ ts or for hosted STT.

Fixes #5462

Summary by CodeRabbit

  • Bug Fixes
    • Removed unsupported speech-to-text asset downloads from local model management.
    • Limited downloadable model capabilities to chat, vision, embeddings, and text-to-speech.
    • Preserved download progress tracking for all supported asset types.

The "stt" capability was removed from download_asset()'s accepted
capabilities (chat, vision, embedding, tts), but two leftover match arms
in download_file_with_progress() in assets.rs still handled a "stt"
label that can never be reached. The frontend capability union types
in localAi.ts and LocalModelDebugPanel.tsx still included 'stt' as well,
even though no STT download UI is rendered anywhere.

The stt_state / stt_model_id fields in LocalAiStatus are untouched,
since they are still legitimately set by the hosted STT dispatch path
in speech.rs.

Fixes tinyhumansai#5462

Signed-off-by: Jason Mak <squrrielbro@gmail.com>
@JMak-Security
JMak-Security requested a review from a team August 21, 2026 03:20
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a2e0fbb-d40f-4a63-89b0-fd6a8e0b22e4

📥 Commits

Reviewing files that changed from the base of the PR and between ffebe1b and 2befeb5.

📒 Files selected for processing (1)
  • app/src/components/settings/panels/LocalModelDebugPanel.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/components/settings/panels/LocalModelDebugPanel.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The changes remove stt from the frontend asset download capability and stop backend download progress handling from setting the STT state to "downloading".

Changes

Local STT download removal

Layer / File(s) Summary
Remove STT download capability
app/src/components/settings/panels/LocalModelDebugPanel.tsx, app/src/utils/tauriCommands/localAi.ts, src/openhuman/inference/local/service/assets.rs
The frontend capability union no longer accepts stt. Backend download state updates no longer handle the stt label before streaming or during progress updates. TTS and fallback handling remain unchanged.

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

Merge Risk: ⚪ Minimal · up to 2befe

This PR removes unreachable local-STT download plumbing and stale type entries without changing supported downloads or hosted speech transcription, so no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit hops where STT once stayed,
The download path is neatly pared.
Chat and vision spring ahead,
TTS keeps hopping in their stead.
No ghostly whisper files are fed.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR removes core and two frontend references, but it does not address the issue-listed ModelDownloadSection, test, or store/coreStateApi STT fields. Remove the remaining local STT download fields and UI references listed in issue #5462, including ModelDownloadSection, its test, store, and coreStateApi.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies removal of obsolete local STT model-download plumbing, which matches the primary changes.
Out of Scope Changes check ✅ Passed All reported changes directly support issue #5462 by removing obsolete local STT download capability handling.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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

Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

$0.0000 · 0 in / 0 out · 93 embedded · openrouter/openai/text-embedding-3-small

@tinysweeper

tinysweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown

How this change flows

1 changed behaviour across 6 relationships. 5 surrounding behaviours are shown (60 graph nodes walked). 32 further behaviours left out to keep the diagram readable.

flowchart LR
  n0["LocalModelDebugPanelProps<br/>changed"]:::changed
  n1["body"]:::impacted
  n2["loadStatus"]:::impacted
  n3["runtimeEnabled"]:::impacted
  n4["LocalModelDebugPanel"]:::impacted
  n5["ModelStatusSection"]:::impacted
  n1 -->|calls| n2
  n1 -->|uses| n3
  n1 -->|uses| n5
  n4 -->|uses| n0
  n4 -->|uses| n1
  n5 -->|uses| n3
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 21, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 21, 2026
The capability union type shrank below the 100-col print width once
'stt' was removed, so prettier collapses the parameter onto one line.

Signed-off-by: Jason Mak <squrrielbro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: remove the dead local-STT model download plumbing (core assets + settings UI)

1 participant