Two prostitutes appear before Solomon, disputing over who was the mother of a certain child and who was the mother over the child who had died. There were no witnesses, so it was one's word against the other's. Solomon orders a sword brought in and commands his soldiers to divide the child in two to give half to each. The mother offers to give her child to the other woman, and the other woman says to kill the child so neither would have a baby.
I've never encountered anyone who thinks Solomon ever meant to kill the child. He expected that his bluff would reveal the mother, and it did. But it was a bluff nonetheless. This incident is held up by the narrator as an example of Solomon's great wisdom.
It never occurred to me before, but this passage has some striking similarities to passages where God desires to bring a certain response out of someone and says he'll do something but then goes back on it when a human being responds a certain way to what God says. For example, he says he'll destroy Israel and rebuild it from Moses in the aftermath of the golden calf incident, but when Moses intercedes on behalf of Israel God relents. He tells Hezekiah of his impending death, and Hezekiah's response brings extra years.
A common open theistic interpretation of such passages holds that God is not serious in his original statement if he never intended to do what he says. If God had known all along that Moses would respond as he did, then the passage doesn't seem to the open theist who makes this objection as if God's statement has the seriousness of what it actually says. It strikes me that the parallel passage of Solomon in his divinely-given wisdom, by the same reasoning, must have actually intended to cut the child in two. But I've never actually encountered anyone claiming this. It was a bluff. He didn't have divine insight that would guarantee his knowledge of how these two prostitutes would respond to his bluff, but he was wise enough to anticipate that this might be an effective way to decide the case.
So why couldn't God be doing the same thing but with infallible access to how people will respond, thus engaging in a similar bluff but one that God knows will not be called? Knowing how Moses would respond, God brought out exactly the response in Moses that occurred. If this is supposed to be somehow deceptive or immoral in some other way, as I think open theists who make this argument are saying of the traditional interpretation of these passages, then I think you have to say by the same reasoning that Solomon was being similarly immoral.
Now it's fine to say that Solomon was being immoral here, but it's difficult to make that claim if you want to hold up the moral teaching of the scriptures as divinely-inspired, since the narrator does seem to endorse Solomon's move as wise. That doesn't mean we who aren't as wise and don't have as much insight into people's character should always do the same thing in similar circumstances, but it does mean there's nothing wrong with someone sufficiently wise doing what Solomon does, and thus when God does it it's also not wrong. So you don't have to think God didn't know for sure what Moses would do.