Building custom model provider for Strands Agents with LLMs hosted on SageMaker AI endpoints
AWS•How-to••by Dan Ferguson•AWS Artificial Intelligence Blog
This post demonstrates how to build custom model parsers for Strands agents when working with LLMs hosted on SageMaker that don’t natively support the Bedrock Messages API format. We’ll walk through deploying Llama 3.1 with SGLang on SageMaker using awslabs/ml-container-creator, then implementing a custom parser to integrate it with Strands agents.
Shows how to write a custom model provider in Strands Agents so it can call a Llama 3.1 model served by SGLang on a SageMaker AI endpoint that returns OpenAI-style responses.
Who it is for
Teams hosting open models on SageMaker AI that want Strands agents to call them without Bedrock Messages API support.
Key points
Default SageMakerAIModel expects the Bedrock Messages format and fails on OpenAI-style responses (TypeError).
Walkthrough uses awslabs/ml-container-creator to build the BYOC container and deploy to a real-time endpoint in us-east-1.
Example uses ml.g6.12xlarge GPU instance; endpoint takes about 10-15 minutes to reach InService.
AI:Cisco's 2026 AWS AI League tournament drew 1,200 engineers, and the winning agent's design favored low output-token use and deterministic planning over sub-agents.
AI:A weekly digest where the AI items are: Polly Generative engine adds 14 voices (two Brazilian Portuguese); TorchNeuron public beta runs PyTorch on Trainium; SageMaker AI training sessions reach GA; Claude structured outputs on Bedrock; AWS Agent Registry for runtime tool discovery.