Skip to content

Studio: resolve upstream llama.cpp releases, assets and digests without the GitHub API - #5886

Merged
danielhanchen merged 19 commits into
mainfrom
studio-tokenless-llama-prebuilt
Sep 22, 2026
Merged

danielhanchen merged 19 commits into
mainfrom
studio-tokenless-llama-prebuilt

Conversation

@danielhanchen

@danielhanchen danielhanchen commented May 31, 2026 •

Copy link
Copy Markdown
Member

Problem

unsloth studio update and first install discover the llama.cpp prebuilt release through the GitHub REST API (api.github.com/repos/ggml-org/llama.cpp/releases). That surface allows 60 requests per hour per IP for anonymous callers, so a user without GH_TOKEN or GITHUB_TOKEN behind a shared, NAT or cloud IP gets an immediate HTTP 403 and the installer drops to a slow source build:

installing prebuilt llama.cpp...
llama.cpp      prebuilt install failed (continuing)
 | [llama-prebuilt] prebuilt install path failed; falling back to source build
 | [llama-prebuilt] prebuilt fallback reason: failed to inspect published releases in ggml-org/llama.cpp: GitHub API returned 403 for https://api.github.com/repos/ggml-org/llama.cpp/releases?per_page=100&page=1; set GH_TOKEN or GITHUB_TOKEN to avoid GitHub API rate limits

Reproduced on current main with the API blocked: macOS arm64, Linux x64 and Windows x64 NVIDIA all refuse and fall back to a source build.

Why this branch was rewritten

This PR originally resolved only the latest tag, from the github.com/<repo>/releases/latest 302, and then built asset URLs by guessing filenames. Two things have made that unworkable:

  • github.com/ggml-org/llama.cpp/releases/latest now redirects to v0.4.1, a pointer release whose single asset is nightly-tag.txt. The branch's own bNNNN guard rejected it, so the fallback never fired. It failed safe, but it did nothing.
  • Studio: require a published digest on upstream llama.cpp prebuilts too #11402 now requires a published per-asset sha256 before any upstream prebuilt is installed. A release payload synthesized from a tag alone states no digest, so even a bNNNN redirect would have been refused with "publishes no asset digest for any compatible prebuilt".

So the branch now resolves the whole release from the web host rather than guessing at it, and routes through the helpers main grew in the meantime.

Fix

REST stays the primary path. When it is unavailable, resolve upstream releases without api.github.com:

  • web_release_tags reads github.com/<repo>/releases.atom. It is the only tokenless surface that ORDERS releases, which is what makes both "the newest build" and the older-release walk-back survive the API being down. upstream_web_release_tags filters to bNNNN, so the v0.4.1 pointer release is never selected.
  • web_release_payload reads github.com/<repo>/releases/expanded_assets/<tag> and returns an ordinary release payload: real asset names, tag-pinned download URLs and the sha256 GitHub published for each asset. Digests are read off the copy-to-clipboard control, which names its asset in the same element, so no asset can be handed another asset's hash.

Because the payload has the same shape as the REST one, direct_upstream_release_plan and _apply_release_digests are untouched and digest enforcement stays authoritative: an asset the release states no sha256 for is still dropped, and a release with none is still refused rather than installed unverified.

Real asset names also retire two limitations the filename-guessing version needed:

  • Windows x64 NVIDIA and AMD hosts, which pick among several CUDA or HIP archives by inspecting a release's actual assets, now work on this path too.
  • A pinned bNNNN tag resolves through the same page, which is what the macOS version floor pin b9415 needs.

Scope: upstream only (the fork keeps its own API-free download-host path), REST first, the source build still the final fallback, UNSLOTH_LLAMA_DISABLE_DOWNLOAD_HOST_RESOLVE opts out, and every web request is unauthenticated with no token attached.

Validation

Live, with api.github.com blocked for every call and nothing else stubbed:

host base (main) head
macOS arm64 source build llama-b11071-bin-macos-arm64.tar.gz, sha256 93c1db92...
Linux x86_64 CPU source build llama-b11071-bin-ubuntu-x64.tar.gz, sha256 035c130b...
Windows x64 NVIDIA source build llama-b11071-bin-win-cuda-12.4-x64.zip, sha256 1479bfcc...

All three digests were compared against the REST payload for b11071 and match exactly, as do the asset names and URLs. For b11070, the 33 assets and 33 digests parsed from the release page are identical to the 33 the REST API reports.

tests/studio/install/test_tokenless_release_resolution.py: 27 pass on this branch, 26 of them fail on main. They cover the feed parse and the pointer-release skip, per-asset digest binding, an asset with no digest being dropped, a conflicting duplicate digest being refused, a link belonging to another release being ignored, a digest with no published asset not being invented, the response size cap, the absence of any authorization header, REST-first on both entry points, the lazy newest-first walk, an unreadable release being skipped rather than fatal, a pinned tag resolving through its release page, the fork and the escape hatch both declining the path, both paths failing naming both causes, and end-to-end macOS, Linux and older-release-fallback plans asserting the bound expected_sha256.

Full tests/studio/install/: 6915 passed, 32 skipped on this branch, matching main.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request implements a tokenless fast path for resolving the latest upstream llama.cpp release. By utilizing GitHub's HTTP redirect from /releases/latest to /releases/tag/<TAG>, the installer can determine the latest release tag and construct deterministic asset download URLs without consuming the rate-limited api.github.com REST API budget. This fast path is bypassed for Windows x64 hosts with NVIDIA or AMD GPUs to ensure proper dynamic asset enumeration. Comprehensive unit tests have been added to verify the redirect resolution, fallback mechanisms, and platform-specific behaviors. I have no feedback to provide.

@danielhanchen
danielhanchen force-pushed the studio-tokenless-llama-prebuilt branch from d643764 to d307631 Compare May 31, 2026 05:41
…REST API is rate limited

unsloth studio update discovers the llama.cpp prebuilt through the GitHub REST
API, which is rate limited to 60 requests per hour per IP for anonymous callers.
Without GH_TOKEN or GITHUB_TOKEN, users on shared, NAT, or cloud IPs hit HTTP 403
and the installer falls back to a slow source build.

Keep the REST API as the primary path. When it is unavailable (for example a
tokenless 403), fall back to resolving the latest upstream release from the
unauthenticated github.com/<repo>/releases/latest redirect and build
deterministic asset download URLs, so the prebuilt path still works with no
token. The redirect is only a fallback and is always unauthenticated.

Scope is narrow: the fallback only applies to the upstream repo plus latest plus
the simple policy path, on platforms whose asset choice is a single deterministic
file. Pinned tags, the Linux CUDA manifest path, the token path, and Windows x64
NVIDIA or AMD asset selection are unchanged.

Add tests covering redirect parsing, REST first resolution, the redirect fallback
on a 403 and on a missing tag, the Windows CUDA opt out, and end to end macOS and
Linux latest resolution when the REST API 403s.
@danielhanchen danielhanchen changed the title Studio: install prebuilt llama.cpp without the GitHub REST API when tokenless Studio: fall back to a tokenless release redirect when the llama.cpp REST API is rate limited May 31, 2026
@danielhanchen
danielhanchen force-pushed the studio-tokenless-llama-prebuilt branch from 188a5e7 to 7e6e2ff Compare May 31, 2026 05:45
pre-commit-ci Bot and others added 3 commits May 31, 2026 05:46
…5886)

Harden the tokenless llama.cpp release-redirect fallback:

- Guard the redirect-resolved tag with is_release_tag_like so an unexpected
  redirect target fails closed to the REST/source path instead of building a
  404-bound download URL.
- When the REST listing and the redirect both fail, raise a chained error that
  names both causes instead of only the REST 403.
- Drop a no-op except branch in the specific-tag path and clarify the
  synthetic-release comment.

Add negative tests: both paths failing, a pinned tag never using the redirect,
a malformed redirect target being rejected, and a real REST asset URL taking
precedence over the synthetic one.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Implement the hardening the added tests cover:

- Guard the redirect-resolved tag with is_release_tag_like so an unexpected
  redirect target fails closed to the REST/source path instead of building a
  404-bound download URL.
- When the REST listing and the redirect both fail, raise a chained error that
  names both causes instead of only the REST 403.
- Drop a no-op except branch in the specific-tag path and clarify the
  synthetic-release comment.
- Unpack the (requested_tag, plans) return in the asset-precedence test.
…okenless-llama-prebuilt

# Conflicts:
#	tests/studio/install/test_macos_version_compat.py
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@danielhanchen

Copy link
Copy Markdown
Member Author

Main now resolves the latest tag through the release redirect in _download_host_latest_release_tag (studio/install_llama_prebuilt.py:1968) and the download-host fast path. Could you rebase and route the upstream ggml-org case through that helper rather than a second resolver plus its own URL builder?

# Conflicts:
#	studio/install_llama_prebuilt.py
#	tests/studio/install/test_macos_version_compat.py
#	tests/studio/install/test_selection_logic.py
…ut the GitHub API

The redirect-only fallback this branch opened with no longer resolves anything
installable, and could not install it if it did.

github.com/ggml-org/llama.cpp/releases/latest now redirects to v0.4.1, a pointer
release whose single asset is nightly-tag.txt, so the bNNNN guard rejected it and
the fallback never fired. Main has also since required a published per-asset
sha256 for upstream prebuilts (#11402), which a release payload synthesized from a
tag alone cannot supply, so even a bNNNN redirect would have been refused.

Resolve the whole release from the web host instead of guessing filenames:

- web_release_tags reads github.com/<repo>/releases.atom, which orders releases,
  so the newest build tag and the older-release walk-back both survive the API
  being unavailable.
- web_release_payload reads github.com/<repo>/releases/expanded_assets/<tag> and
  returns an ordinary release payload: real asset names, tag-pinned download URLs
  and the sha256 GitHub published for each one. Digests are read off the
  copy-to-clipboard control, which names its asset in the same element, so no
  asset can be handed another asset's hash.

Because the payload has the shape the REST one does, direct_upstream_release_plan
and _apply_release_digests are untouched and digest enforcement stays
authoritative: an asset the release states no sha256 for is still dropped, and a
release with none is still refused rather than installed.

Scope: upstream only, REST first, source build still the final fallback, and
UNSLOTH_LLAMA_DISABLE_DOWNLOAD_HOST_RESOLVE opts out. The fork keeps its own
API-free download-host path. Real asset names also retire the Windows CUDA and
AMD carve-out the filename-guessing version needed, and a pinned tag now resolves
through the same path, which is what the macOS version floor pin b9415 needs.

Verified live with api.github.com blocked: macOS arm64, Linux x64 and Windows x64
NVIDIA each resolve b11071 and a digest that matches the REST payload exactly.
@danielhanchen danielhanchen changed the title Studio: fall back to a tokenless release redirect when the llama.cpp REST API is rate limited Studio: resolve upstream llama.cpp releases, assets and digests without the GitHub API Sep 21, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-22T08:05:47.425555Z 8d7f8c3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 21, 2026
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 21, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

…le HTTP failure

HTTPError subclasses URLError, so the HTTPError clause shadowed the fallback added
alongside it: a pinned tag whose REST lookup exhausted its retries on a 500, 502,
503 or 504 re-raised instead of reading the release page, and the install dropped
to a source build with the page sitting there. The 404 case keeps scanning, since
a tag that does not exist has no page to read either, and the fork still re-raises.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

_newest_release_tag_from_releases dropped every prerelease unconditionally while
the planner now installs an upstream bNNNN build, so the two answered differently
from the same payload, which its own docstring says must not happen. Reproduced
live against the API: the freshness check named v0.4.1 newest while the planner
installed b11071, so the marker for the freshly installed build read as stale and
every later update run would have repeated the whole download and install.

It now takes the repo and applies release_is_selectable, the rule the planner
uses. After the fix both answer b11071, and the fork is unchanged: it still drops
prereleases and still resolves b11030-mix-5ff778e.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

pre-commit-ci Bot and others added 2 commits September 21, 2026 15:29
…the whisper caller

Two things.

latest_upstream_release_tag returned whatever /releases/latest named, and upstream
points that at v0.4.1, a pointer release packaging no prebuilt. The source build
would then compile a different version from the one the prebuilt path installs,
which is the only reason that tag is resolved here. A non-build REST tag now
consults the release feed, as a missing one already did, and the REST answer is
still kept when the feed cannot name a build, since a released version beats no
source ref. Live, this moves the source ref from v0.4.1 to b11073.

install_whisper_prebuilt called _newest_release_tag_from_releases positionally and
the previous commit gave it a repo parameter, which broke three whisper tests. The
repo was already in scope; whisper is never ggml-org/llama.cpp, so it keeps the
plain drafts-and-prereleases-dropped rule it has always had.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 1011998ed2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 21, 2026
…our the opt-out everywhere

Four findings from a parallel review pass focused on install regressions, each
reproduced before it was fixed.

An upstream release that is not a bNNNN build is no longer selectable. It was only
the prerelease flag that excluded them, and the versioned pointer releases do not
carry one, so a v0.4.2 published after the newest build became the freshness
check's answer while the planner walked past it for want of an asset: the marker
read stale forever and every update run reinstalled the same build. For upstream
the rule is now simply whether the tag names a build, which closes that and the
prerelease case together. Every other repo keeps the plain rule.

A stalled or reset read no longer strands the install. TimeoutError and
ConnectionResetError are not URLError subclasses, so they escaped the four handlers
that route the web fallback and the recovery never ran. They now use
RELEASE_LISTING_TRANSPORT_ERRORS, which the module already applies to the same
listing call.

UNSLOTH_LLAMA_DISABLE_DOWNLOAD_HOST_RESOLVE now means the same thing on every path:
latest_upstream_release_tag consulted the release feed regardless, and keeps the
REST answer instead when the opt-out is set.

A release page that cannot be read no longer discards the release. The assets and
their digests have already loaded by then, and an upstream build tag answers the
prerelease question by itself, so only a tag that cannot fails closed.

192 fork selector cells unchanged, 240 enumerated predicate cells with no
violations, full tests/studio/install/ at 6950 passed and 0 failed.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 8d7f8c3311

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 1fd6b42 into main Sep 22, 2026
57 of 61 checks passed
@danielhanchen
danielhanchen deleted the studio-tokenless-llama-prebuilt branch September 22, 2026 09:53
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…ut the GitHub API (unslothai#5886)

* Studio: fall back to a tokenless release redirect when the llama.cpp REST API is rate limited

unsloth studio update discovers the llama.cpp prebuilt through the GitHub REST
API, which is rate limited to 60 requests per hour per IP for anonymous callers.
Without GH_TOKEN or GITHUB_TOKEN, users on shared, NAT, or cloud IPs hit HTTP 403
and the installer falls back to a slow source build.

Keep the REST API as the primary path. When it is unavailable (for example a
tokenless 403), fall back to resolving the latest upstream release from the
unauthenticated github.com/<repo>/releases/latest redirect and build
deterministic asset download URLs, so the prebuilt path still works with no
token. The redirect is only a fallback and is always unauthenticated.

Scope is narrow: the fallback only applies to the upstream repo plus latest plus
the simple policy path, on platforms whose asset choice is a single deterministic
file. Pinned tags, the Linux CUDA manifest path, the token path, and Windows x64
NVIDIA or AMD asset selection are unchanged.

Add tests covering redirect parsing, REST first resolution, the redirect fallback
on a 403 and on a missing tag, the Windows CUDA opt out, and end to end macOS and
Linux latest resolution when the REST API 403s.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio: fail closed on bad redirect tag and report both failures (PR unslothai#5886)

Harden the tokenless llama.cpp release-redirect fallback:

- Guard the redirect-resolved tag with is_release_tag_like so an unexpected
  redirect target fails closed to the REST/source path instead of building a
  404-bound download URL.
- When the REST listing and the redirect both fail, raise a chained error that
  names both causes instead of only the REST 403.
- Drop a no-op except branch in the specific-tag path and clarify the
  synthetic-release comment.

Add negative tests: both paths failing, a pinned tag never using the redirect,
a malformed redirect target being rejected, and a real REST asset URL taking
precedence over the synthetic one.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio: harden tokenless release redirect fallback (PR unslothai#5886)

Implement the hardening the added tests cover:

- Guard the redirect-resolved tag with is_release_tag_like so an unexpected
  redirect target fails closed to the REST/source path instead of building a
  404-bound download URL.
- When the REST listing and the redirect both fail, raise a chained error that
  names both causes instead of only the REST 403.
- Drop a no-op except branch in the specific-tag path and clarify the
  synthetic-release comment.
- Unpack the (requested_tag, plans) return in the asset-precedence test.

* Studio: tidy redirect handler signature and align test import (PR unslothai#5886)

* Studio: resolve upstream llama.cpp releases, assets and digests without the GitHub API

The redirect-only fallback this branch opened with no longer resolves anything
installable, and could not install it if it did.

github.com/ggml-org/llama.cpp/releases/latest now redirects to v0.4.1, a pointer
release whose single asset is nightly-tag.txt, so the bNNNN guard rejected it and
the fallback never fired. Main has also since required a published per-asset
sha256 for upstream prebuilts (unslothai#11402), which a release payload synthesized from a
tag alone cannot supply, so even a bNNNN redirect would have been refused.

Resolve the whole release from the web host instead of guessing filenames:

- web_release_tags reads github.com/<repo>/releases.atom, which orders releases,
  so the newest build tag and the older-release walk-back both survive the API
  being unavailable.
- web_release_payload reads github.com/<repo>/releases/expanded_assets/<tag> and
  returns an ordinary release payload: real asset names, tag-pinned download URLs
  and the sha256 GitHub published for each one. Digests are read off the
  copy-to-clipboard control, which names its asset in the same element, so no
  asset can be handed another asset's hash.

Because the payload has the shape the REST one does, direct_upstream_release_plan
and _apply_release_digests are untouched and digest enforcement stays
authoritative: an asset the release states no sha256 for is still dropped, and a
release with none is still refused rather than installed.

Scope: upstream only, REST first, source build still the final fallback, and
UNSLOTH_LLAMA_DISABLE_DOWNLOAD_HOST_RESOLVE opts out. The fork keeps its own
API-free download-host path. Real asset names also retire the Windows CUDA and
AMD carve-out the filename-guessing version needed, and a pinned tag now resolves
through the same path, which is what the macOS version floor pin b9415 needs.

Verified live with api.github.com blocked: macOS arm64, Linux x64 and Windows x64
NVIDIA each resolve b11071 and a digest that matches the REST payload exactly.

* Studio: route pinned upstream releases through the web path, and read prerelease status rather than assume it

Two review findings.

A pinned published_release_tag returned from iter_release_payloads_by_time before
reaching the fallback, so an explicitly pinned upstream release still dropped to a
source build under a rate limit even though its release page names it exactly. It
now takes the same web path, and the fork still re-raises.

The synthesized payload hardcoded prerelease False, which the REST listing filters
on, so the two paths could select differently. web_release_prerelease reads the
status from the release page label instead, and release_is_selectable is now the
one rule both paths apply.

That rule has one deliberate exception, which turns out to fix a live defect of its
own: ggml-org marks EVERY bNNNN build release prerelease, so the plain filter left
the upstream path selecting the newest release that is not one. Measured against
the live API today, main selects b10549 while the newest build is b11071, an install
522 builds behind, because the releases above it (v0.4.1 and older) publish no
prebuilt at all. An upstream bNNNN build is therefore selectable despite the flag;
a non-build prerelease is not, and the fork and every other repo keep the plain
rule unchanged.

* Studio: let a pinned upstream tag reach the release page on a retryable HTTP failure

HTTPError subclasses URLError, so the HTTPError clause shadowed the fallback added
alongside it: a pinned tag whose REST lookup exhausted its retries on a 500, 502,
503 or 504 re-raised instead of reading the release page, and the install dropped
to a source build with the page sitting there. The 404 case keeps scanning, since
a tag that does not exist has no page to read either, and the fork still re-raises.

* Studio: apply the same selectability rule to the update freshness check

_newest_release_tag_from_releases dropped every prerelease unconditionally while
the planner now installs an upstream bNNNN build, so the two answered differently
from the same payload, which its own docstring says must not happen. Reproduced
live against the API: the freshness check named v0.4.1 newest while the planner
installed b11071, so the marker for the freshly installed build read as stale and
every later update run would have repeated the whole download and install.

It now takes the repo and applies release_is_selectable, the rule the planner
uses. After the fix both answer b11071, and the fork is unchanged: it still drops
prereleases and still resolves b11030-mix-5ff778e.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio: take the REST latest tag only when it names a build, and fix the whisper caller

Two things.

latest_upstream_release_tag returned whatever /releases/latest named, and upstream
points that at v0.4.1, a pointer release packaging no prebuilt. The source build
would then compile a different version from the one the prebuilt path installs,
which is the only reason that tag is resolved here. A non-build REST tag now
consults the release feed, as a missing one already did, and the REST answer is
still kept when the feed cannot name a build, since a released version beats no
source ref. Live, this moves the source ref from v0.4.1 to b11073.

install_whisper_prebuilt called _newest_release_tag_from_releases positionally and
the previous commit gave it a repo parameter, which broke three whisper tests. The
repo was already in scope; whisper is never ggml-org/llama.cpp, so it keeps the
plain drafts-and-prereleases-dropped rule it has always had.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Reduce the comments added by this PR

* Studio: exclude upstream pointer releases, recover stalled reads, honour the opt-out everywhere

Four findings from a parallel review pass focused on install regressions, each
reproduced before it was fixed.

An upstream release that is not a bNNNN build is no longer selectable. It was only
the prerelease flag that excluded them, and the versioned pointer releases do not
carry one, so a v0.4.2 published after the newest build became the freshness
check's answer while the planner walked past it for want of an asset: the marker
read stale forever and every update run reinstalled the same build. For upstream
the rule is now simply whether the tag names a build, which closes that and the
prerelease case together. Every other repo keeps the plain rule.

A stalled or reset read no longer strands the install. TimeoutError and
ConnectionResetError are not URLError subclasses, so they escaped the four handlers
that route the web fallback and the recovery never ran. They now use
RELEASE_LISTING_TRANSPORT_ERRORS, which the module already applies to the same
listing call.

UNSLOTH_LLAMA_DISABLE_DOWNLOAD_HOST_RESOLVE now means the same thing on every path:
latest_upstream_release_tag consulted the release feed regardless, and keeps the
REST answer instead when the opt-out is set.

A release page that cannot be read no longer discards the release. The assets and
their digests have already loaded by then, and an upstream build tag answers the
prerelease question by itself, so only a tag that cannot fails closed.

192 fork selector cells unchanged, 240 enumerated predicate cells with no
violations, full tests/studio/install/ at 6950 passed and 0 failed.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant