If solipsism is the view that I alone am the whole of reality - that only I exist - this has no logical connexion with idealism if idealism is the view (say Berkeley's) that the whole of reality consists of minds and their ideas . After all, solipsism's claim need not be that only I exist and that I am only a mind. I might the sole existent and a purely physical object.
'Idealism' is a vague term. It is very roughly in one of its major forms the view that reality is mental - that it consists of minds or is wholly the product or construction of minds. How if I am an idealist do I know that it does not consist only of my mind or is wholly the product or construction of my mind ? In other words if solipsism as such does not lead to idealism, how does your version of idealism (which I take it I have just outlined) not lead to idealist solipsism ?
There's no easy answer. Perhaps idealist solipsism is true ? But I rather think it isn't and the argument I'd urge is the following. If reality consists only of my mind or is wholly the product or construction of my mind, why do I not have complete control over it ? Why does it prove recalcitrant to my wishes and expectations ? If I am the sole reality or the sole author of reality, why do I not know everything about it and make discoveries about it through experiments which often fail ?
If the existence and activity of my mind do not answer these questions, might their answer - and best explanation - not lie in the existence of other minds that affect my experience ? Hence an argument, contra idealist solipsism, for a plurality of minds.
I am not an idealist in the sense I have outlined above - it would take much more courage than I possess to defend such a view. I am just doing the intellectual empathy of putting myself in the position of such an idealist and seeing how they might maintain idealism and avoid idealist solipsism.