Consider this form of plea-bargaining: "Plead guilty to a lesser crime. In exchange, we won't prosecute you further and you give us information about your bosses and testify against them."
This is unfair, because a defendant who does not have this kind of information to offer gets a heavier sentence for the same crime.
Also, in Jewish law, you are not allowed to testify against yourself, possibly because:
(1) Rambam: The defendant may become depressed, even suicidal, and "confess" just to get it over with [Mishneh Torah, Sanhedrin 18:6].
(2) Yosef ibn Migash (12th-century Spanish rabbi): A confession would influence the judges, and they may not take evidence of innocence as seriously.
On the other hand, a plea-bargain is technically not "testifying" in court against yourself (except for the minor matter).
But what if the defendant is promised immunity in exchange for info and testimony. Would that make the deal more Jewishly acceptable (even though unfair to others)?
Is this or any other form of plea-bargaining allowed in Judaism?