Repository navigation
feat: add setup-ai bootstrap - #12
Merged
Merged
Conversation
Adds a one-shot `setup-ai.sh` bootstrap for the AI pipeline so users can setup whisper.cpp, download the default mode, and configure LLM provider from one guided flow. setup-ai.sh: - clone/recover `whisper.cpp` - build `whisper-cli` with the current Cmake-based layout - download `models/ggml-medium.bin` - prompt for LLM provider settings and write them to `.env` - update docs to reflect changes
Owner
|
Merged — thank you, and I'm sorry this sat for four weeks. That's on me, not on the PR. This is a genuinely useful contribution.
Heads-up so it doesn't look like I'm silently rewriting your work: I'm pushing some follow-up hardening on top, mostly around failure modes that only show up on real networks and real
None of that detracts from the contribution — it's the kind of polish that comes from running a thing against a hostile network a few times. Thanks again for the patience and for the work. |
This was referenced Sep 12, 2026
marekbujko
pushed a commit
to marekbujko/openstudio
that referenced
this pull request
Sep 29, 2026
Follow-up to msitarzewski#12. The bootstrap script works on a good network with a simple .env; these are the paths where it didn't. Interrupted model downloads were cached as success. The 1.5 GB model was written straight to its final path, so a dropped transfer left a truncated file that every later run accepted as valid. Worse, capabilities.js detects the model with a bare existsSync, so the UI un-gated Transcribe over a corrupt model -- exactly the failure v0.3.2 gating exists to prevent. Downloads now land in models/ggml-medium.bin.part, are size-checked against a floor, and only then renamed into place. Also dropped curl --silent; a multi-minute silent download reads as a hung script. .env was sourced as shell. Under set -euo pipefail a JWT_SECRET containing $ aborted the script with "unbound variable" and a value with spaces ran as a command. Only the three LLM_* keys are read now, via sed, leaving every other secret untouched. whisper.cpp was a tracked 160000 gitlink with no .gitmodules backing, so the new .gitignore rule could never apply to it -- git does not ignore tracked paths. Anyone who ran setup-ai.sh got a permanently dirty working tree showing "modified: whisper.cpp (new commits)". Untracked it, which is what the setup script already assumed. Missing ffmpeg aborted the entire bootstrap, though neither ffmpeg nor ffprobe is needed to clone whisper.cpp, build it, or fetch the model. Now warns and continues. Tests: kept the fake-toolchain harness from msitarzewski#12 and added a regression case per bug. Both new cases were verified to fail against the pre-fix script. Wired tests/test-setup-ai.sh into CI, where it was previously unreachable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setup-ai.sh:
whisper-cliwith the current Cmake-based layoutmodels/ggml-medium.bin.envSummary
Adds a one-shot
setup-ai.shbootstrap for the AI pipeline so users can setup whisper.cpp, download the default mode, and configure LLM provider from one guided flow.whisper.cppand buildwhisper-climodels/ggml-medium.bin.envChanges
Test Plan
npm test)Screenshots