Summary
Anthropic publishes a dedicated TypeScript SDK for Claude on Google Vertex AI: @anthropic-ai/vertex-sdk. It provides the same messages.create() API as @anthropic-ai/sdk but authenticates via Google Cloud credentials and routes through Vertex AI. This repository's auto-instrumentation exclusively targets @anthropic-ai/sdk module file paths; @anthropic-ai/vertex-sdk ships under a different npm package with different module paths and is not patched by any existing instrumentation config. Users who access Claude on Vertex AI via this SDK get no Braintrust spans.
What instrumentation is missing
The @anthropic-ai/vertex-sdk package exposes the same execution surface as @anthropic-ai/sdk:
| SDK Method |
Description |
client.messages.create({ model, messages, ... }) |
Chat completions via Vertex AI |
client.messages.stream(...) |
Streaming messages helper |
client.beta.messages.create(...) |
Extended-thinking and other beta APIs |
Users instantiate it as:
import { AnthropicVertex } from "@anthropic-ai/vertex-sdk";
const client = new AnthropicVertex({ projectId: "MY_PROJECT_ID", region: "global" });
const result = await client.messages.create({
model: "claude-opus-4-6",
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, etc.). The @anthropic-ai/vertex-sdk package has different internal module paths and is a separate npm package. None of the existing configs match @anthropic-ai/vertex-sdk, so load-time or build-time AST patching does not apply to it.
No coverage in any instrumentation layer:
- No entry in
js/src/auto-instrumentations/configs/anthropic.ts for @anthropic-ai/vertex-sdk
- No module path targeting for
@anthropic-ai/vertex-sdk in any instrumentation config
- No e2e test scenarios for Vertex SDK
- Grep for
vertex-sdk, AnthropicVertex, or @anthropic-ai/vertex across the entire repo returns zero matches
Analogous gap already tracked:
Issue #2047 covers @anthropic-ai/bedrock-sdk (Claude on AWS Bedrock), which has the identical structure — same messages.create() API, different npm package, different module paths. The Vertex SDK gap is the same pattern applied to Google Cloud.
Braintrust docs status
unclear — The Braintrust docs at https://www.braintrust.dev/docs/integrations/ai-providers/anthropic reference @anthropic-ai/sdk and do not mention @anthropic-ai/vertex-sdk or AnthropicVertex. The official Anthropic docs at https://platform.claude.com/docs/en/api/claude-on-vertex-ai show @anthropic-ai/vertex-sdk as the official TypeScript SDK for Claude on Vertex AI.
Upstream references
Local files inspected
js/src/auto-instrumentations/configs/anthropic.ts — targets @anthropic-ai/sdk only, no entry for @anthropic-ai/vertex-sdk
js/src/auto-instrumentations/configs/all.ts — @anthropic-ai/vertex-sdk not listed among any instrumentation groups
- Full repo grep for
vertex-sdk, AnthropicVertex, @anthropic-ai/vertex — zero matches
e2e/scenarios/ — no Vertex SDK test scenarios
Summary
Anthropic publishes a dedicated TypeScript SDK for Claude on Google Vertex AI:
@anthropic-ai/vertex-sdk. It provides the samemessages.create()API as@anthropic-ai/sdkbut authenticates via Google Cloud credentials and routes through Vertex AI. This repository's auto-instrumentation exclusively targets@anthropic-ai/sdkmodule file paths;@anthropic-ai/vertex-sdkships under a different npm package with different module paths and is not patched by any existing instrumentation config. Users who access Claude on Vertex AI via this SDK get no Braintrust spans.What instrumentation is missing
The
@anthropic-ai/vertex-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, etc.). The@anthropic-ai/vertex-sdkpackage has different internal module paths and is a separate npm package. None of the existing configs match@anthropic-ai/vertex-sdk, so load-time or build-time AST patching does not apply to it.No coverage in any instrumentation layer:
js/src/auto-instrumentations/configs/anthropic.tsfor@anthropic-ai/vertex-sdk@anthropic-ai/vertex-sdkin any instrumentation configvertex-sdk,AnthropicVertex, or@anthropic-ai/vertexacross the entire repo returns zero matchesAnalogous gap already tracked:
Issue #2047 covers
@anthropic-ai/bedrock-sdk(Claude on AWS Bedrock), which has the identical structure — samemessages.create()API, different npm package, different module paths. The Vertex SDK gap is the same pattern applied to Google Cloud.Braintrust docs status
unclear— The Braintrust docs at https://www.braintrust.dev/docs/integrations/ai-providers/anthropic reference@anthropic-ai/sdkand do not mention@anthropic-ai/vertex-sdkorAnthropicVertex. The official Anthropic docs at https://platform.claude.com/docs/en/api/claude-on-vertex-ai show@anthropic-ai/vertex-sdkas the official TypeScript SDK for Claude on Vertex AI.Upstream references
npm install @anthropic-ai/vertex-sdkLocal files inspected
js/src/auto-instrumentations/configs/anthropic.ts— targets@anthropic-ai/sdkonly, no entry for@anthropic-ai/vertex-sdkjs/src/auto-instrumentations/configs/all.ts—@anthropic-ai/vertex-sdknot listed among any instrumentation groupsvertex-sdk,AnthropicVertex,@anthropic-ai/vertex— zero matchese2e/scenarios/— no Vertex SDK test scenarios