Description
We present the first gamma-ray burst (GRB) host galaxy with a measured absorption line and electron temperature (T$_e$) based metallicity, using the temperature sensitive [OIII]$\lambda$4363 auroral line detected in the JWST/NIRSpec spectrum of the host of GRB 050505 at redshift $z=4.28$. This direct measurement of the emission line metallicity allows us, for the first time, to bridge the gap between the ionised and neutral ISM in a GRB host galaxy at high redshift. We find that the metallicity of the neutral interstellar gas, derived from the absorption lines in the GRB afteglow, is in reasonable agreement with the T$_e$-based emission line metallicity in the ionised gas of the GRB host galaxy. When using strong emission line diagnostics appropriate for high-z galaxies and sensitive to ionisation parameter, we find good agreement between the strong emission line metallicity and the other two methods. Our results imply that, for the host of GRB050505, mixing between the hot and the cold ISM along the line of sight tot the GRB is efficient, and that GRB afterglow absorption lines can be a reliable tracer of the metallicity of the galaxy. This result has important implications for the use of GRB afterglows as probes of the cosmic chemical evolution, although it will have to be confirmed with a larger sample.