Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ endif
# the atomic-chat-conf manifest (Windows/Linux), e.g.:
# make download-llamacpp-upstream-backend LLAMACPP_UPSTREAM_TAG=b9222
# make download-llamacpp-upstream-backend LLAMACPP_UPSTREAM_TAG=
LLAMACPP_UPSTREAM_TAG ?= b9937
LLAMACPP_UPSTREAM_TAG ?= b10063
download-llamacpp-upstream-backend:
ifeq ($(shell uname -s),Darwin)
@rm -rf src-tauri/resources/llamacpp-backend-upstream
Expand Down
30 changes: 20 additions & 10 deletions extensions/llamacpp-upstream-extension/src/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ const MANIFEST_FETCH_TIMEOUT_MS = 8_000
// than the live manifest until the network recovers. Update this whenever
// the atomic-chat-conf manifest is updated.
const BUNDLED_MANIFEST_BASELINE = {
tag_name: 'b9937',
tag_name: 'b10063',
assets: [
{ name: 'llama-b9937-bin-win-cpu-x64.zip' },
{ name: 'llama-b9937-bin-win-cuda-12.4-x64.zip' },
{ name: 'llama-b9937-bin-win-cuda-13.3-x64.zip' },
{ name: 'llama-b9937-bin-win-vulkan-x64.zip' },
{ name: 'llama-b9937-bin-ubuntu-x64.tar.gz' },
{ name: 'llama-b9937-bin-ubuntu-vulkan-x64.tar.gz' },
{ name: 'llama-b10063-bin-win-cpu-x64.zip' },
{ name: 'llama-b10063-bin-win-cuda-12.4-x64.zip' },
{ name: 'llama-b10063-bin-win-cuda-13.3-x64.zip' },
{ name: 'llama-b10063-bin-win-vulkan-x64.zip' },
{ name: 'llama-b10063-bin-ubuntu-x64.tar.gz' },
{ name: 'llama-b10063-bin-ubuntu-vulkan-x64.tar.gz' },
{ name: 'cudart-llama-bin-win-cuda-12.4-x64.zip' },
{ name: 'cudart-llama-bin-win-cuda-13.3-x64.zip' },
],
Expand Down Expand Up @@ -443,14 +443,14 @@ export async function fetchRemoteBackends(): Promise<BackendVersion[]> {
* Builds the download URL for a specific backend version from ggml-org/llama.cpp.
*
* Asset naming differs by platform:
* - macOS: `llama-{tag}-bin-macos-{arm64,x64}.zip`
* - macOS: `llama-{tag}-bin-macos-{arm64,x64}.tar.gz`
* - Windows: `llama-{tag}-bin-win-{variant}.zip`
* - Linux: `llama-{tag}-bin-ubuntu-{variant}.tar.gz` (note: internal
* backend ids are `linux-*` but upstream filenames carry `ubuntu-*`;
* `LINUX_UPSTREAM_ASSET_BY_BACKEND` provides the mapping).
*
* macOS / Windows use `.zip`, Linux uses `.tar.gz`. The Tauri `decompress`
* command handles both formats transparently.
* Only Windows uses `.zip`; macOS and Linux use `.tar.gz`. The Tauri
* `decompress` command handles both formats transparently.
*/
export function getBackendDownloadUrl(
version: string,
Expand All @@ -472,6 +472,12 @@ export function getBackendDownloadUrl(
if (linuxInfix) {
return `${LLAMACPP_DOWNLOAD_BASE}/${version}/llama-${version}-bin-${linuxInfix}.tar.gz`
}
// ggml-org publishes macOS backends only as `.tar.gz` (there is no macOS
// `.zip` asset), so a `.zip` URL here is a guaranteed 404 and the runtime
// backend download silently fails on macOS. Only Windows ships `.zip`.
if (backend.startsWith('macos-')) {
return `${LLAMACPP_DOWNLOAD_BASE}/${version}/llama-${version}-bin-${backend}.tar.gz`
}
return `${LLAMACPP_DOWNLOAD_BASE}/${version}/llama-${version}-bin-${backend}.zip`
}

Expand All @@ -482,6 +488,10 @@ export function getBackendArchiveName(version: string, backend: string): string
if (linuxInfix) {
return `llama-${version}-bin-${linuxInfix}.tar.gz`
}
// Mirrors getBackendDownloadUrl: macOS assets are `.tar.gz`, not `.zip`.
if (backend.startsWith('macos-')) {
return `llama-${version}-bin-${backend}.tar.gz`
}
return `llama-${version}-bin-${backend}.zip`
}

Expand Down
8 changes: 4 additions & 4 deletions extensions/llamacpp-upstream-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function modelLoadReadyTimeoutSecs(configuredTimeoutSecs: number): number {
/// (`LLAMACPP_UPSTREAM_TAG`) and `atomic-chat-conf/backends/manifest.json`
/// (`tag_name`). Remove (or move to a real settings-driven pin) once the
/// team is done validating this tag broadly. See `enforcePinnedBackendVersion`.
const PINNED_BACKEND_TAG = 'b9937'
const PINNED_BACKEND_TAG = 'b10063'

/**
* Override the default app.log function to use Jan's logging system.
Expand Down Expand Up @@ -4967,9 +4967,9 @@ export default class llamacpp_upstream_extension extends AIEngine {
* Downloads a backend archive from ggml-org/llama.cpp GitHub releases
* and extracts it into the local backends directory.
*
* ggml-org publishes Windows and macOS backends as `.zip` archives
* (not `.tar.gz`). The Tauri `decompress` command handles both formats,
* so the extension change here is transparent to the extraction path.
* ggml-org publishes Windows backends as `.zip` archives and macOS /
* Linux backends as `.tar.gz`. The Tauri `decompress` command handles
* both formats, so the difference is transparent to the extraction path.
*/
private async downloadAndInstallBackend(
backendString: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,21 @@ describe('Backend functions', () => {
)
})

it('keeps zip archive names for non-Linux backend archives', () => {
it('keeps zip archive names for Windows backend archives', () => {
expect(getBackendArchiveName('b9691', 'win-cpu-x64')).toBe(
'llama-b9691-bin-win-cpu-x64.zip'
)
})

it('uses tarball names for macOS backend archives', () => {
// ggml-org publishes macOS assets only as .tar.gz; a .zip name 404s.
expect(getBackendArchiveName('b9691', 'macos-arm64')).toBe(
'llama-b9691-bin-macos-arm64.tar.gz'
)
expect(getBackendArchiveName('b9691', 'macos-x64')).toBe(
'llama-b9691-bin-macos-x64.tar.gz'
)
})
})

describe('getBackendDir and getBackendExePath', () => {
Expand Down