Skip to content

Studio: support llama.cpp semantic version output - #9127

Merged
oobabooga merged 3 commits into
unslothai:mainfrom
oobabooga:fix/studio-llama-semver-build-parser
Aug 19, 2026
Merged

Studio: support llama.cpp semantic version output#9127
oobabooga merged 3 commits into
unslothai:mainfrom
oobabooga:fix/studio-llama-semver-build-parser

Conversation

@oobabooga

Copy link
Copy Markdown
Member

Problem

Studio uses the numeric llama.cpp build to display the installed version and to decide whether a markerless source build is older than the latest Unsloth prebuilt.

llama.cpp recently changed what llama-server --version prints:

Before: version: 10360 (90e6a9131)
Now:    version: 0.1.1-dev (build 10470, commit abc1234)

Studio's parser expected the build number immediately after version:. With the new output it read the semantic version's leading 0, rejected that as an unknown build, and lost the real build number 10470.

This affects markerless installations such as source builds and custom llama.cpp paths. Prebuilt installations are unaffected because they read their version from UNSLOTH_PREBUILT_INFO.json instead of running llama-server --version.

For an affected installation, Studio could:

  • hide the llama.cpp version in the About panel
  • treat a newer source build as having an unknown version
  • offer an older prebuilt as an update because the downgrade comparison no longer had an installed build number

Fix

  • Read the numeric build from the new build NNNN field when it is present on the version: line.
  • Fall back to the legacy version: NNNN format so existing binaries continue to work.
  • Do not mistake a dotted semantic version such as 2.0.0 for legacy build number 2 when no build field is present.
  • Continue treating missing, zero, and one as unknown builds, preserving the existing behavior for untagged source archives.

The update-status regression now drives the real parser with semantic output and verifies that source build 10470 is not offered prebuilt b10360 as an update.

Testing

  • python -m pytest -q studio/backend/tests/test_llama_cpp_update.py studio/backend/tests/test_llama_cpp_freshness.py (115 passed)
  • python -m ruff check studio/backend/utils/llama_cpp_update.py studio/backend/tests/test_llama_cpp_update.py
  • git diff --check

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: ef52a54353

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a668cf7776

ℹ️ 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".

@oobabooga
oobabooga merged commit 8a3762a into unslothai:main Aug 19, 2026
26 of 31 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.

1 participant