feat (provider/anthropic-aws): new @ai-sdk/anthropic-aws provider (v1.0.0)#15533
Merged
Conversation
….0.0)
New @ai-sdk/anthropic-aws package exposing createAnthropicAws for Claude
Platform on AWS — Anthropic's Messages API hosted in AWS at
aws-external-anthropic.{region}.api.aws.
Same wire format and feature set as @ai-sdk/anthropic (model IDs,
streaming, prompt caching, tool use, computer use, anthropic-beta
headers) with AWS SigV4 or AWS-provisioned API key authentication.
Reads AWS_REGION, ANTHROPIC_AWS_WORKSPACE_ID, and ANTHROPIC_AWS_API_KEY
from the environment by default.
Tests: 48 passing (25 fetch + 23 provider).
Build: clean cjs + esm + dts.
Backport of #15230. Files API and Skills API are intentionally
omitted from this v6 release — those AnthropicFiles / AnthropicSkills
classes do not exist on this branch. The v7 (main) variant of this
package exposes them.
R-Taneja
added a commit
that referenced
this pull request
May 21, 2026
…r v2.0.0 Sets up the v7/main canary publish for @ai-sdk/anthropic-aws@2.0.0, following the pattern from #15461 (quiverai): - .changeset/pre.json: register @ai-sdk/anthropic-aws@1.0.0 as the initial version (matches what the sibling v6 PR publishes once it merges; see #15533). - .changeset/anthropic-aws-platform.md: changeset bump set to major, which combined with the 1.0.0 initial version will publish 2.0.0 on the canary tag. Sequence (per team direction): 1. v6 backport (#15533) merges → @ai-sdk/anthropic-aws@1.0.0 ships stable 2. This PR merges → @ai-sdk/anthropic-aws@2.0.0-canary.X ships
Bring v6 in line with two tweaks made on the main PR (#15230): - 07-anthropic-aws.mdx: add 'Agent Skills' to the two feature lists (intro and Models section). Agent Skills usage works on v6 too via beta headers + container.skills request param, even though the provider.skills() helper is v7-only. - anthropic-aws-fetch.ts: drop three inline comments (the two 'avoid caching globalThis.fetch' notes and the 'Use the combined headers directly as HeadersInit' note). Code behavior unchanged. 48/48 tests still pass.
v6's TypeScript lib config doesn't expose Symbol.asyncIterator on ReadableStream, so the for-await loop didn't typecheck. Switch to the explicit reader.read() loop — same semantics, no asyncIterator requirement. 48/48 tests still pass.
gr2m
approved these changes
May 21, 2026
Mirrors the same example from the main PR (#15230). Demonstrates Anthropic's hosted web search tool routed through Claude Platform on AWS — anthropicAws.tools.webSearch_20250305() — to validate that the 'all tool use capabilities are available' claim from the Anthropic doc holds for server-executed tools, not just user-defined ones. Note: web search may need to be enabled on your workspace; if so, ask your Anthropic rep.
…ersion Matches the smoke-tested version on main. Both webSearch_20250305 and webSearch_20260209 are exported from v6's anthropic-tools, so this is a drop-in.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New
@ai-sdk/anthropic-awspackage for Claude Platform on AWS — Anthropic's Messages API hosted inside AWS ataws-external-anthropic.{region}.api.aws. Same wire format and feature set as@ai-sdk/anthropicwith AWS-native auth (SigV4 or AWS-provisioned API key) and AWS Marketplace billing.This is the v6 (LanguageModelV3) backport of the corresponding main-branch PR (#15230), to be released as v1.0.0 stable. Per the team's release plan in #15459's pattern (which mirrors what
@ai-sdk/quiveraidid via PRs #15463 / #15461):@ai-sdk/anthropic-aws@1.0.0pre.jsonupdated to register@ai-sdk/anthropic-aws@1.0.0and its changeset bumped tomajor, which will publish v2.0.0 on the canary tagWhat's in the package
createAnthropicAws()factory + defaultanthropicAwsinstanceregion,workspaceId,apiKey,accessKeyId,secretAccessKey,sessionToken,baseURL,headers,fetch,credentialProvider,generateIdlanguageModel,chat,messages,textEmbeddingModel(deprecated throw),toolshttps://aws-external-anthropic.{region}.api.aws/v1anthropic-version: 2023-06-01+anthropic-workspace-idaws-external-anthropicDifferences from the main (v7) variant
The v7 anthropic package exposes
AnthropicFilesandAnthropicSkillsfrom its/internalentrypoint. v6 does not have those classes. The Files API and Skills API methods (provider.files(),provider.skills()) are intentionally omitted from this v6 release for that reason — users who need them should adopt v7. Everything else is at parity: same auth, same wire format, same surface.Spec version:
LanguageModelV3/ProviderV3(vsV4on main). Otherwise the implementation is identical to main.Test plan
pnpm --filter @ai-sdk/anthropic-aws build— clean cjs + esm + dtspnpm --filter @ai-sdk/anthropic-aws test— 48 / 48 passing (25 fetch helper + 23 provider — main has 50 because of the 2 files/skills tests that don't apply here)anthropic-versionheader bug)Files changed