Skip to content

Backport: feat (provider/anthropic): add support for inference_geo provider option#14344

Merged
vercel-ai-sdk[bot] merged 1 commit intorelease-v6.0from
backport-pr-14339-to-release-v6.0
Apr 11, 2026
Merged

Backport: feat (provider/anthropic): add support for inference_geo provider option#14344
vercel-ai-sdk[bot] merged 1 commit intorelease-v6.0from
backport-pr-14339-to-release-v6.0

Conversation

@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

@vercel-ai-sdk vercel-ai-sdk bot commented Apr 11, 2026

This is an automated backport of #14339 to the release-v6.0 branch. FYI @shaper

…ion (#14339)

## Background

Anthropic supports data residency controls through an `inference_geo`
parameter that allows developers to specify where model inference should
run for compliance and data governance requirements. See
https://platform.claude.com/docs/en/build-with-claude/data-residency

## Changes

Added support for the `inferenceGeo` provider option to the Anthropic
provider, allowing users to control where model inference runs by
specifying either `'us'` (US-only infrastructure) or `'global'` (any
available geography, default).

The implementation includes:

- New `inferenceGeo` option in `AnthropicLanguageModelOptions` with
proper validation
- Request body mapping to Anthropic's `inference_geo` parameter
- Documentation with usage examples
- Test coverage for the new functionality
- Example implementation demonstrating the feature

## Manual Verification

Tested the feature by running the provided example with `inferenceGeo:
'us'` and verified that the parameter is correctly passed to Anthropic's
API in the request body as `inference_geo`.

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [x] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)
@vercel-ai-sdk vercel-ai-sdk bot enabled auto-merge (squash) April 11, 2026 00:17
@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label documentation Improvements or additions to documentation feature New feature or request provider/anthropic Issues related to the @ai-sdk/anthropic provider labels Apr 11, 2026
@shaper shaper added the backport Admins only: add this label to a pull request in order to backport it to the prior version label Apr 11, 2026
@vercel-ai-sdk vercel-ai-sdk bot merged commit 61f1a61 into release-v6.0 Apr 11, 2026
28 checks passed
@vercel-ai-sdk vercel-ai-sdk bot deleted the backport-pr-14339-to-release-v6.0 branch April 11, 2026 00:24
vercel-ai-sdk bot added a commit that referenced this pull request Apr 11, 2026
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor Author

vercel-ai-sdk bot commented Apr 11, 2026

⚠️ Backport to release-v5.0 created but has conflicts: #14345

@vercel-ai-sdk vercel-ai-sdk bot removed the backport Admins only: add this label to a pull request in order to backport it to the prior version label Apr 11, 2026
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor Author

vercel-ai-sdk bot commented Apr 11, 2026

🚀 Published in:

Package Version
@ai-sdk/amazon-bedrock 4.0.93
@ai-sdk/anthropic 3.0.69
@ai-sdk/google-vertex 4.0.107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label documentation Improvements or additions to documentation feature New feature or request provider/anthropic Issues related to the @ai-sdk/anthropic provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant