What's Changed
Features
Bedrock Service Tier Support — PR#1799
Amazon Bedrock now offers service tiers (Priority, Standard, Flex) that let you control the trade-off between latency and cost on a per-request basis. BedrockModel accepts a new service_tier configuration field, consistent with how other Bedrock-specific features like guardrails are exposed. When not set, the field is omitted and Bedrock uses its default behavior.
from strands import Agent
from strands.models.bedrock import BedrockModel
# Use "flex" tier for cost-optimized batch processing
model = BedrockModel(
model_id="us.anthropic.claude-sonnet-4-20250514-v1:0",
service_tier="flex",
)
agent = Agent(model=model)
# Use "priority" for latency-sensitive applications
realtime_model = BedrockModel(
model_id="us.anthropic.claude-sonnet-4-20250514-v1:0",
service_tier="priority",
)Valid values are "default", "priority", and "flex". If a model or region does not support the specified tier, Bedrock returns a ValidationException.
Bug Fixes
-
Sliding window conversation manager user-first enforcement — PR#2087: The sliding window could produce a trimmed conversation starting with an assistant message, causing
ValidationExceptionon providers that require user-first ordering (including Bedrock Nova). The trim-point validation now ensures the first remaining message always hasrole == "user". Also fixed a short-circuit logic bug in thetoolUseguard that let orphaned tool-use blocks slip through at window boundaries. -
MCP
_metaforwarding — PR#1918, PR#2081: Custom metadata per the MCP spec was silently dropped becauseMCPClientnever forwarded the_metafield toClientSession.call_tool(). Additionally, the OTEL instrumentation usedmodel_dump()instead ofmodel_dump(by_alias=True), serializing the field as"meta"instead of"_meta"and corrupting the payload. Both the directcall_tooland task-augmented execution paths now correctly forwardmeta. -
Tool exception propagation to OpenTelemetry spans — PR#2046: When a tool raised an exception, the original exception was dropped before reaching
end_tool_call_span, causing all tool spans to getStatusCode.OKeven on errors. Tool errors now correctly propagate withStatusCode.ERROR, preserving the original exception type and traceback for observability backends like Langfuse. -
Anthropic premature stream termination — PR#2047: The Anthropic provider crashed with
AttributeErrorwhen the stream terminated before the finalmessage_stopevent, because it accessedevent.message.usageon event types that lack a.messageattribute. Now uses the Anthropic SDK'sstream.get_final_message()to read accumulated usage from all received events, gracefully handling premature termination and empty streams. -
Anthropic Pydantic deprecation warnings — PR#2044: Fixed
message_stopevent handling to avoid Pydantic deprecation warnings.
New Contributors
- @mananpatel320 made their first contribution in #1918
- @opieter-aws made their first contribution in #2044
- @mattdai01 made their first contribution in #2046
- @KKamJi98 made their first contribution in #1906
- @gautamsirdeshmukh made their first contribution in #2047
Full Changelog: v1.34.1...v1.35.0