This is Remark II.6.32 from Kunen's Set Theory, which puzzles me:
Suppose that working in $\mathsf{ZF}$ (or even $\mathsf{ZFC} + V = L$), one could define a transitive proper class $M$ and prove that it is a model for $\mathsf{ZFC} + \neg\mathsf{CH}$ (or even just $\mathsf{ZF} + V \neq L$). Then $\mathsf{ZF}$ is inconsistent.
I understand the proof they provided, which uses the absoluteness of rank and $L(\delta)$. What I'm confused about is that the statement itself appears to very simply contradict Godel's second incompleteness theorem - if $M \models \mathsf{ZFC} + \neg\mathsf{CH}$, then certainly $M \models \mathsf{ZF}$, so $\mathsf{ZF} \vdash \mathrm{Con}(\mathsf{ZF})$, a contradiction.
Is there a mistake in my reasoning? Thanks in advance.
The existence of a proper class which we can prove each relativized ZF axiom does not prove the consistency of ZF. To see the absurdity of this, observe that $V$ is a proper class for which we can prove each relativized axiom... since each relativized axiom is just an axiom we take. So if that sufficed to prove consistency of ZF, we would be in violation of Godel's theorem from the get-go.
In order to prove the consistency of ZF within ZF, we would need to find a model that we could internally prove that every axiom holds. In other words we can prove the internally quantified statement "for every axiom $\ulcorner\phi\urcorner$ of ZF, $M\models \ulcorner\phi\urcorner$." (I use "Quine corners" to emphasize this is an internal code for the formula as a set.) This is different from the sense in this theorem, which is to say for every axiom $\phi$ of ZF we can prove "$\phi^M$."