Urgent.News

What's breaking now, across thousands of outlets.

AI

LLM Routing with Zero Code: Content-Based Model Selection on Bedrock with Step Functions

Sending every request to your biggest model is the easiest way to burn a Bedrock budget — a "what's the capital of Japan?" question doesn't need the same model as "write FizzBuzz in Python". The usual fix is a router Lambda, but that means code to write, deploy, and maintain. In this hands-on, we'll build content-based model routing with zero application code : an AWS Step Functions state machine…

This hands-on guide shows how to build an AWS Step Functions state machine for routing requests to the appropriate large language model (LLM) on AWS Bedrock, without writing any code. The key steps are creating an IAM role with permissions for Bedrock model invocations, and defining the state machine in JSON. The machine begins with a "ClassifyQuestion" task that uses a small model to classify incoming questions as "simple", "code", or "creative".

A "Choice" state then routes each category to its designated answering model: Claude Haiku for code, Amazon Nova Lite for creative writing, and Nova Micro for all other questions. The routing logic lives entirely in the state machine, rather than requiring a custom Lambda function. This approach avoids the cost and maintenance overhead of a routing Lambda, while still providing built-in features like retries and execution history. To use the latest model IDs, check aws bedrock list-inference-profiles or the console.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Agent State, Memory & Checkpointing: Where the Boundaries Blur

Hi again. In Part 1, I tried to separate state, memory and checkpointing in the simplest way I understand them: State tells the agent where it is and what it currently has.

  • State, memory, and checkpointing concepts overlap in AI agent development
  • Checkpoints persist conversation state, enabling continuity
  • Long-term memory differs from checkpointing, stores user preferences

AI Model Routing: The Missing Infrastructure Layer for Multi-Model AI Applications

The Next AI Infrastructure Layer Is Not the Model — It’s the Router How model routing is becoming the control plane for the multi-model era The AI industry has spent the last few years asking one…

  • Model routing emerges as new infrastructure layer for AI applications.
  • OpenRouter acquisition by Stripe underscores strategic importance of model routing.
  • Companies must balance cost, quality, speed in AI model selection.

More from Saturday 22 August →