Pydantic ImportString responds with the wrong missing file if there is an import error. This is an upstream pydantic bug : pydantic/pydantic#12715
The upstream bug is fixed. We are now waiting for the Pydantic 2.13 release for this fix to be release.
Note The original text for this issue was unclear it also talked about the 2.10->2.12 upgrade. This has now been done by #285.