You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
Cloud ProvidersArea: what it touches
ImprovementsKind: in v2.1.284,
ImprovementsSection of the release
What
ANTHROPIC_FOUNDRY_RESOURCE is the environment variable that tells Claude Code which Microsoft Foundry resource to use when ANTHROPIC_FOUNDRY_BASE_URL is not set. An environment variable is a setting passed to a program from your shell.
The value must now be 2 to 64 letters, digits or hyphens, and it cannot start or end with a hyphen, for example my-resource.
Before, the value was dropped straight into https://<resource>.services.ai.azure.com. Now that address is built only from a valid name.
A value that is a URL or a host name now fails with an error that says to set ANTHROPIC_FOUNDRY_BASE_URL instead if you want to use a full URL.
A valid name is passed to the Foundry client explicitly as resource.
The runner's inference configuration rejects bad names with the same message.
Why
If you had put a full address in ANTHROPIC_FOUNDRY_RESOURCE, Claude Code now tells you plainly what is wrong instead of failing later with a confusing connection error. A malformed value can also no longer turn into a request to an unexpected host.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up ANTHROPIC_FOUNDRY_RESOURCE, on All settings.* `"customEndpoint"`: the Anthropic API or a cloud provider's API sent to another host, such as an [LLM gateway](/docs/en/llm-gateway) named by `ANTHROPIC_BASE_URL`, a provider's `ANTHROPIC_*_BASE_URL` variable, or an `ANTHROPIC_FOUNDRY_RE…settings-referencesee the edit
Added sinceA small documentation edit on go touched a line naming ANTHROPIC_FOUNDRY_RESOURCE after this was published.* **Foundry:** `import "github.com/anthropics/anthropic-sdk-go/foundry"`. Use `foundry.NewClient(cfg)` with a `foundry.ClientConfig` value to construct a client; set `APIKey` (or `AzureADTokenProvider` for Microsoft Entra ID) and `Resource…cli-sdks-libraries/sdks/gosee the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesA small documentation edit on go touched a line naming ANTHROPIC_FOUNDRY_RESOURCE after this was published.
Anthropic's release notes agreeFixed ANTHROPIC_FOUNDRY_RESOURCE being interpolated into the Foundry endpoint host unvalidated; a value that is not a plain resource name is…