[BUG] Azure AI Foundry Claude deployment rejected during validation (404 api_not_supported on /models/chat/completions)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Azure AI Foundry Integration Issue with Claude Desktop
Summary
I am encountering an issue when configuring Claude Desktop to use a Claude model deployed through Azure AI Foundry using Microsoft Entra ID authentication.
The Azure deployment itself is healthy and accessible through the official Anthropic Foundry SDK. However, Claude Desktop fails during model validation/probing and never reaches successful inference.
Environment
Claude Desktop: Latest available version
Claude Code: 2.1.170
Authentication Method: Interactive Microsoft Entra ID sign-in
Provider: Azure AI Foundry
Deployment Type: Anthropic Claude model hosted in Azure AI Foundry
Region: [Redacted]
Resource Name: [Redacted]
Deployment Name: [Redacted]
Error Observed
Claude Desktop reports:
Azure AI Foundry rejected model "<deployment-name>" (HTTP 404)
requestUrl:
https://<resource>.services.ai.azure.com/models/chat/completions
responseBody:
{
"error": {
"code": "api_not_supported",
"message": "Requested API is currently not supported",
"details": "Requested API is currently not supported"
}
}
Investigation Performed
- Authentication Verification
Microsoft Entra ID authentication is functioning correctly.
The same account and permissions successfully authenticate against the Azure AI Foundry deployment using the official SDK.
- Deployment Verification
The deployment is healthy and responds successfully when invoked through the Anthropic Foundry SDK.
Example:
from anthropic import AnthropicFoundry
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
token_provider = get_bearer_token_provider(
DefaultAzureCredential(),
"https://ai.azure.com/.default"
)
client = AnthropicFoundry(
base_url="https://<resource>.services.ai.azure.com/anthropic",
azure_ad_token_provider=token_provider,
)
response = client.messages.create(
model="<deployment-name>",
max_tokens=100,
messages=[
{
"role": "user",
"content": "Hello"
}
]
)
This succeeds consistently.
- Direct API Verification
A direct POST request to:
https://<resource>.services.ai.azure.com/models/chat/completions
returns:
{
"error": {
"code": "api_not_supported",
"message": "Requested API is currently not supported"
}
}
This exactly matches the error reported by Claude Desktop.
- Endpoint Comparison
Working endpoint:
https://<resource>.services.ai.azure.com/anthropic/v1/messages
Failing endpoint:
https://<resource>.services.ai.azure.com/models/chat/completions
The deployment appears to support Anthropic Messages APIs but not Azure AI Inference Chat Completions APIs.
Suspected Root Cause
Claude Desktop appears to perform a startup model validation/probe against:
/models/chat/completions
However, the deployed Azure AI Foundry Claude model only exposes the Anthropic Messages API:
/anthropic/v1/messages
As a result, the probe fails with:
{
"code": "api_not_supported"
}
even though normal model inference works correctly through the official Anthropic Foundry SDK.
Request
Could you please confirm:
Whether Azure AI Foundry Claude deployments are expected to support Claude Desktop through the Anthropic Messages API.
Whether the Azure AI Foundry provider in Claude Desktop currently probes using /models/chat/completions.
Whether this is a known issue or limitation.
Whether there is a supported way to configure Claude Desktop to use the Anthropic endpoint path for Azure AI Foundry deployments.
I can provide additional logs, screenshots, and network traces if required.
What Should Happen?
Claude Desktop should successfully validate and connect to a Claude model deployed in Azure AI Foundry when the deployment is accessible through the official Anthropic Foundry SDK and Microsoft Entra ID authentication.
After configuring the Azure AI Foundry provider and selecting the deployed Claude model, Claude Desktop should mark the model as available and allow normal chat/inference operations.
The deployment should not be rejected during startup validation if it is otherwise functional and able to serve requests through the supported Anthropic Messages API.
Error Messages/Logs
Steps to Reproduce
- Deploy a Claude model in Azure AI Foundry.
- Configure Azure AI Foundry authentication using Microsoft Entra ID (Interactive Sign-in).
- Verify that the deployment works using the official Anthropic Foundry SDK:
from anthropic import AnthropicFoundry
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
token_provider = get_bearer_token_provider(
DefaultAzureCredential(),
"https://ai.azure.com/.default"
)
client = AnthropicFoundry(
base_url="https://<resource>.services.ai.azure.com/anthropic",
azure_ad_token_provider=token_provider,
)
response = client.messages.create(
model="<deployment-name>",
max_tokens=100,
messages=[
{
"role": "user",
"content": "Hello"
}
]
)
- Confirm that the SDK call succeeds and returns a valid response.
- Open Claude Desktop (latest version).
- Navigate to:
Settings → Developer → Cowork on 3P → Azure AI Foundry
- Configure the same Azure AI Foundry resource and authenticate using the same Microsoft Entra ID account.
- Add the same deployment as a model.
- Claude Desktop immediately rejects the model during validation/probing.
- Observe the error:
Azure AI Foundry rejected model "<deployment-name>" (HTTP 404)
requestUrl:
https://<resource>.services.ai.azure.com/models/chat/completions
response:
{
"error": {
"code": "api_not_supported",
"message": "Requested API is currently not supported"
}
}
- Independently verify that calling:
POST https://<resource>.services.ai.azure.com/models/chat/completions
returns the same 404 api_not_supported response, while the Anthropic endpoint:
POST https://<resource>.services.ai.azure.com/anthropic/v1/messages
succeeds.
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.170
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
The deployment itself is healthy and functional.
The issue appears to occur during Claude Desktop's model validation/probe step.
The same deployment works through the official AnthropicFoundry SDK but is rejected by Claude Desktop before inference begins.
This suggests Claude Desktop may be probing the deployment through /models/chat/completions while the deployment only supports the Anthropic Messages API.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗