The AI Gazette

Cost and routing

Amazon swapped Sonnet for a small decision model on ticket labels, behind a three-way switch

Two Amazon engineers replaced Claude Sonnet 4.6 with Strands Decider for sorting tickets into 20 categories, at about 98 percent less cost, after running both models side by side on live traffic.

Sonnet 4.6 had been labeling tickets in one of Amazon's internal ticketing systems with a long system prompt on every ticket, writing JSON against a fixed set of 20 labels. A decision model cannot generate text: it gets some state, a question and a set of options, and returns a probability for each option plus a confidence score. The team started with the original Strands Decider 2B, switched to the E4B Gemma 4 build after it scored clearly better on a test set, then tuned how confident the model had to be before a label was applied.

The measured change per call: average time fell from 4,215 ms to 897 ms, total tokens per ticket from 6,724 to 2,010, and output tokens from 170 to 1. At published list prices that works out to about $22,200 per million tickets for Sonnet versus about $500 for the decision model on a SageMaker ml.g5.xlarge instance. Because the production label descriptions alone were longer than the model's 4,096-token window, they rewrote each label as a one or two sentence criterion, added a "none" option, and dropped the oldest comments on long tickets.

The part the authors say they would copy regardless of model is the rollout: the labeling Lambda reads a setting from AWS AppConfig on every message with three values, BEDROCK, DUAL and DECIDER. In DUAL both models run in parallel, Sonnet's label is applied and the two are compared, and going back is a 45-second config change. They also found that JSON key order changed the answer, so every request is now sent with sorted keys, and they are clear about the limits: this fits a closed choice from a known catalog at high volume, not labels that need explanation text or a catalog that changes weekly.

Sending the same content with keys in a different order moved the output probabilities by up to 0.19.
The gotchaCarr Onstott and Mehul Jaiswal, Strands Agents blog

From other editions

Say hi.