An AWS sample combines LiteLLM and NVIDIA NeMo Switchyard to route coding-agent requests through Amazon Bedrock and compare cost per successfully completed task.
AWS published a sample deployment that uses NVIDIA NeMo Switchyard to direct coding-agent requests among models available through Amazon Bedrock. The approach is built around a different measure than token price alone: the cost of runs that actually finish with passing tests. An agent may make many model calls, replay conversation history, or require retries, so AWS recommends assessing total run costs against solved tasks.
The sample deploys LiteLLM, an open-source model gateway, with Switchyard on Amazon Elastic Container Service running on AWS Fargate. Its Stage strategy examines recent tool activity and results in the conversation history to choose between a more capable model and a lower-cost option. The alternative Random strategy selects from a configured model pool, optionally using weights for traffic splits or A/B comparisons. The example calls Bedrock through its Converse or ConverseStream APIs.
AWS includes benchmark runners for small coding tasks, such as fixing a URL-slug function or building an expression parser. A task counts as solved when its tests pass within the configured turn limit. The runner records model selections, tool actions, test results and estimated costs, then reports cost per solved task alongside single-model baselines. The post cautions that a few benchmark runs are not enough to establish broad conclusions about quality or cost.
The deployment is explicitly presented as evaluation sample code, not a production-ready integration. It uses Switchyard server version 0.3.0 and LiteLLM image version 1.102.0; AWS notes that the integration is experimental and that its configuration and APIs may change. The sample also advises testing in a non-production account and reviewing security, regulatory and compliance requirements before use. Its value is as a way for development teams to test whether request routing improves results on their own coding-agent workloads, rather than assuming that lower per-token prices translate into lower costs overall.
