Hello wojtek,
You can do it in the following way using MergeAssets task. The example shows how to merge all models in the active chunk:
chunk = Metashape.app.document.chunk
task = Metashape.Tasks.MergeAssets()
task.source_data = Metashape.DataSource.ModelData
task.assets = [model.key for model in chunk.models]
task.apply(chunk)