Skip to content

Studio: pin llama.cpp update apply to the release the banner offered - #7112

Merged
danielhanchen merged 5 commits into
unslothai:mainfrom
oobabooga:studio-llama-update-pin
Jul 14, 2026
Merged

danielhanchen merged 5 commits into
unslothai:mainfrom
oobabooga:studio-llama-update-pin

Conversation

@oobabooga

Copy link
Copy Markdown
Member

The update banner and the Update button resolve "latest" differently. Detection picks the newest release by published_at (#6219). The Update button runs the installer with --llama-tag latest, and the installer re-resolves that word on its own, in commit-date order. When the two orderings disagree (the incident class behind #6219), Update re-downloads and reinstalls the build the user already has, reports success, and the banner never clears. No error is surfaced, so the updater just looks broken.

Fix

The apply step now passes detection's resolved tag to the installer via its existing --published-release-tag flag, so it installs exactly the release the update check offered. The pin comes from the same force-refreshed status check that gates update_available.

Scope:

  • Not on macOS: a pinned tag disables the older-release walk-back that macOS needs to skip prebuilts built for a newer macOS than the host.
  • Not for source builds: their detection and apply already share the installer's resolver.

Trade-off: when the offered release is unusable (assets still uploading), a pinned apply fails with a visible, retryable error instead of silently walking back to an older release. A failed pin cannot fall through to a source build. In practice the window is small: the last 8 fork releases all ship the identical 35 host variants.

Verification

  • test_llama_cpp_update.py, test_llama_route.py, test_local_llama_cpp_link.py: 58 pass. New tests cover the pinned tag (full b9601-mix-a0e2906 identity), win32, and the macOS and source-build exemptions.
  • Live run: --resolve-prebuilt latest --published-release-tag b9975-mix-53618c5 selects the correct host asset for exactly that tag; a bogus pin fails fast with a clean 404 and no substitution.

@oobabooga
oobabooga requested a review from danielhanchen as a code owner July 13, 2026 19:35

@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 introduces release tag pinning during the llama.cpp update process to ensure the installer installs the exact release offered by the banner, preventing update loops. This pinning is applied to non-macOS platforms (like Linux and Windows), while macOS is exempted to preserve its older-release walk-back behavior. Corresponding unit tests have been added to verify this behavior across different platforms. As there are no review comments, I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

shimmyshimmer and others added 2 commits July 14, 2026 12:17
The pin passes --published-release-tag so the installer resolves exactly the offered release. Also verify the result: if the post-install marker stays on the pinned repo but reports a different tag, the installer ignored the pin, so fail with a retryable error instead of a false success. A Vulkan/Intel host legitimately reroutes fork to upstream and drops the pin, so the check is scoped to the pinned repo.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Jul 14, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 6b18fbde9c

ℹ️ 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 1e0d5ec into unslothai:main Jul 14, 2026
34 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.

3 participants