Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions scripts/stage-model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ stage_chat_model() {
echo "⬇️ No local copy — fetching $PLATFORM_NAME from $API_BASE ..."

local manifest
manifest="$(curl -sf --max-time 60 "$API_BASE/v1/models/$PLATFORM_NAME/download")" || {
echo "❌ Could not reach the download manifest at $API_BASE"
# The API intermittently answers 503 or hangs; retry rather than fail the
# whole build on one bad response. --retry covers timeouts and 408/429/5xx;
# --max-time applies to each attempt, so the worst case is ~4 minutes. -S
# prints why the last attempt failed (timeout vs HTTP status).
manifest="$(curl -sSf --max-time 30 --retry 5 --retry-delay 10 --retry-connrefused \
"$API_BASE/v1/models/$PLATFORM_NAME/download")" || {
echo "❌ Could not reach the download manifest at $API_BASE after 6 attempts"
echo " The app will download the model on first launch instead."
return 1
}
Expand Down
Loading