In parshat Vayigash, there is fairly straightforward evidence that the brothers sold Yosef. Bereishit 45:
This shouldn't have been in doubt, since this is also the straightforward meaning of the pesukim in parashat Vayeshev:
|25. And they sat down to eat a meal, and they lifted their eyes and saw, and behold, a caravan of Ishmaelites was coming from Gilead, and their camels were carrying spices, balm, and lotus, going to take [it] down to Egypt.||כה. וַיֵּשְׁבוּ לֶאֱכָל לֶחֶם וַיִּשְׂאוּ עֵינֵיהֶם וַיִּרְאוּ וְהִנֵּה אֹרְחַת יִשְׁמְעֵאלִים בָּאָה מִגִּלְעָד וּגְמַלֵּיהֶם נֹשְׂאִים נְכֹאת וּצְרִי וָלֹט הוֹלְכִים לְהוֹרִיד מִצְרָיְמָה:|
|26. And Judah said to his brothers, "What is the gain if we slay our brother and cover up his blood?||כו. וַיֹּאמֶר יְהוּדָה אֶל אֶחָיו מַה בֶּצַע כִּי נַהֲרֹג אֶת אָחִינוּ וְכִסִּינוּ אֶת דָּמוֹ:|
|27. Come, let us sell him to the Ishmaelites, but our hand shall not be upon him, for he is our brother, our flesh." And his brothers hearkened.||כז. לְכוּ וְנִמְכְּרֶנּוּ לַיִּשְׁמְעֵאלִים וְיָדֵנוּ אַל תְּהִי בוֹ כִּי אָחִינוּ בְשָׂרֵנוּ הוּא וַיִּשְׁמְעוּ אֶחָיו:|
|28. Then Midianite men, merchants, passed by, and they pulled and lifted Joseph from the pit, and they sold Joseph to the Ishmaelites for twenty silver [pieces], and they brought Joseph to Egypt.||כח. וַיַּעַבְרוּ אֲנָשִׁים מִדְיָנִים סֹחֲרִים וַיִּמְשְׁכוּ וַיַּעֲלוּ אֶת יוֹסֵף מִן הַבּוֹר וַיִּמְכְּרוּ אֶת יוֹסֵף לַיִּשְׁמְעֵאלִים בְּעֶשְׂרִים כָּסֶף וַיָּבִיאוּ אֶת יוֹסֵף מִצְרָיְמָה:|
Yehuda proposed to sell Yosef to the passing caravan and the brothers then carried it out, pulling Yosef out of the pit and selling him to those same merchants.
What wrongly gives some mefarshim pause is:
a) the ambiguity of actor in וַיִּמְשְׁכוּ וַיַּעֲלוּ אֶת יוֹסֵף מִן הַבּוֹר, such that the ones doing the action could either be the Midianite men who passed by, or the brothers, and
b) the introduction of Midianim, where earlier they were called Yishmaelim.
However, Yishmaelim is used to mean Arabs who travel by caravan, or to a general group which includes Midianites, just like Canaanim elsewhere (such as in Eshet Chayil) means merchant. If you must appeal to the Documentary Hypothesis to explain the shift in terms, go ahead, because at least you will partially arrive at the simple peshat, but I don't think it is necessary. Rather, three groups -- the midrashically inclined, the "deep level" of close reading they imagine to be peshat inclined, and the Documentary Hypothesis proponents looking for 'contradictions' in the Biblical text, all point to this as a contradiction in need of resolution. It is not a contradiction. Don't read so closely, or you will get cross-eyed.
See Shofetim perek 8 pasuk 22 and 24, where Ishmaelites are exchanged for Midianites without second thought:
Rashi resolves as the brothers pulling Yosef out, selling him to the Ishmaelites וַיִּמְשְׁכוּ וַיַּעֲלוּ אֶת יוֹסֵף מִן הַבּוֹר וַיִּמְכְּרוּ אֶת יוֹסֵף לַיִּשְׁמְעֵאלִים; and the Ishmaelites turning around and selling him to the passing Midianites, mentioned as וַיַּעַבְרוּ אֲנָשִׁים מִדְיָנִים סֹחֲרִים. This explains the Midianites (or Midanites) selling Yosef to Potifar, where the pasuk at the end of the perek states וְהַמְּדָנִים מָכְרוּ אֹתוֹ אֶל מִצְרָיִם לְפוֹטִיפַר. Others add add an extra level and have the Midianites selling him to the Midanites, since they make a big deal of what is a small change in spelling of people-name.
The Documentary Hypothesis
Rashbam resolves this as the brothers planning to sell, but being preempted by the Midianites. He is not bothered by the explicit pasuk to the contrary in Vayigash:
פסוק כח"And Midianite men passed by: And while they [the brothers] were sitting to eat bread and were a bit distant from the pit, so that they would not eat upon the blood, and they were waiting for the Ishmaelites they saw. And before the Ishmaelites passed, other Midianite men passed by the way there and so him [Yosef] in the pit, pulled him out, and the Midianites sold him to the Ishmaelites.
ויעברו אנשים מדינים - ובתוך שהיו יושבים לאכול לחם ורחוקים היו קצת מן הבור לבלתי אכול על הדם וממתינים היו לישמעאלים שראו וקודם שבאו הישמעאלים עברו אנשים מדינים אחרים דרך שם וראוהו בבור ומשכוהו ומכרוהו המדיינים לישמעאלים.
שהאחים לא ידעו ואף על פי שכתוב אשר מכרתם אותי מצרימה.
שהגרמת מעשיהם סייעה במכירתו.
And there is to say that the brothers did not know this. And even though it is written [in parashat Vayigash] 'that you sold me unto Egypt'. And there is to say that the repercussions of their actions assisted in his sale."
Sure, it is possible; but it seems just so farfetched that I doubt that it is correct. Correct peshat sometimes involves not reading too much into changes in language.
I've heard some more recent theories, from those who imagine themselves to be promoting peshat as a deep reading of the text, while the deep reading really amounts to neo-midrash. Neo-midrash is fine, but these same proponents of deep reading often scorn midrash. They explain that Yosef thought that the brothers sold him to those Midianites who pulled him out of the pit. Meanwhile, either the brothers sold Yosef to the Midianites, at a distance from the pit, or they did not sell Yosef, and Yosef was mistaken in his assertion. This explanation seems characteristic of their psychological approach, in which Biblical characters will assert non-truths, which are true from their perspective, or which serve the needs of the character. For one example of many, Yehuda was caught up in his argument with Yosef, and so he adds details which do not occur in earlier exchanges. Rather than saying that these details were not relevant until now, the proponents of this approach say Yehuda now made them up. Or they might say something to Yaakov about their exchange with the vizier in Egypt which was not mentioned previously, and this detail was invented to further their goals.
While this approach adds a nice texture to the Biblical narrative, and grants us complex and nuanced insights into the souls and personalities of the Biblical characters, I doubt that this often reflects Authorial intent.
See also HaKsav veHakabalah.