From eb0e21e5d6c5fd4d2a1d8da910dbb34fba7b260e Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 27 May 2025 23:29:41 +0700 Subject: [PATCH] chore: bump llama.cpp to b5509 (#5120) --- .../rolldown.config.mjs | 4 ++-- .../inference-cortex-extension/download.bat | 2 +- extensions/inference-cortex-extension/download.sh | 2 +- .../rolldown.config.mjs | 2 +- src-tauri/binaries/download.bat | 2 +- src-tauri/binaries/download.sh | 2 +- web-app/src/containers/DropdownModelProvider.tsx | 15 +++++++-------- web-app/src/hooks/useChat.ts | 12 ++++++++++++ 8 files changed, 26 insertions(+), 15 deletions(-) diff --git a/extensions/engine-management-extension/rolldown.config.mjs b/extensions/engine-management-extension/rolldown.config.mjs index 8f40473b6..98a5445cf 100644 --- a/extensions/engine-management-extension/rolldown.config.mjs +++ b/extensions/engine-management-extension/rolldown.config.mjs @@ -15,7 +15,7 @@ export default defineConfig([ `http://127.0.0.1:${process.env.CORTEX_API_PORT ?? '39291'}` ), PLATFORM: JSON.stringify(process.platform), - CORTEX_ENGINE_VERSION: JSON.stringify('b5488'), + CORTEX_ENGINE_VERSION: JSON.stringify('b5509'), DEFAULT_REMOTE_ENGINES: JSON.stringify(engines), DEFAULT_REMOTE_MODELS: JSON.stringify(models), DEFAULT_REQUEST_PAYLOAD_TRANSFORM: JSON.stringify( @@ -38,7 +38,7 @@ export default defineConfig([ file: 'dist/node/index.cjs.js', }, define: { - CORTEX_ENGINE_VERSION: JSON.stringify('b5488'), + CORTEX_ENGINE_VERSION: JSON.stringify('b5509'), }, }, ]) diff --git a/extensions/inference-cortex-extension/download.bat b/extensions/inference-cortex-extension/download.bat index 8073ed71f..fe2df6645 100644 --- a/extensions/inference-cortex-extension/download.bat +++ b/extensions/inference-cortex-extension/download.bat @@ -2,7 +2,7 @@ set BIN_PATH=./bin set SHARED_PATH=./../../electron/shared set /p CORTEX_VERSION=<./bin/version.txt -set ENGINE_VERSION=b5488 +set ENGINE_VERSION=b5509 @REM Download llama.cpp binaries set DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win diff --git a/extensions/inference-cortex-extension/download.sh b/extensions/inference-cortex-extension/download.sh index 90ed32a54..834c3315b 100755 --- a/extensions/inference-cortex-extension/download.sh +++ b/extensions/inference-cortex-extension/download.sh @@ -2,7 +2,7 @@ # Read CORTEX_VERSION CORTEX_VERSION=$(cat ./bin/version.txt) -ENGINE_VERSION=b5488 +ENGINE_VERSION=b5509 CORTEX_RELEASE_URL="https://github.com/menloresearch/cortex.cpp/releases/download" ENGINE_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION}/llama-${ENGINE_VERSION}-bin CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION} diff --git a/extensions/inference-cortex-extension/rolldown.config.mjs b/extensions/inference-cortex-extension/rolldown.config.mjs index a0dde8b68..6a62ddf74 100644 --- a/extensions/inference-cortex-extension/rolldown.config.mjs +++ b/extensions/inference-cortex-extension/rolldown.config.mjs @@ -19,7 +19,7 @@ export default defineConfig([ CORTEX_SOCKET_URL: JSON.stringify( `ws://127.0.0.1:${process.env.CORTEX_API_PORT ?? '39291'}` ), - CORTEX_ENGINE_VERSION: JSON.stringify('b5488'), + CORTEX_ENGINE_VERSION: JSON.stringify('b5509'), }, }, { diff --git a/src-tauri/binaries/download.bat b/src-tauri/binaries/download.bat index 52816f42e..e9323fd95 100644 --- a/src-tauri/binaries/download.bat +++ b/src-tauri/binaries/download.bat @@ -1,7 +1,7 @@ @echo off set CORTEX_VERSION=1.0.13-rc6 -set ENGINE_VERSION=b5488 +set ENGINE_VERSION=b5509 set ENGINE_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win set ENGINE_DOWNLOAD_GGML_URL=https://github.com/ggml-org/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win set CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION% diff --git a/src-tauri/binaries/download.sh b/src-tauri/binaries/download.sh index bce04f406..8a86b85c4 100755 --- a/src-tauri/binaries/download.sh +++ b/src-tauri/binaries/download.sh @@ -15,7 +15,7 @@ download() { # Read CORTEX_VERSION CORTEX_VERSION=1.0.13-rc6 -ENGINE_VERSION=b5488 +ENGINE_VERSION=b5509 CORTEX_RELEASE_URL="https://github.com/menloresearch/cortex.cpp/releases/download" ENGINE_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION}/llama-${ENGINE_VERSION}-bin CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION} diff --git a/web-app/src/containers/DropdownModelProvider.tsx b/web-app/src/containers/DropdownModelProvider.tsx index 9c952a84d..72460a9fe 100644 --- a/web-app/src/containers/DropdownModelProvider.tsx +++ b/web-app/src/containers/DropdownModelProvider.tsx @@ -71,9 +71,11 @@ const DropdownModelProvider = ({ model }: DropdownModelProviderProps) => { title={displayModel} className="font-medium cursor-pointer flex items-center gap-1.5 relative z-20 max-w-38" > -
- -
+ {provider && ( +
+ +
+ )} { - {currentModel?.settings && ( - + {currentModel?.settings && provider && ( + )} { const { prompt, setPrompt } = usePrompt() @@ -174,6 +175,17 @@ export const useChat = () => { } } } + // TODO: Remove this check when integrating new llama.cpp extension + if ( + accumulatedText.length === 0 && + toolCalls.length === 0 && + activeThread.model?.id && + provider.provider === 'llama.cpp' + ) { + await stopModel(activeThread.model.id, 'cortex') + throw new Error('No response received from the model') + } + // Create a final content object for adding to the thread const finalContent = newAssistantThreadContent( activeThread.id,