From bf48b030a0016bbb0490650a3e71c5862a1671cd Mon Sep 17 00:00:00 2001 From: kyteinsky Date: Mon, 20 Jul 2026 13:05:27 +0530 Subject: [PATCH 1/2] fix(ci): use the cpu variant of xllamacpp in llm2 Signed-off-by: kyteinsky --- .github/workflows/integration_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index a436f18..f7c24e5 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -152,6 +152,10 @@ jobs: pipx install poetry mkdir -p ../llm2-persistent_storage poetry install + # pyproject.toml pins xllamacpp to the cu128 wheel, which needs libcuda.so.1 at import + # time. The CI runner has no NVIDIA driver, so we swap in the PyPI CPU build for tests. + # see https://github.com/nextcloud/llm2/blob/d1c5604d75d008359937fcb16f1d82e1f421a87c/.github/workflows/integration_test.yml#L133-L135 + poetry run pip install --force-reinstall --no-deps xllamacpp - name: Cache llm2 models uses: actions/cache/restore@v5 From c342164d56d857ae15ca69fed47bbcdf144fb114 Mon Sep 17 00:00:00 2001 From: kyteinsky Date: Mon, 20 Jul 2026 14:00:16 +0530 Subject: [PATCH 2/2] fix(ci): test for get_file_tree tool call and count to 50 instead of 500 Signed-off-by: kyteinsky --- .github/workflows/integration_test.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index f7c24e5..7ea7f20 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -229,7 +229,7 @@ jobs: MCP_URL="http://localhost:8080/index.php/apps/app_api/proxy/context_agent/mcp/" CREDS=$(OC_PASS=alice ./occ user:add-app-password --password-from-env alice | tail -n 1) - sleep 300 + sleep 60 ATTEMPT=0 until [ "$ATTEMPT" -ge 20 ]; do @@ -257,7 +257,7 @@ jobs: [ "$STATUS" = "200" ] echo "$BODY" echo "$BODY" | grep -q 'list_calendars' - + - name: Cache llm2 models uses: actions/cache/save@v5 env: @@ -266,6 +266,11 @@ jobs: path: llm2-persistent_storage/ key: ${{ steps.cache-llm2-models-restore.outputs.cache-primary-key }} + - name: Create a sample file in alice's directory + run: | + echo "hello nextcloud" > data/alice/files/my_test_file.txt + ./occ files:scan alice + - name: Run task env: CREDS: "alice:alice" @@ -287,7 +292,8 @@ jobs: [ "$TASK_STATUS" == '"STATUS_SUCCESSFUL"' ] echo $TASK | jq '.ocs.data.task.output.output' echo $TASK | jq '.ocs.data.task.output.sources' - echo $TASK | jq '.ocs.data.task.output.sources' | grep -q 'get_folder_tree' + echo $TASK | jq '.ocs.data.task.output.sources' | grep -qE 'get_folder_tree|get_file_tree' + echo $TASK | jq '.ocs.data.task.output.output' | grep -q 'my_test_file' - name: Run streaming task if: ${{ matrix.server-versions == 'master' }} @@ -296,7 +302,7 @@ jobs: run: | TASK=$(curl -X POST -u "$CREDS" -H "oCS-APIRequest: true" -H "Content-type: application/json" \ "http://localhost:8080/ocs/v2.php/taskprocessing/schedule?format=json" \ - --data-raw '{"input": {"input": "Count to 500", "confirmation":1, "conversation_token": ""},"type":"core:contextagent:interaction", "appId": "test", "customId": "", "preferStreaming": true}') + --data-raw '{"input": {"input": "Count to 50", "confirmation":1, "conversation_token": ""},"type":"core:contextagent:interaction", "appId": "test", "customId": "", "preferStreaming": true}') echo "$TASK" TASK_ID=$(echo "$TASK" | jq '.ocs.data.task.id')