א כָּל תַּעֲנִית שֶׁלֹּא שָׁקְעָה עָלָיו חַמָּה, דְּהַיְנוּ שֶׁלֹּא הִשְׁלִימוֹ עַד צֵאת הַכּוֹכָבִים דְּהַיְנוּ שֶּׁיִּרְאֶה ג' כּוֹכָבִים בֵּינוֹנִים אוֹ שֶׁהַלְּבָנָה זוֹרַחַת בְּכֹחַ וְתָאִיר עַל הָאָרֶץ (הַגָּהוֹת אֲשֵׁרִי פ"ק דְּתַעֲנִית וְהַגָּהוֹת מַיְמוֹנִי פ"א), אֵינוֹ תַּעֲנִית; וְאִם דַּעְתּוֹ לֶאֱכֹל קֹדֶם לָכֵן, אֵינוֹ מִתְפַּלֵּל עֲנֵנוּ. הַגָּה: מִיהוּ נוֹהֲגִין לְהִתְפַּלֵּל עֲנֵנוּ אַף עַל פִּי שֶׁאֵין מַשְׁלִימִין עַד צֵאת הַכּוֹכָבִים, וְכֵן דַּעַת מִקְצָת רַבְּוָתָא (תה"ד סִימָן קנ"ז); וְנִרְאֶה לִי דְּדַוְקָא בְּיָחִיד דְּאוֹמֵר עֲנֵנוּ בְּשׁוֹמֵעַ תְּפִלָּה, דִּבְלָאו הָכֵי יָכוֹל לְהוֹסִיף כְּמוֹ שֶׁנִּתְבָּאֵר לְעֵיל סי' קי"ט, אֲבָל שְׁלִיחַ צִבּוּר לֹא יֹאמַר עֲנֵנוּ אֶלָּא אִם כֵּן מַשְׁלִימִין, וְכֵן נוֹהֲגִין.
1 The Laws of Accepting a Fast, Contains 13 Sections. Every fast that does not last until sunset - that is, it is not completed until Tzeit HaKochavim, meaning that one can see three medium-sized stars or the moon shines strongly and illuminates the earth (Hagahot Ashiri, Chapter 1 of Taanit and Hagahot Maimonides, Chapter 1) - is not considered a fast. And if one intends to eat before then, one should not recite the 'Aneinu' prayer [in their Amidah]. Rema: However, there is a custom to recite 'Aneinu' even if the fast is not completed until Tzeit HaKochavim, as is the opinion of some authorities (Terumat HaDeshen, section 157). It seems to me that this specifically applies to an individual who says 'Aneinu' in the 'Shomea Tefillah' blessing [in the Amidah], as anyway he can add to it as explained earlier in section 119. However, a prayer leader should not say 'Aneinu' unless the fast is completed, and this is the common practice.