[Bug]: Ollama provider returns empty model list after upgrading to v0.26.0 — Go rewrite fails to parse /api/tags response (original) (raw)

Self Checks

RAGFlow workspace code commit ID

v0.26.0

RAGFlow image version

v0.26.0

Other environment information

| RAGFlow | v0.26.0 (docker image) | | Ollama | v0.5.0 | | OS | CentOS 7 | | GPU | DCU Z100L-E4x16 32GB (x2) | | Deployment | Docker containerized |

Actual behavior

After upgrading RAGFlow from v0.25.5 to v0.26.0, the Ollama provider's "auto-populated model list" feature returns an empty list, making it impossible to add Ollama models through the UI. The connection test passes, but no models are discovered.

Actual behavior

RAGFlow Backend Logs

Connection test passes

POST /api/v1/providers/Ollama/connection 1.1 200 69 6069

But model list is empty

GET /api/v1/providers/Ollama/instances 1.1 200 21 7513
GET /api/v1/providers/Ollama/models 1.1 200 63 5756

OpenAI-API-Compatible fallback also fails

Fail to access chat model for provider=OpenAI-API-Compatible model=qwen2.5:32b-instruct-q4_K_M
openai.NotFoundError: 404 page not found

Ollama /api/tags Response

The Ollama server is healthy and returns valid model data:

{ "models": [ { "name": "qwen2.5-coder:32b-8k", "model": "qwen2.5-coder:32b-8k", "modified_at": "2026-05-26T14:13:16.512592158+08:00", "size": 19835149999, "digest": "0b853175d5b9f40a6513ef8751c509744a7bf4230720e8399e465d543d3890", "details": { "parent_model": "", "format": "gguf", "family": "qwen2", "families": ["qwen2"], "parameter_size": "32.8B", "quantization_level": "Q4_K_M" } }, { "name": "qwen2.5-coder:14b", "model": "qwen2.5-coder:14b", "modified_at": "2026-05-21T15:34:27.161982701+08:00", "size": 8983124336, "digest": "0e58897f747e246e970bccf6da85d2f1123de2e3468730a010e75986716849", "details": { "parent_model": "", "format": "gguf", "family": "qwen2", "families": ["qwen2"], "parameter_size": "14.8B", "quantization_level": "Q4_K_M" } }, { "name": "qwen2.5-coder:32b", "model": "qwen2.5-coder:32b", "modified_at": "2026-05-21T02:45:21.550971622+08:00", "size": 19835149999, "digest": "b95685f0b4a7e791142936e0177f69200c5a706126328950b3926778492e4f1", "details": { "parent_model": "", "format": "gguf", "family": "qwen2", "families": ["qwen2"], "parameter_size": "32.8B", "quantization_level": "Q4_K_M" } }, { "name": "qwen2.5-32b-instruct-q4_K_M", "model": "qwen2.5-32b-instruct-q4_K_M", "modified_at": "2026-05-21T00:44:17.308569422+08:00", "size": 19315434959, "digest": "9f163a1309afea09d9a956c6a855ecc99115a6d596fae201a5457a035bd4365", "details": { "parent_model": "", "format": "gguf", "family": "qwen2", "families": ["qwen2"], "parameter_size": "32.8B", "quantization_level": "Q4_K_M" } } ] }

Expected behavior

The model list should populate with the 4 available Ollama models, as it did in v0.25.6.

Steps to reproduce

```Markdown

  1. Deploy Ollama v0.5.0 (DCU Z100L environment, cannot upgrade Ollama)
  2. Pull models: qwen2.5-coder:32b, qwen2.5-coder:14b, qwen2.5-coder:32b-8k, qwen2.5-32b-instruct-q4_K_M
  3. Upgrade RAGFlow from v0.25.5 to v0.26.0
  4. Go to Settings > Model Providers > Ollama > Add Model
  5. Enter Base URL: http://10.206.254.5:11434
  6. Click "Model List" or "Verify"
  7. Observe: "102 No valid models found for provider 'Ollama'" and "Your API key is invalid"

Additional information

RAGFlow v0.26.0 rewrote the Ollama provider from Python to Go (#14580, #15213). The new Go implementation appears to have stricter parsing logic for the /api/tags response. Possible causes:
Family whitelist filtering: Go code may only recognize specific details.family values (e.g., "llama", "mistral") and filter out "qwen2"
Parameter_size format parsing: The "32.8B" format may not match Go's expected regex/pattern
Empty parent_model handling: parent_model: "" may cause JSON unmarshaling to fail in Go
API Key validation regression: Go code may incorrectly enforce non-empty API Key for Ollama

I cannot upgrade Ollama because:
Hardware: DCU Z100L (AMD ROCm-like architecture, not CUDA)
Ollama v0.5.0 is the last version with DCU support in my environment
Upgrading Ollama would break the entire inference pipeline