For Ekev, here’s a post from my defunct Girsology blog, which I happened to cross-post to parshablog, so it is still funct.
It begins:
In the tefillah of Baruch sheAmar, there are two variant nuschaot to convey the idea that Hashem is "lauded by the mouth of His people". One is הַמְהֻלָל בְּפִי עַמּוֹ and the other is הַמְהֻלָל בְּפֶה עַמּוֹ. On the level of pure dikduk, the obvious choice is בְּפִי עַמּוֹ. After all, Hebrew nouns come in two flavors, absolute and construct. Peh is the absolute form and means simply "mouth", which Pi is the construct form, and means "mouth of". Since the blessing refers to the mouth of Amo, "His people", it is the construct form, and so Pi is the grammatically correct selection.
Siddur Shiloh, the siddur I grew up with, has it as בְּפִי.Artscroll, following several halachic and kabbalistic sources, has it as בְּפֶה…
Now summarizing, but read the full post for details. The kabbalistic explanation is an ex post facto rationalization of an existing practice. The explanation that is בפה corresponds in gematria to the 87 words of Baruch She’Amar, and that it descending in a petek is also a rationalization.
Really, it comes down to a point raised by Minchas Shai on Ekev.
To quote my translation:
"מוֹצָא פִי-ה -- 'every beged kefet which follows the letters yud heh vav or aleph [that is, an open syllable] is fricative [without a dagesh], except for the exceptions. And many of them have a dagesh for the improvement of reading, such as this one, for it is not possible to say fi immediately prior to the [Divine] Name, for it is a disparaging language in French, and [Heaven] forfend to apply this to Hashem Yitbarach.' End quote, that which I have found.
And I have heard that in French, fi, the meaning is null and nothing. And in all the sefarim [Minchas Shai has seen] the פ is fricative, according to the rule. And we should not worry about the Grench language, because we do not cancel the operation of the Holy Tongue [Hebrew] because of other languages. And I have found as well, in Michah 4:4:ד וְיָשְׁבוּ, אִישׁ תַּחַת גַּפְנוֹ וְתַחַת תְּאֵנָתוֹ--וְאֵין מַחֲרִיד: כִּי-פִי ה צְבָאוֹת, דִּבֵּר.4 But they shall sit every man under his vine and under his fig-tree; and none shall make them afraid; for the mouth of the LORD of hosts hath spoken.
where it is a fricative."
So, the idea is that they did not want to apply “Fie” “Fi“to Hashem, and changed the fricative to an ungrammatical plosive. So too in Baruch She’Amar, we would not want to say, chas veShalam, that Hashem is praised with the “Fie” “Fi” of His Nation!
And as I point out in the post, Professor Naftali Weider points out that there are old siddurim preceding the Arizal (and his kabbalistic explanation) that have this change consistently, in all instances of בפי. His article is תיקונים בנוסח התפילה בהשפעת לשונות לועזיות, Changes to the Nusach of Tefillah Influenced By Foreign Languages, and I traced it back to here, in The Formation of Jewish Liturgy in the East and the West, volume II.
Thanks. Indeed, that's what Minchas Shai says, contrary to my summary
It's not 'fie' but 'fi' which is an old french term to manifest disdain and disgust. Today there remains the idiomatic expression 'faire fi de' which means to discard something out of contempt.