Skip to content

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

Merged
shaper merged 1 commit intomainfrom
04-10-feat_provider_anthropic_add_support_for_inference_geo_provider_option
Apr 11, 2026
Merged

feat (provider/anthropic): add support for inference_geo provider option#14339
shaper merged 1 commit intomainfrom
04-10-feat_provider_anthropic_add_support_for_inference_geo_provider_option

Conversation

@shaper
Copy link
Copy Markdown
Collaborator

@shaper shaper commented Apr 10, 2026

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

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label feature New feature or request provider/anthropic Issues related to the @ai-sdk/anthropic provider labels Apr 10, 2026
Copy link
Copy Markdown
Collaborator Author

shaper commented Apr 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@shaper shaper requested review from R-Taneja and felixarntz April 10, 2026 22:35
@shaper shaper marked this pull request as ready for review April 10, 2026 22:36
@gr2m gr2m added the backport Admins only: add this label to a pull request in order to backport it to the prior version label Apr 10, 2026
@shaper shaper merged commit 09bd27b into main Apr 11, 2026
35 checks passed
@shaper shaper deleted the 04-10-feat_provider_anthropic_add_support_for_inference_geo_provider_option branch April 11, 2026 00:16
vercel-ai-sdk bot pushed a commit that referenced this pull request Apr 11, 2026
…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 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

vercel-ai-sdk bot commented Apr 11, 2026

✅ Backport PR created: #14344

vercel-ai-sdk bot added a commit that referenced this pull request Apr 11, 2026
…ovider option (#14344)

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

Co-authored-by: Walter Korman <shaper@vercel.com>
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Apr 11, 2026

🚀 Published in:

Package Version
ai 7.0.0-beta.83
@ai-sdk/amazon-bedrock 5.0.0-beta.29
@ai-sdk/angular 3.0.0-beta.83
@ai-sdk/anthropic 4.0.0-beta.25
@ai-sdk/gateway 4.0.0-beta.46
@ai-sdk/google-vertex 5.0.0-beta.43
@ai-sdk/langchain 3.0.0-beta.83
@ai-sdk/llamaindex 3.0.0-beta.83
@ai-sdk/otel 1.0.0-beta.29
@ai-sdk/react 4.0.0-beta.83
@ai-sdk/rsc 3.0.0-beta.84
@ai-sdk/svelte 5.0.0-beta.83
@ai-sdk/vue 4.0.0-beta.83

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 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.

2 participants