Keyshia Cole just dodged a bullet ... she will NOT be prosecuted for attacking a woman inside Birdman's L.A. condo ... but she may still get an anger check.
Sources in the L.A. City Attorney's Office tell TMZ ... they will not prosecute Cole after she went to Birdman's crib in the middle of the night last month, allegedly spotting a woman inside and going nuts on her.
Prosecutors have told Cole that instead of going to trial, they want her to appear at an informal office hearing, where someone from the City Attorney's Office will listen to her and the victim and then give the singer a stern warning not to do it again ... or else.
The hearing officer can require Cole to go to anger management courses ... something they've done in similar cases before.
It beats jail.