Source code of (legacy) SDL Model service is available on GitHub: https://github.com/sdl/dxa-model-service
Since this model service functionality is now provided by the GraphQL Content Service as the DXA Model Extension.
But I can't find the source code of Model extension on GitHub, is it not meant to be open source?