In the ACT, Crimes (Sentencing) Act 2005 s 35 deals with the requirement to take a guilty plea into account.
Here, Sentencing Act 1991 s 5(2)(e) provides that a sentencing court must have regard to a guilty plea.
Section 6AAA requires a sentencing court to announce the sentence it would have imposed but for a guilty plea, but because of s 103, a sentence is probably still valid if a court doesn’t comply with s 6AAA.
In Thompson v The Queen  ACTCA 35, the ACT Court of Appeal discussed the need for a sentencing court to expressly articulate that it took a guilty plea into account when determining an appropriate sentence.
The Court noted:
 …A court is obliged to have regard to the plea of guilty. It is not the fact that the court must necessarily impose a lesser penalty as a result, but it must have regard to the plea.
 In R v Thompson (2000) 49 NSWLR 383, Spigelman CJ said (at 395; ):
The absence of any reference to actual consideration of the guilty plea in the course of sentencing should, as a general rule, in the light of the obligation of sentencing judges to give reasons for their decision, lead to an inference that the plea was not given weight. This conclusion is significantly influenced by the express statutory obligations. The position may not be the same with respect to other matters which are required to be taken into account, either at common law or by reason of a general scheme listing relevant considerations…
That NSW case — R v Thompson — was also cited by Kaye J in R v Flaherty (No 2) (2008) 19 VR 305. (In Flaherty, His Honour observed that the s 6AAA declaration was a bit academic, because it required imagining that the offender didn’t plea guilty and choosing from a range of options that might have otherwise reflected the course of the case.)
I don’t know of an express Victorian authority on the point, but it seems that while mere non-compliance with s 6AAA won’t invalidate a sentence, a failure to advert at all to a plea of guilty may well mean the sentence is open to challenge on appeal.