ollama-python 0.3.x returns the response as a dict, while newer releases return pydantic objects. The backend assumed objects (response.message) and crashed with AttributeError on every dispatch. Use a helper that accepts either shape so the code works across versions.