{"version":"2.1.284","anchor":"anthropic-foundry-resource-is-validated-before-building-the","canonical_anchor":"anthropic-foundry-resource-is-validated-before-building-the","heading":"ANTHROPIC_FOUNDRY_RESOURCE must be a plain Foundry resource name","tier":"notice","area":"Cloud Providers","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284\/e\/anthropic-foundry-resource-is-validated-before-building-the","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284","markdown":"### `ANTHROPIC_FOUNDRY_RESOURCE` must be a plain Foundry resource name\n\n`ANTHROPIC_FOUNDRY_RESOURCE` is now checked as a 2-64 character resource name and rejected with a clear error if it is a URL or host name\n\n**What**\n\n`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.\n\n- 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`.\n\n- Before, the value was dropped straight into `https:\/\/<resource>.services.ai.azure.com`. Now that address is built only from a valid name.\n\n- 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.\n\n- A valid name is passed to the Foundry client explicitly as `resource`.\n\n- The runner's inference configuration rejects bad names with the same message.\n\n**Why**\n\nIf 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.\n\n- Area: Cloud Providers\n- Names: `ANTHROPIC_FOUNDRY_RESOURCE`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}