I've seen some less wise choices on war declarations, but nothing that, um, avoidable. It would seem that adding a heavy weight against that behavior under those circumstances would be possible.
I would ask, will the AI currently attempt to create and add a commander to one of their large fleets when it's in a war-time scenario?
I ask because I've not seen an enemy fleet with a commander at any time, and adding a commander to my main attack fleet is one of my usual strategies to gain tactical superiority over the AI. This would seem to be an area for improvement for the AI if possible, at least for those civilizations with any military focus. The hit point, move and logistics buff is so significant with a commander so as to be overwhelming.
Note to self: Need to start re-naming my commanders to H. Harrington, given their past performance in battle.