From b7803026b65f5d4904b73a64abd22a94be652bbe Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 4 Jun 2026 14:15:39 +0200 Subject: [PATCH 1/3] tests(ci): Cache llm2 models in CI workflow Add caching for llm2 models to improve workflow efficiency and avoid being rate limited by huggingface Signed-off-by: Marcel Klehr --- .github/workflows/integration_test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 2f03ba8..9d02331 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -152,6 +152,14 @@ jobs: pipx install poetry poetry install + - name: Cache llm2 models + uses: actions/cache@v5 + env: + cache-name: cache-llm2-models + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.os }}-llm2-models-${{ env.cache-name }}-${{ hashFiles('llm2/lib/main.py') }} + - name: Init llm2 working-directory: llm2/lib env: From 47ebb9213be0c885abf24cc9e712da13748d12fd Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 4 Jun 2026 14:33:06 +0200 Subject: [PATCH 2/3] fix(tests): Fix caching of llm2 models Create a directory for persistent storage and update cache path Signed-off-by: Marcel Klehr --- .github/workflows/integration_test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 9d02331..2c575d6 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -150,6 +150,7 @@ jobs: sudo apt-get update sudo apt install pipx pipx install poetry + mkdir -p ../llm2-persistent_storage poetry install - name: Cache llm2 models @@ -157,7 +158,7 @@ jobs: env: cache-name: cache-llm2-models with: - path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + path: llm2-persistent_storage/ key: ${{ runner.os }}-llm2-models-${{ env.cache-name }}-${{ hashFiles('llm2/lib/main.py') }} - name: Init llm2 @@ -167,7 +168,7 @@ jobs: APP_PORT: 9080 APP_VERSION: ${{ fromJson(steps.llm2_appinfo.outputs.result).version }} run: | - poetry run python3 main.py > ../logs 2>&1 & + APP_PERSISTENT_STORAGE="$(pwd)/../../llm2-persistent-storage/" poetry run python3 main.py > ../logs 2>&1 & - name: Register backend run: | From cb27be3e556882da393a9a6cb95d9b3d0c24de70 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 4 Jun 2026 14:45:37 +0200 Subject: [PATCH 3/3] fix(tests): Fix llm2 model caching Updated caching strategy for llm2 models in integration tests. Signed-off-by: Marcel Klehr --- .github/workflows/integration_test.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 2c575d6..3f94790 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -154,7 +154,8 @@ jobs: poetry install - name: Cache llm2 models - uses: actions/cache@v5 + uses: actions/cache/restore@v5 + id: cache-llm2-models-restore env: cache-name: cache-llm2-models with: @@ -174,7 +175,6 @@ jobs: run: | ./occ app_api:app:register llm2 manual_install --json-info "{\"appid\":\"llm2\",\"name\":\"Local large language model\",\"daemon_config_name\":\"manual_install\",\"version\":\"${{ fromJson(steps.llm2_appinfo.outputs.result).version }}\",\"secret\":\"12345\",\"port\":9080,\"scopes\":[\"AI_PROVIDERS\", \"TASK_PROCESSING\"],\"system_app\":0}" --force-scopes --wait-finish - - name: Install context_agent app working-directory: ${{ env.APP_NAME }} run: | @@ -253,6 +253,14 @@ jobs: [ "$STATUS" = "200" ] echo "$BODY" echo "$BODY" | grep -q 'list_calendars' + + - name: Cache llm2 models + uses: actions/cache/save@v5 + env: + cache-name: cache-llm2-models + with: + path: llm2-persistent_storage/ + key: ${{ steps.cache-llm2-models-restore.outputs.cache-primary-key }} - name: Run task env: