Set up your preferred self-hosted web interface (OpenWebUI or whatever, I haven't looked into this for a while), point it at ollama, and then configure it in Firefox:
browser.ml.chat.provider = http://localhost:3000/
At home I point this at Kagi Assistant, at work I point it to our internal GenAI platform's chat endpoint.