Probably whoever becomes the default provider for this new function. Like Google pays to be the default search provider.
The technical information is scarce but I very much doubt Mozilla is going to train and deploy their own model. It's more likely you will get a free tier access to one of the popular commercial offerings - Gemini, ChatGPT, Anthropic ... whoever pays for it.
then you throw in some diced carrot and celery for the next level