Summary
Anthropic publishes a dedicated TypeScript SDK for Claude on AWS Bedrock: @anthropic-ai/bedrock-sdk. It provides the same messages.create() API as @anthropic-ai/sdk but authenticates via AWS credentials and routes through the Bedrock runtime. This repository's auto-instrumentation exclusively targets @anthropic-ai/sdk module file paths; @anthropic-ai/bedrock-sdk ships under a different module path and is not patched by any existing instrumentation config. Users who use Claude on Bedrock via this SDK get no Braintrust spans from auto-instrumentation.
What instrumentation is missing
The @anthropic-ai/bedrock-sdk package exposes the same execution surface as @anthropic-ai/sdk:
| SDK Method |
Description |
client.messages.create({ model, messages, ... }) |
Synchronous and streaming chat completions via Bedrock |
client.messages.stream(...) |
Streaming messages helper |
client.beta.messages.create(...) |
Extended-thinking and other beta APIs |
Users instantiate it as:
import AnthropicBedrock from "@anthropic-ai/bedrock-sdk";
const client = new AnthropicBedrock({ awsRegion: "us-west-2" });
const message = await client.messages.create({
model: "global.anthropic.claude-opus-4-6-v1",
max_tokens: 256,
messages: [{ role: "user", content: "Hello" }],
});
Auto-instrumentation gap:
The AST-transformation configs in js/src/auto-instrumentations/configs/anthropic.ts target @anthropic-ai/sdk at specific module file paths (resources/messages.mjs, resources/messages/messages.mjs, etc.). The @anthropic-ai/bedrock-sdk package has different internal module paths and is a separate npm package. None of the existing configs match @anthropic-ai/bedrock-sdk, so load-time or build-time AST patching does not apply to it.
Manual wrapper gap:
wrapAnthropic() duck-types on anthropic.messages.create, so it likely works with AnthropicBedrock instances. However, this is undocumented and untested in the repo, and auto-instrumentation (the zero-config path) is completely absent.
No coverage in the auto-instrumentation layer:
- No entry in
js/src/auto-instrumentations/configs/anthropic.ts for @anthropic-ai/bedrock-sdk
- No module path targeting for
@anthropic-ai/bedrock-sdk in any instrumentation config
- No e2e test scenarios for Bedrock SDK
A grep for bedrock-sdk across the entire repo returns zero matches.
Relationship to existing issue #1741
Issue #1741 covers @aws-sdk/client-bedrock-runtime — the low-level AWS SDK that exposes ConverseCommand and InvokeModelCommand. That is a different package with a different API shape (AWS-specific message format). @anthropic-ai/bedrock-sdk uses Anthropic's native Messages API format over Bedrock and is installed separately via npm install @anthropic-ai/bedrock-sdk.
Braintrust docs status
unclear — The Braintrust docs at https://www.braintrust.dev/docs/integrations/ai-providers/anthropic reference @anthropic-ai/sdk and the wrapAnthropic() wrapper, but do not mention @anthropic-ai/bedrock-sdk. The Anthropic Bedrock guide at https://platform.claude.com/docs/en/api/claude-on-amazon-bedrock shows @anthropic-ai/bedrock-sdk as the official TypeScript SDK for Claude on Bedrock.
Upstream references
Local files inspected
js/src/auto-instrumentations/configs/anthropic.ts — targets @anthropic-ai/sdk only, no entry for @anthropic-ai/bedrock-sdk
js/src/instrumentation/plugins/anthropic-channels.ts — channels defined for @anthropic-ai/sdk APIs
js/src/instrumentation/plugins/anthropic-plugin.ts — plugin handles @anthropic-ai/sdk events only
js/src/wrappers/anthropic.ts — wrapAnthropic() duck-types on messages.create; likely works with Bedrock client but untested and undocumented
js/src/vendor-sdk-types/anthropic.ts — no AnthropicBedrock type definitions
- Full repo grep for
bedrock-sdk — zero matches
Summary
Anthropic publishes a dedicated TypeScript SDK for Claude on AWS Bedrock:
@anthropic-ai/bedrock-sdk. It provides the samemessages.create()API as@anthropic-ai/sdkbut authenticates via AWS credentials and routes through the Bedrock runtime. This repository's auto-instrumentation exclusively targets@anthropic-ai/sdkmodule file paths;@anthropic-ai/bedrock-sdkships under a different module path and is not patched by any existing instrumentation config. Users who use Claude on Bedrock via this SDK get no Braintrust spans from auto-instrumentation.What instrumentation is missing
The
@anthropic-ai/bedrock-sdkpackage exposes the same execution surface as@anthropic-ai/sdk:client.messages.create({ model, messages, ... })client.messages.stream(...)client.beta.messages.create(...)Users instantiate it as:
Auto-instrumentation gap:
The AST-transformation configs in
js/src/auto-instrumentations/configs/anthropic.tstarget@anthropic-ai/sdkat specific module file paths (resources/messages.mjs,resources/messages/messages.mjs, etc.). The@anthropic-ai/bedrock-sdkpackage has different internal module paths and is a separate npm package. None of the existing configs match@anthropic-ai/bedrock-sdk, so load-time or build-time AST patching does not apply to it.Manual wrapper gap:
wrapAnthropic()duck-types onanthropic.messages.create, so it likely works withAnthropicBedrockinstances. However, this is undocumented and untested in the repo, and auto-instrumentation (the zero-config path) is completely absent.No coverage in the auto-instrumentation layer:
js/src/auto-instrumentations/configs/anthropic.tsfor@anthropic-ai/bedrock-sdk@anthropic-ai/bedrock-sdkin any instrumentation configA grep for
bedrock-sdkacross the entire repo returns zero matches.Relationship to existing issue #1741
Issue #1741 covers
@aws-sdk/client-bedrock-runtime— the low-level AWS SDK that exposesConverseCommandandInvokeModelCommand. That is a different package with a different API shape (AWS-specific message format).@anthropic-ai/bedrock-sdkuses Anthropic's native Messages API format over Bedrock and is installed separately vianpm install @anthropic-ai/bedrock-sdk.Braintrust docs status
unclear— The Braintrust docs at https://www.braintrust.dev/docs/integrations/ai-providers/anthropic reference@anthropic-ai/sdkand thewrapAnthropic()wrapper, but do not mention@anthropic-ai/bedrock-sdk. The Anthropic Bedrock guide at https://platform.claude.com/docs/en/api/claude-on-amazon-bedrock shows@anthropic-ai/bedrock-sdkas the official TypeScript SDK for Claude on Bedrock.Upstream references
@anthropic-ai/bedrock-sdkinstall:npm install @anthropic-ai/bedrock-sdkLocal files inspected
js/src/auto-instrumentations/configs/anthropic.ts— targets@anthropic-ai/sdkonly, no entry for@anthropic-ai/bedrock-sdkjs/src/instrumentation/plugins/anthropic-channels.ts— channels defined for@anthropic-ai/sdkAPIsjs/src/instrumentation/plugins/anthropic-plugin.ts— plugin handles@anthropic-ai/sdkevents onlyjs/src/wrappers/anthropic.ts—wrapAnthropic()duck-types onmessages.create; likely works with Bedrock client but untested and undocumentedjs/src/vendor-sdk-types/anthropic.ts— noAnthropicBedrocktype definitionsbedrock-sdk— zero matches