Published Build3 min read
Mixing self-hosted Qwen with Bedrock Claude costs you telemetry, not a rewrite
AWS shows three agents sharing one AgentCore container across two hosting paths. The orchestration framework absorbs the split; the OpenTelemetry instrumentation does not.
Written for builders.See today for builders
What happened
- AWS published a post on its machine learning blog, "Building agentic workflows with SageMaker AI and Bedrock AgentCore", showing how to combine OpenAI-compatible endpoints on Amazon SageMaker AI with Amazon Bedrock AgentCore runtime and its managed deployment.
- The post frames the common challenge as mixing managed foundation models with your own cost-optimized or domain-specific models without rewriting your agent framework to do it.
- AWS states the combination gives cost optimization, data residency, and model flexibility in a single production-ready architecture.
- The post's stated focus is integration mechanics, including how to get token-level observability from SageMaker endpoints, which Strands does not provide by default.
- The architecture connects three model-hosting paths through a single Amazon Bedrock AgentCore container.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
AWS has published a reference build that runs three specialised agents through a single Amazon Bedrock AgentCore container, two of them on Bedrock-hosted Claude models and one on a Qwen 3.5 9B endpoint the operator hosts on Amazon SageMaker AI [1][6][7][8][9]. The orchestration side of that split costs nothing extra to arrange; the cost accounting side is where the engineering lands [5][18].
The topology is deliberately mundane. An orchestrator on Claude Haiku 4.5 classifies intent and routes through Global cross-Region inference [7]. A budget agent on Claude Sonnet 4.6 produces 50/30/20 breakdowns with structured Pydantic output [8]. A financial analysis agent on Qwen 3.5 9B does stock analysis and portfolio construction with tool-calling, reached over a SageMaker real-time endpoint using the OpenAI-compatible API [9][11]. Routing is the Strands Agents agents-as-tools pattern, with fresh agent instances per invocation, and results return through the orchestrator [10][14]. Qwen runs on the vLLM deep learning container image vllm:0.22.1-gpu-py312-cu130 on an ml.g6e.2xlarge [12]. Deployment of the whole workflow goes through the bedrock-agentcore-starter-toolkit [15].
AWS frames the premise as mixing managed foundation models with your own cost-optimised or domain-specific models without rewriting the agent framework, and claims cost optimisation, data residency and model flexibility from one architecture [2][3]. On the evidence of the walkthrough, the framework claim holds: the same agents-as-tools code path fronts both providers [10]. What does not come free is everything around the model call.
Two seams show up. The first is authentication: the SageMaker OpenAI-compatible API expects a bearer token, tokens expire, and any long-running session therefore needs a refresh on every request, which the post handles with an httpx.Auth subclass [13]. The second is the one operators should care about more. AgentCore runtime instruments agents with OpenTelemetry automatically, but that instrumentation does not extend equally across providers [16]. Bedrock calls get full generative AI spans with token counts and no extra work [17]. SageMaker OpenAI-compatible endpoints reached through the Strands OpenAIModel class get no automatic token telemetry, because the instrumentation does not recognise them as generative AI calls at all [18]. Tokens burned by the Qwen agent are, in AWS's own word, invisible [19].
So in a three-agent system, two agents are metered for you and one is not [23]. That is a third of your model traffic, and specifically the third you moved off managed hosting to control cost, sitting outside your cost and latency dashboards until you write the spans yourself [23]. The provider-specific code in this build is not orchestration logic; it is auth refresh and telemetry [24].
Worth watching: whether the Strands OpenAIModel path gets recognised as a generative AI call by default instrumentation, which would remove the only structural reason this pattern needs custom observability code [18]. Also check Region availability before copying the stack, since Bedrock model access varies by Region and the build needs Haiku 4.5 and Sonnet 4.6 enabled, plus an IAM role carrying sagemaker:InvokeEndpoint and sagemaker:CallWithBearerToken [20][21]. Full source is in the accompanying GitHub repository [22].
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
AWS published a post on its machine learning blog, "Building agentic workflows with SageMaker AI and Bedrock AgentCore", showing how to combine OpenAI-compatible endpoints on Amazon SageMaker AI with Amazon Bedrock AgentCore runtime and its managed deployment.
- [2]
The post frames the common challenge as mixing managed foundation models with your own cost-optimized or domain-specific models without rewriting your agent framework to do it.
- [3]
AWS states the combination gives cost optimization, data residency, and model flexibility in a single production-ready architecture.
- [5]
The post's stated focus is integration mechanics, including how to get token-level observability from SageMaker endpoints, which Strands does not provide by default.
- [6]
The architecture connects three model-hosting paths through a single Amazon Bedrock AgentCore container.
ReportedView cited source - [7]
The orchestrator agent runs Claude Haiku 4.5 on Amazon Bedrock, classifies user intent and routes tasks through Global cross-Region inference.
ReportedView cited source
Sources & coverage · 1 publisher
The reporting this story was synthesized from, earliest first. Every link goes to the original.
- aws.amazon.comAyush SharmaAug 14Building agentic workflows with SageMaker AI and Bedrock AgentCore
Additional citations
- AWS Machine Learning Blog
- AWS

