The Rif and the Rambam wrote that specifically for ten they may join even with vegetables; but for three, only one who ate bread specifically may join. For in this matter, three is more stringent than ten, because with ten, since the primary zimun exists from those who ate bread, and this is only to add the mention of "our God," since they ate something, the Divine Presence rests and he can say "our God." But for the primary zimun, those who ate bread specifically are required, for so we learned in the Mishnah: "Three who ate," meaning: in a meal. And there is no meal except with bread. And even though it is taught in the Yerushalmi: two who ate grain and one vegetables – he joins; it is explicitly implied there that this is a minority opinion, and the sages disagree, see there. And behold, in the Rambam it is written explicitly: "a kezayit of bread." But in the Rif it says "a kezayit of grain," and therefore some say that it is not specifically bread, for even the blessing of mezonot suffices since it is grain (Kolbo). But the opinion of the Rosh and Ri is that even with vegetables it suffices, for since for ten he joins – all the more so for three. And behold, our teacher, the Beit Yosef, in his great work ruled like the Rambam, but in the Shulchan Aruch, section 3, he brought all three opinions. And because his opinion leans toward the ruling of the Rambam, he therefore wrote, and this is his wording: Therefore, two who ate and a third arrived, if they can obligate him to eat a kezayit of bread – it is better. And if he does not wish to – they should not give him to drink nor any other food. And if it happened that they gave him to drink or another food – they shall perform zimun with him, even though he does not wish to eat bread. Thus far his words. And he recanted from what he wrote in his great work, because Maharam of Rothenburg acted so as a practical ruling (ibid.). And the great Acharonim wrote that even ab initio one may do so, because the primary halachic ruling is like the words of the Rosh (Magen Avraham, subsection 9, and the Bach and Knesset HaGedolah).
הרי"ף והרמב"ם כתבו דדווקא לעשרה מצטרפי אפילו בירק; אבל לשלושה אינו מצטרף רק מי שאכל פת דווקא, דבזה חמירא שלושה מעשרה, דבעשרה כיון דעיקר זימון יש מאוכלי פת, וזהו רק להוסיף באמירת "אלהינו", כיון שאכלו דבר מה שכינתא שריא ויכול לומר "אלהינו". אבל בעיקר הזימון צריך אוכלי פת דווקא, דהכי תנן: "שלושה שאכלו", כלומר: בסעודה. ואין סעודה אלא בפת. ואף על גב דבירושלמי תניא: שנים שאכלו דגן ואחד ירק – מצטרף; משמע שם להדיא דזהו דעת יחיד, וחכמים חולקים, עיין שם. והנה ברמב"ם כתוב מפורש: "כזית פת". אבל ברי"ף איתא "כזית דגן", ולכן יש אומרים דלאו דווקא פת, דאפילו ברכת מזונות סגי דדגן הוא (כלבו). אבל דעת הרא"ש ור"י דגם בירק סגי, דכיון דלעשרה מצטרף – כל שכן לשלושה. והנה רבינו הבית יוסף בספרו הגדול פסק כהרמב"ם, אבל בשולחן ערוך סעיף ג הביא כל השלוש דעות. ולפי שדעתו נוטה לפסק הרמב"ם, לכן כתב וזה לשונו: הלכך שנים שאכלו ובא השלישי, אם יכולם להזקיקו שיאכל כזית פת – מוטב. ואם אינו רוצה – לא יתנו לו לשתות ולא מאכל אחר. ואם אירע שנתנו לו לשתות או מאכל אחד – יזמנו עמו, אף על פי שאינו רוצה לאכול פת. עד כאן לשונו. וחזר בו ממה שכתב בספרו הגדול, לפי שמהר"ם מרוטנבורג עשה כן הלכה למעשה (שם). וגדולי האחרונים כתבו שגם לכתחילה עושין כן, לפי שהעיקר לדינא כדברי הרא"ש (מגן אברהם סעיף קטן ט', וב"ח וכנסת הגדולה).