continue icon indicating copy to clipboard operation
continue copied to clipboard

Error: "Requested API is currently not supported" when using Azure Foundry deployed Anthropic models

Open mingjun1120 opened this issue 11 months ago • 4 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 1.2.11
- IDE version: VSCode 1.107.1
- Model: Claude Opus 4.5
- config:
  
  name: My Config
  version: 0.0.1
  schema: v1

  models:
    - name: Claude Opus 4.5
      model: claude-opus-4-5-20251101
      provider: azure
      apiBase: https://my-company-azure-foundry-name.services.ai.azure.com/anthropic/v1/
      apiKey: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      env:
        deployment: claude-opus-4-5-20251101
        apiType: azure-foundry # Or "azure-openai" if using OpenAI models
        apiVersion: 2025-04-01-preview # Azure API version

    - name: Claude Sonnet 4.5
      model: claude-sonnet-4-5
      provider: azure
      apiBase: https://my-company-azure-foundry-name.services.ai.azure.com/anthropic/v1/
      apiKey: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      env:
        deployment: claude-sonnet-4-5
        apiType: azure-foundry # Or "azure-openai" if using OpenAI models
        apiVersion: 2025-04-01-preview # Azure API version

    - name: Claude Haiku 4.5
      model: claude-haiku-4-5-20251001
      provider: azure
      apiBase: https://my-company-azure-foundry-name.ai.azure.com/anthropic/v1/
      apiKey: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      env:
        deployment: claude-haiku-4-5-20251001
        apiType: azure-foundry # Or "azure-openai" if using OpenAI models
        apiVersion: 2025-04-01-preview # Azure API version

Description

Problem

When attempting to use Claude models deployed on Azure Foundry through the Continue VS Code extension, I receive an error: "Requested API is currently not supported" with details indicating the API is not supported.

Error Details

{
  "code": "api_not_supported",
  "message": "Requested API is currently not supported",
  "details": "Requested API is currently not supported"
}

The error also mentions:

  • Invalid apiBase: https://my-dna-openai-3.services.ai.azure.com/anthropic/v1/
  • Model/deployment not found for: claude-opus-4-5-20251101

Configuration

I have configured three Anthropic models in my config.yml:

  1. Claude Opus 4.5 (claude-opus-4-5-20251101)
  2. Claude Sonnet 4.5 (claude-sonnet-4-5)
  3. Claude Haiku 4.5 (claude-haiku-4-5-20251001)

All models are:

  • Provider: Azure Foundry
  • API Type: azure-foundry
  • API Version: 2025-04-01-preview
  • Endpoint Format: https://[resource-name].services.ai.azure.com/anthropic/v1/

My config.yml file:

name: My Config
version: 0.0.1
schema: v1

models:
  - name: Claude Opus 4.5
    model: claude-opus-4-5-20251101
    provider: azure
    apiBase: https://my-company-azure-foundry-name.services.ai.azure.com/anthropic/v1/
    apiKey: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    env:
      deployment: claude-opus-4-5-20251101
      apiType: azure-foundry # Or "azure-openai" if using OpenAI models
      apiVersion: 2025-04-01-preview # Azure API version

  - name: Claude Sonnet 4.5
    model: claude-sonnet-4-5
    provider: azure
    apiBase: https://my-company-azure-foundry-name.services.ai.azure.com/anthropic/v1/
    apiKey: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    env:
      deployment: claude-sonnet-4-5
      apiType: azure-foundry # Or "azure-openai" if using OpenAI models
      apiVersion: 2025-04-01-preview # Azure API version

  - name: Claude Haiku 4.5
    model: claude-haiku-4-5-20251001
    provider: azure
    apiBase: https://my-company-azure-foundry-name.ai.azure.com/anthropic/v1/
    apiKey: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    env:
      deployment: claude-haiku-4-5-20251001
      apiType: azure-foundry # Or "azure-openai" if using OpenAI models
      apiVersion: 2025-04-01-preview # Azure API version

Expected Behavior

The Continue extension should successfully connect to and use the Azure Foundry deployed Anthropic models with the provided configuration.

Actual Behavior

The extension fails with an "API not supported" error when testing the model connection.

Steps to Reproduce

  1. Deploy Anthropic models to Azure Foundry
  2. Configure config.yml with Azure Foundry provider settings
  3. Test the model in Continue VS Code extension
  4. Observe the error

Environment

  • Operating System: Windows 11
  • Continue Extension Version: 1.2.11
  • VS Code Version: 1.107.1
  • Azure Foundry: Anthropic models deployed
  • Config Provider: azure-foundry

To reproduce

No response

Log output


mingjun1120 avatar Dec 19 '25 19:12 mingjun1120

Related Issues

This appears to be related to Azure Foundry + Anthropic model configuration. Here are some related/duplicate issues:

Directly Related:

  • #9009 - Bug: Anthropic provider fails with Azure AI Foundry endpoints (incorrect auth header) (CLOSED - Fixed)
  • #3735 - Azure Foundry models don't work (Mistral Codestral 2501 with Azure) (CLOSED)

Similar Azure Foundry Issues:

  • #5188 - JSON error when trying to connect to Azure Foundry endpoint (CLOSED)
  • #3902 - Cannot setup Deepseek model using Azure Foundry (OPEN)
  • #3938 - Cannot Provision DeepSeek R1 from Azure Foundry (OPEN)

Note: Issue #9009 was recently closed (Dec 8, 2024) with a fix for Azure Foundry Anthropic endpoints. The current issue (#9224) may be related to the same authentication header problem or a regression. The user is using provider: azure instead of provider: anthropic which might be causing the issue.

continue avatar Dec 19 '25 19:12 continue

The solution is to use native providers with Azure AI Foundry, not the azure provider.

For Anthropic models on Azure AI Foundry:

models:
  - provider: anthropic  # Use native Anthropic provider
    model: claude-sonnet-4-5
    apiBase: https://{resource}.services.ai.azure.com/anthropic/v1
    apiKey: {AZURE_API_KEY}

woter1832 avatar Jan 09 '26 10:01 woter1832

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Apr 10 '26 02:04 github-actions[bot]

This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

github-actions[bot] avatar Apr 20 '26 02:04 github-actions[bot]