The Prosecutor can make a recommendation to the Judge, but the sentence is up to the Judge.
Some offenses have mandatory minimums and require certain terms of probation.
Open pleas are not usually good, unless you have a harsh Prosecutor or a known=to=be sympathetic Judge- the Judge can't change the charge (ergo, the mand. min); the Prosecutor can reduce, or dismiss.