If you want to keep both the swords and the sorcery, they have to do different things. Armed forces have aircraft and atom bombs and rifles because they all are used for different ends.
The easiest way to make them both useful would be to use the sorcery for support. Intelligence, perhaps. Your sorceress conjures up songbirds and sends them flying over the enemy encampment, and falcons to guard your encampment from the other side's songbirds. Or else they do the healing and the conjuration of food, and if you want to introduce sorceresses, you can world-build something where using the lively magic to create food or heal requires that you never shed blood with intent to harm. (Or, of course, not. Sorcerers may need to pick up a sword on occasion, depending on how you build the magic, and sorceresses are not going to be better than your average woman at swordplay. Worse, probably. A milkmaid used to lugging around large jugs of milk would be stronger than a clerk who spent her time bent over books.)
It's a bit hard to see how spellslingers could play a weaker role than your average swordsman, who can tone his danger down to the point of threatening rather than killing children who have to be moved. Possibility that sorcery could just impede the warriors in battle -- the sorceress traps their feet, and the swordsman goes in to strike them down -- but the swordsman holds down that position well.
Then there comes the sorcery that throws around fire balls. That ranges up from being a tank on two legs up through animate atom bomb to intelligent planet-busters. This is the sort of place where superheroes and sorcerers start to merge as tropes. (Not just as magical superheroes.) Superheroes generally don't have swordsman-level character fighting beside them for good reason. There would have to be reasons to keep them on. For instance, to act as a sorceress's body guard because it takes a long time for her to cast the spell. Then there are those which would require them to be deployed separately. The sorceress can turn the city into a smoldering heap, but to preserve it in some degree of intactness, the swordsmen must fight building to building, possibly with the sorceress putting out the fires, not lighting them.
No kingdom would really like having those wizards around because they are intrinsically dangerous and worse, their power is not in any way, shape or form socially based. You can weaken the king by peeling off the army, but not the king's chief wizard. The king's heir has no inherent power that the king does not let him have, but the king's chief wizard's son can blast you as soon as he masters the fireball spell. Not even a necromancer who summons up an army of skeletons or a wizard who creates a force of fire-breathing wolves is really operating with social power.
But the one who refuses is vulnerable to his neighbors who don't, plus the wizards themselves, who don't need social power to overthrow. They may not (or may) be able to secure the throne after, but you will not be in a position to refuse.
(It could get ugly if magic is intrinsically evil -- trafficking with evil spirits, or using, say, the bones of murder victims. )
Magic swords, and other magical things, do not really change the balance. True, you can hand out swords to those you trust, and even reclaim them, possibly with the aid of stealthy magic, but they fundamentally act like a wizard in act.