We consider a two-dimensional f-deformed Dirac oscillator in the presence of an external uniform static magnetic field. We show that the two-dimensional f-deformed Dirac oscillator maps exactly onto the anti-Jaynes–Cummings (AJC) and Jaynes–Cummings (JC) models. We also obtain the energy spectrum and corresponding eigenstates in the weak and strong magnetic field regimes. We show how the change in chirality is associated with the magnitude of the magnetic field. We investigate the two-dimensional f-deformed Dirac oscillator in an external (isospin) field and find its energy spectrum.