f I modify it in js, it seems that the file will be large and cause a large load on the web. Is there any way to modify the model data or modify the modelstructure using the official API?
I'm not sure what exactly you mean by this but in general, while the model browser provides some basic customization, if you want something more involved, it's typically better to build your custom UI component.
For example, this blog post shows how you could visualize your own tree in a custom viewer panel. You could use this to show the model hierarchy only to the level you want.