diff --git a/litestar/_signature/models/msgspec_signature_model.py b/litestar/_signature/models/msgspec_signature_model.py index 4a1b264606..7dcf01b035 100644 --- a/litestar/_signature/models/msgspec_signature_model.py +++ b/litestar/_signature/models/msgspec_signature_model.py @@ -140,7 +140,7 @@ def create( f"{fn_name}_signature_model", struct_fields, bases=(MsgspecSignatureModel,), - module=fn_module or "", + module=fn_module, namespace={ "return_annotation": parsed_signature.return_type.annotation, "dependency_name_set": dependency_names,