#Ollama integration doesn't work

1 messages · Page 1 of 1 (latest)

ocean marsh
#

The problem

I'm unable to set up the Ollama integration in Home Assistant. After entering the external URL (exposed via Cloudflare Tunnel / cloudflared), the config flow immediately fails with:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This indicates Home Assistant receives a response (likely HTTP 200), but the body is empty, invalid, or not JSON when calling /api/tags.

Home Assistant version

2026.3.1 (Home Assistant OS)

Ollama installation & exposure

  • Ollama is running locally on a separate machine.
  • Exposed externally via Cloudflare Tunnel (cloudflared)
#

Traceback / relevant logs

Logger: homeassistant.components.ollama.config_flow
Bron: components/ollama/config_flow.py:114
integratie: Ollama (documentatie, problemen)
Eerst voorgekomen: 09:15:39 (2 gebeurtenissen)
Laatst gelogd: 09:17:06

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/ollama/config_flow.py", line 114, in async_step_user
    await client.list()
  File "/usr/local/lib/python3.14/site-packages/ollama/_client.py", line 1097, in list
    return await self._request(
           ^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/local/lib/python3.14/site-packages/ollama/_client.py", line 692, in _request
    return cls(**(await self._request_raw(*args, **kwargs)).json())
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.14/site-packages/httpx/_models.py", line 832, in json
    return jsonlib.loads(self.content, **kwargs)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/json/__init__.py", line 352, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/local/lib/python3.14/json/decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/json/decoder.py", line 363, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
wicked storm
#

Works for me, using it local though. Why"Exposed externally via Cloudflare Tunnel (cloudflared)"