Miketz Faith in God and Human Initiative. A Contradiction?

(יג) בְּע֣וֹד ׀ שְׁלֹ֣שֶׁת יָמִ֗ים יִשָּׂ֤א פַרְעֹה֙ אֶת־רֹאשֶׁ֔ךָ וַהֲשִֽׁיבְךָ֖ עַל־כַּנֶּ֑ךָ וְנָתַתָּ֤ כוֹס־פַּרְעֹה֙ בְּיָד֔וֹ כַּמִּשְׁפָּט֙ הָֽרִאשׁ֔וֹן אֲשֶׁ֥ר הָיִ֖יתָ מַשְׁקֵֽהוּ׃ (יד) כִּ֧י אִם־זְכַרְתַּ֣נִי אִתְּךָ֗ כַּאֲשֶׁר֙ יִ֣יטַב לָ֔ךְ וְעָשִֽׂיתָ־נָּ֥א עִמָּדִ֖י חָ֑סֶד וְהִזְכַּרְתַּ֙נִי֙ אֶל־פַּרְעֹ֔ה וְהוֹצֵאתַ֖נִי מִן־הַבַּ֥יִת הַזֶּֽה׃ (טו)

...(כג) וְלֹֽא־זָכַ֧ר שַֽׂר־הַמַּשְׁקִ֛ים אֶת־יוֹסֵ֖ף וַיִּשְׁכָּחֵֽהוּ׃ (פ)

(13) In three days Pharaoh will pardon you and restore you to your post; you will place Pharaoh’s cup in his hand, as was your custom formerly when you were his cupbearer. (14) But think of me when all is well with you again, and do me the kindness of mentioning me to Pharaoh, so as to free me from this place.

...(23) Yet the chief cupbearer did not think of Joseph; he forgot him.

(א) וַיְהִ֕י מִקֵּ֖ץ שְׁנָתַ֣יִם יָמִ֑ים וּפַרְעֹ֣ה חֹלֵ֔ם וְהִנֵּ֖ה עֹמֵ֥ד עַל־הַיְאֹֽר׃
(1) After two years’ time, Pharaoh dreamed that he was standing by the Nile,
(ב) וישכחהו. לְאַחַר מִכָּאן. מִפְּנֵי שֶׁתָּלָה בוֹ יוֹסֵף לְזָכְרוֹ, הֻזְקַק לִהְיוֹת אָסוּר שְׁתֵּי שָׁנִים, שֶׁנֶּאֱמַר אַשְׁרֵי הַגֶּבֶר אֲשֶׁר שָׂם ה' מִבְטַחוֹ וְלֹא פָנָה אֶל רְהָבִים (תהילים מ') – וְלֹא בָטַח עַל מִצְרִים, הַקְּרוּיִים רַהַב:
(2) וישכחהו AND HE FORGOT HIM afterwards. Because Joseph had placed his trust in him that he should remember him he was doomed to remain in prison for two years. So it is said (Psalms 40:5) “Happy is the man who maketh the Lord his trust and turneth not to (רהבים) the arrogant” — i.e. doth not trust in the Egyptians who are called arrogant (Genesis Rabbah 89:3 cf. Isaiah 30:7).
(טז) וַיַּ֨עַן יוֹסֵ֧ף אֶת־פַּרְעֹ֛ה לֵאמֹ֖ר בִּלְעָדָ֑י אֱלֹהִ֕ים יַעֲנֶ֖ה אֶת־שְׁל֥וֹם פַּרְעֹֽה׃
(16) Joseph answered Pharaoh, saying, “Not I! God will see to Pharaoh’s welfare.”
(כה) וַיֹּ֤אמֶר יוֹסֵף֙ אֶל־פַּרְעֹ֔ה חֲל֥וֹם פַּרְעֹ֖ה אֶחָ֣ד ה֑וּא אֵ֣ת אֲשֶׁ֧ר הָאֱלֹהִ֛ים עֹשֶׂ֖ה הִגִּ֥יד לְפַרְעֹֽה׃
(25) And Joseph said to Pharaoh, “Pharaoh’s dreams are one and the same: God has told Pharaoh what He is about to do.
(לב) וְעַ֨ל הִשָּׁנ֧וֹת הַחֲל֛וֹם אֶל־פַּרְעֹ֖ה פַּעֲמָ֑יִם כִּֽי־נָכ֤וֹן הַדָּבָר֙ מֵעִ֣ם הָאֱלֹהִ֔ים וּמְמַהֵ֥ר הָאֱלֹהִ֖ים לַעֲשֹׂתֽוֹ׃
(32) As for Pharaoh having had the same dream twice, it means that the matter has been determined by God, and that God will soon carry it out.
(לח) וַיֹּ֥אמֶר פַּרְעֹ֖ה אֶל־עֲבָדָ֑יו הֲנִמְצָ֣א כָזֶ֔ה אִ֕ישׁ אֲשֶׁ֛ר ר֥וּחַ אֱלֹהִ֖ים בּֽוֹ׃
(38) And Pharaoh said to his courtiers, “Could we find another like him, a man in whom is the spirit of God?”

(ט) וְאֵ֨יךְ אֶֽעֱשֶׂ֜ה הָרָעָ֤ה הַגְּדֹלָה֙ הַזֹּ֔את וְחָטָ֖אתִי לֵֽאלֹהִֽים׃

How then could I do this most wicked thing, and sin before God?”

(ה) וְעַתָּ֣ה ׀ אַל־תֵּעָ֣צְב֗וּ וְאַל־יִ֙חַר֙ בְּעֵ֣ינֵיכֶ֔ם כִּֽי־מְכַרְתֶּ֥ם אֹתִ֖י הֵ֑נָּה כִּ֣י לְמִֽחְיָ֔ה שְׁלָחַ֥נִי אֱלֹהִ֖ים לִפְנֵיכֶֽם׃ (ו) כִּי־זֶ֛ה שְׁנָתַ֥יִם הָרָעָ֖ב בְּקֶ֣רֶב הָאָ֑רֶץ וְעוֹד֙ חָמֵ֣שׁ שָׁנִ֔ים אֲשֶׁ֥ר אֵין־חָרִ֖ישׁ וְקָצִּֽיר׃ (ז) וַיִּשְׁלָחֵ֤נִי אֱלֹהִים֙ לִפְנֵיכֶ֔ם לָשׂ֥וּם לָכֶ֛ם שְׁאֵרִ֖ית בָּאָ֑רֶץ וּלְהַחֲי֣וֹת לָכֶ֔ם לִפְלֵיטָ֖ה גְּדֹלָֽה׃
(5) Now, do not be distressed or reproach yourselves because you sold me hither; it was to save life that God sent me ahead of you. (6) It is now two years that there has been famine in the land, and there are still five years to come in which there shall be no yield from tilling. (7) God has sent me ahead of you to ensure your survival on earth, and to save your lives in an extraordinary deliverance.
(יט) וַיֹּ֧אמֶר אֲלֵהֶ֛ם יוֹסֵ֖ף אַל־תִּירָ֑אוּ כִּ֛י הֲתַ֥חַת אֱלֹהִ֖ים אָֽנִי׃ (כ) וְאַתֶּ֕ם חֲשַׁבְתֶּ֥ם עָלַ֖י רָעָ֑ה אֱלֹהִים֙ חֲשָׁבָ֣הּ לְטֹבָ֔ה לְמַ֗עַן עֲשֹׂ֛ה כַּיּ֥וֹם הַזֶּ֖ה לְהַחֲיֹ֥ת עַם־רָֽב׃
(19) But Joseph said to them, “Have no fear! Am I a substitute for God? (20) Besides, although you intended me harm, God intended it for good, so as to bring about the present result—the survival of many people.