Nextcloud Assistant not consistently using Ollama backend after upgrade to Nextcloud 33

Here is the revised support ticket text with the version history clearly stated.


Subject: Assistant not reliably using Ollama backend / Provider routing & LocalAI dependency clarification (Nextcloud 33)

Environment

Nextcloud Version: 33.0.0.16

Previous Working Version: 32.x (same infrastructure)

Database: PostgreSQL (pgsql)

assistant App Version: 3.2.0

integration_openai Version: 4.2.0

Ollama Version: 0.16.1

Ollama Endpoint: http://127.0.0.1:11434/v1

Installed Models (Ollama)

ollama list

NAME ID SIZE

nomic-embed-text:latest 0a109f422b47 274 MB

llama3.1:8b 46e0c10c039e 4.9 GB


Problem Statement

Nextcloud Assistant does not reliably use the configured Ollama backend via integration_openai. Behaviour is inconsistent and difficult to predict.

Observed issues:

• Assistant UI frequently stalls or remains waiting for responses

• Many Assistant interactions produce NO corresponding Ollama logs

• Ollama only logs requests when accessed via curl or OpenWebUI

• Assistant sometimes performs web search instead of local LLM inference

• Disabling LocalAI app causes Assistant failures despite integration_openai + Ollama configuration

This setup previously functioned correctly on Nextcloud version 32 using the same server, Ollama instance, and general configuration approach.


Backend Validation (Working)

Ollama service is running and reachable:

ss -ltnp | grep 11434

LISTEN 127.0.0.1:11434 users:((“ollama”,pid=814,…))

Model API responds correctly:

curl http://127.0.0.1:11434/v1/models

Chat completions succeed:

curl http://127.0.0.1:11434/v1/chat/completions

-H “Content-Type: application/json”

-d ‘{

“model”: “llama3.1:8b”,

“messages”: [

{“role”: “user”, “content”: “hello”}

]

}’

OpenWebUI connected to the same Ollama instance responds within seconds.

Conclusion: Ollama backend is functioning normally.


Nextcloud State (Working)

sudo -u www-data php occ status

installed: true

maintenance: false

needsDbUpgrade: false


Worker Configuration

Dedicated synchronous background workers configured.

Worker script:

/opt/nextcloud-ai-worker/taskprocessing.sh

Contents:

#!/bin/sh

echo “Starting Nextcloud AI Worker $1”

cd /var/www/nextcloud

sudo -u www-data php occ background-job:worker -t 60 ‘OC\TaskProcessing\SynchronousBackgroundJob’

Workers enabled and running:

nextcloud-ai-worker@1.service loaded active running

nextcloud-ai-worker@2.service loaded active running

nextcloud-ai-worker@3.service loaded active running

nextcloud-ai-worker@4.service loaded active running

All four workers are active.


Relevant Configuration

Assistant:

sudo -u www-data php occ config:list assistant

enabled: yes

installed_version: 3.2.0

integration_openai (key values):

provider: custom

url: http://127.0.0.1:11434/v1

default_completion_model_id: llama3.1:8b

chat_endpoint_enabled: 1

ai_integrations:

php occ config:list ai_integrations

{

“apps”: {

“ai_integrations”: []

}

}

Unclear whether this is expected or indicates mis-registration of providers.


Unexpected Behaviour

• Assistant does not consistently trigger Ollama requests

• No Ollama logs for many Assistant prompts

• Assistant appears to fall back to web search without explicit configuration

• LocalAI app state affects Assistant despite using integration_openai


Clarification Requested

  1. Is LocalAI required for Assistant even when integration_openai is configured with a custom Ollama endpoint?

  2. Should ai_integrations contain provider entries when integration_openai is active?

  3. How does Assistant decide between LLM provider vs web search?

  4. How can provider routing be validated and debugged?

  5. Are there known issues with Assistant + Ollama on Nextcloud 33?


Impact

• Behaviour changed after upgrade from Nextcloud 32 → 33

• Assistant reliability degraded

• Provider selection behaviour unclear

• Local inference cannot be trusted


Request

Please provide:

• Confirmation of correct architecture for Assistant + integration_openai + Ollama

• Recommended diagnostic steps to trace provider routing

• Any known compatibility notes for Ollama backends

Logs, configs, and further diagnostics available on request.


I’m experiencing the same issue with LiteLLM. It seems that requests to the chat back end are sent by Nextcloud with a huge delay. I’m not yet sure if this a configuration issue or software bug.

The browser does frequently /ocs/v2.php/apps/assistant/chat/check_generation?taskId=13&sessionId=3 which returns a HTTP 417 with the body {“task_status”:1,“slow_pickup”:false}

@sven2 this has been solved ,please install harp proxy ,see the image

1 Like