On the morning of December 2 I read one line in the Platform release notes: Claude Managed Agents was now in beta on Amazon Bedrock. If billing could live in AWS, maybe the review-reply drafting I run for my own apps as an indie developer could move there too. So I started estimating the port.
I went in assuming "via Bedrock" was a single route. Swap the model ID, swap the client class, done. Rereading the docs, I found that Claude now has two doors on the Bedrock side, and the request looks quite different depending on which one you walk through.
Would my tool definitions survive untouched, or would I have to reshape the request body? Rather than argue with myself over the docs, I stood up a local mock server and recorded what the SDK sends on all three routes.
Bedrock has two entry points
Anthropic documents Claude on Bedrock on two separate pages.
| Route | Endpoint | Models | Python SDK client |
|---|---|---|---|
| bedrock-mantle | bedrock-mantle.{region}.api.aws/anthropic/v1/messages | Opus 4.7 and later (Opus 5.5, Sonnet 5.5, Sonnet 5, Haiku 5.5, and others) | AnthropicBedrockMantle |
| bedrock-runtime | InvokeModel / InvokeModelWithResponseStream / Converse | Opus 4.6 and earlier, plus Fable 5.2 and Mythos 5.2 | AnthropicBedrock |
Model IDs on mantle carry an anthropic. prefix, as in anthropic.claude-sonnet-5-5. Fable 5.2 and Mythos 5.2 are not on mantle at all; they are served only on runtime. In practice, the model you want picks the door for you.
Recording the three routes against a mock server
Nothing here reaches real AWS. A local HTTP server records the path, headers and body the SDK sends. The SDK is anthropic[bedrock] 2.16.0. I call each route with the same tool definition and the same tool_choice, and the mock returns the same tool_use block every time.
# capture_routes.py — record what each of the three routes sends (nothing goes to AWS)
import json, os, threading, http.server
import anthropic
CAPTURED = []
class Recorder(http.server.BaseHTTPRequestHandler):
def do_POST(self):
size = int(self.headers.get("content-length", 0))
body = json.loads(self.rfile.read(size))
CAPTURED.append((self.path, {k.lower(): v for k, v in self.headers.items()}, body))
reply = {
"id": "msg_local", "type": "message", "role": "assistant", "model": "local",
"content": [{"type": "tool_use", "id": "toolu_1", "name": "get_weather",
"input": {"city": "Takamatsu"}}],
"stop_reason": "tool_use", "stop_sequence": None,
"usage": {"input_tokens": 10, "output_tokens": 5},
}
data = json.dumps(reply).encode()
self.send_response(200)
self.send_header("content-type", "application/json")
self.send_header("content-length", str(len(data)))
self.end_headers()
self.wfile.write(data)
def log_message(self, *args):
pass
server = http.server.HTTPServer(("127.0.0.1", 0), Recorder)
base = f"http://127.0.0.1:{server.server_port}"
threading.Thread(target=server.serve_forever, daemon=True).start()
TOOLS = [{
"name": "get_weather",
"description": "Return weather for a city",
"input_schema": {"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]},
}]
ARGS = dict(max_tokens=512, tools=TOOLS, tool_choice={"type": "auto"},
messages=[{"role": "user", "content": "What is the weather in Takamatsu?"}])
AWS = dict(aws_access_key="AKIATEST", aws_secret_key="dummy", aws_region="us-east-1", max_retries=0)
RUNTIME_MODEL = os.environ.get("BEDROCK_RUNTIME_MODEL_ID", "runtime-model-id")
routes = [
("direct", anthropic.Anthropic(api_key="YOUR_API_KEY", base_url=base, max_retries=0),
"claude-sonnet-5-5"),
("mantle", anthropic.AnthropicBedrockMantle(base_url=base + "/anthropic", **AWS),
"anthropic.claude-sonnet-5-5"),
("runtime", anthropic.AnthropicBedrock(base_url=base, **AWS), RUNTIME_MODEL),
]
for name, client, model in routes:
result = client.messages.create(model=model, **ARGS)
path, headers, body = CAPTURED[-1]
auth = headers.get("authorization", "-").split(" ")[0]
print(f"{name:8} {path}")
print(f" auth={auth} anthropic-version header={headers.get('anthropic-version', '-')}")
print(f" body keys={sorted(body)} tools unchanged={body['tools'] == TOOLS}")
print(f" first block={result.content[0].type}")This is the output I got (the runtime model ID is masked):
direct /v1/messages
auth=Bearer anthropic-version header=2026-10-21
body keys=['max_tokens', 'messages', 'model', 'tool_choice', 'tools'] tools unchanged=True
first block=tool_use
mantle /anthropic/v1/messages
auth=AWS4-HMAC-SHA256 anthropic-version header=2026-10-21
body keys=['max_tokens', 'messages', 'model', 'tool_choice', 'tools'] tools unchanged=True
first block=tool_use
runtime /model/<model-id>/invoke
auth=AWS4-HMAC-SHA256 anthropic-version header=-
body keys=['anthropic_version', 'max_tokens', 'messages', 'tool_choice', 'tools'] tools unchanged=True
first block=tool_useThe mantle body was identical to the first-party one. The only differences were SigV4 signing and the /anthropic prefix on the path. On runtime, model disappears from the body and moves into the URL path, while anthropic_version appears in the body instead. No anthropic-version header is sent at all.
The tool definitions themselves did not change by a single byte on any route. The tool_use / tool_result exchange comes back in the same shape, so the code that handles tools can stay as it is.
Two things that trip people up on runtime
The first is the value of anthropic_version. Every example on the AWS tool-use page uses "bedrock-2023-05-31", but SDK 2.16.0 fills the field with its own API version constant (2026-10-21 in my run) via setdefault. A body you hand-build with boto3 and the body the SDK sends disagree in exactly this one place. If you want them aligned before testing in production, pass extra_body={"anthropic_version": "bedrock-2023-05-31"}; the SDK keeps your value, and I confirmed bedrock-2023-05-31 is what gets recorded.
The second is how beta features travel. On the first-party API they go in the anthropic-beta header. On runtime, the SDK copies that header value into an anthropic_beta array in the body.
# On runtime the beta flag moves into an array in the body
client.beta.messages.create(
model=RUNTIME_MODEL,
betas=["context-management-2025-06-27"],
**ARGS,
)
# Recorded body: {"anthropic_beta": ["context-management-2025-06-27"], "anthropic_version": ..., ...}If your logging counts beta usage from headers, runtime calls will quietly drop out of those numbers. My own tally reads headers too, so I plan to make it read the body as well before moving anything.
Same body shape does not mean same features
Even on mantle, where the body matches, the feature set is not the first-party one. Here are the documented gaps that touch tool use:
| Feature | mantle | runtime (InvokeModel) |
|---|---|---|
| Client-side tools (your own tools, Bash, Computer use, etc.) | Available | Available |
| Web search server tool | Not available | Not available |
| Code execution and web fetch server tools | Not available | Not stated in the docs |
| MCP connector, programmatic tool calling | Not available | Not stated in the docs |
| Message Batches | Not available | SDK raises before sending |
On runtime, the SDK raised AnthropicError without sending anything when I called count_tokens or Batches ("Token counting is not supported in Bedrock yet"). The mantle client, by contrast, sent count_tokens straight to /anthropic/v1/messages/count_tokens, and the docs do not say whether that works. I would not rely on it until you have tried it once against the real thing.
URL sources for images and PDFs, and the Files API, are also unavailable on mantle. Request size limits differ by route as well; I wrote that up in The Messages API Limit Is Now 128MB, but Bedrock Still Stops at 20MB.
A per-route deny list before you send
A route-specific refusal before sending is easier to read than a 400 afterwards. I now pass every request through this function right after building it.
# route_guard.py — catch route-specific unsupported options before sending
UNSUPPORTED = {
"mantle": {
"server_tool_prefixes": ("web_search_", "web_fetch_", "code_execution_", "advisor"),
"body_keys": ("mcp_servers",),
"url_sources": True,
},
"runtime": {
"server_tool_prefixes": ("web_search_",),
"body_keys": (),
"url_sources": False, # not confirmed in the docs, so do not block
},
}
def find_route_problems(route, body):
rule = UNSUPPORTED.get(route)
if rule is None:
return []
problems = []
for tool in body.get("tools", []):
kind = tool.get("type", "")
if kind.startswith(rule["server_tool_prefixes"]):
problems.append(f"server tool {kind} is not available on {route}")
for key in rule["body_keys"]:
if key in body:
problems.append(f"{key} is not available on {route}")
if rule["url_sources"]:
for message in body.get("messages", []):
content = message.get("content")
if not isinstance(content, list):
continue
for block in content:
source = block.get("source", {}) if isinstance(block, dict) else {}
if source.get("type") == "url":
problems.append(f"URL source in {block.get('type')} is not available on {route}")
return problems
if __name__ == "__main__":
body = {
"tools": [{"type": "web_search_20250305", "name": "web_search"},
{"name": "get_weather", "input_schema": {"type": "object"}}],
"messages": [{"role": "user", "content": [
{"type": "image", "source": {"type": "url", "url": "https://example.com/a.png"}}]}],
}
for route in ("direct", "mantle", "runtime"):
print(route, find_route_problems(route, body))Running it, direct returns nothing, mantle returns two problems (web search and the URL image), and runtime returns one (web search). Anything I could not confirm in the docs falls on the side of not blocking. Adding unconfirmed rules would stop calls that might well succeed.
Write down only the differences you have confirmed, and confirm the rest with one real call. That is the line I keep when estimating a port.
Next step
If you have tool-use code running on the first-party API today, swap your own TOOLS and ARGS into the recording script above and check whether the mantle and direct bodies come out identical. For work built only on your own client-side tools, like my review-reply drafts, my reading of these captures is that mantle needs no rewrite. If you are partway through moving to SDK 2.x, three things that break when upgrading the Python SDK to 2.0.0 may also help.