  We consider gluons scattering in Type IIB string theory on AdS$_5\times
S^5/\mathbb{Z}_2$ in the presence of D7 branes, which is dual to the flavor
multiplet correlator in a certain 4d $\mathcal{N}=2$ $USp(2N)$ gauge theory
with $SO(8)$ flavor symmetry and complexified coupling $\tau$. We compute this
holographic correlator in the large $N$ and finite $\tau$ expansion using
constraints from derivatives of the mass deformed sphere free energy, which we
compute to all orders in $1/N$ and finite $\tau$ using supersymmetric
localization. In particular, we fix the $F^4$ higher derivative correction to
gluon scattering on AdS at finite string coupling $\tau_s=\tau$ in terms of
Jacobi theta functions, which feature the expected relations between the
$SL(2,\mathbb{Z})$ duality and the $SO(8)$ triality of the CFT, and match it to
the known flat space term. We also use the flat space limit to compute $D^2F^4$
corrections of the correlator at finite $\tau$ in terms of a non-holomorphic
Eisenstein series. At weak string coupling, we find that the AdS correlator
takes a form which is remarkably similar to that of the flat space Veneziano
amplitude.
