continue icon indicating copy to clipboard operation
continue copied to clipboard

Continue CLI 1.5.26 and above fails to connect to Anthropic model in Azure - continue VScode plugin ok with same config

Open SteveM-ROQ opened this issue 10 months ago • 3 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 1.2.11
- IDE version: VSCode 1.107.1
- Model: Anthroipic Claude Haiku 4.5 in Azure AI Foundry
- config:
  
  - name: Claude Haiku 4.5
    provider: anthropic
    model: claude-haiku-4-5
    apiBase: https://<mydeployment>.services.ai.azure.com/anthropic/v1/
    apiKey: ${{ secrets.AZURE }}
    roles:
      - chat
      - edit
      - apply
    capabilities:
      - tool_use
      - image_input
    defaultCompletionOptions:
      contextLength: 200000
      maxTokens: 64000

Description

The above YAML configuration works as expected for Claude Haiku 4.5 (running in Azure AI Foundry) with Continue plugin version: 1.2.11

The same configuration works as expected with Continue CLI version 1.5.25

When using Continue CLI version 1.5.26 and above, the CLI fails to connect to Haiku - error is:

Error: {"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}

To reproduce

  1. Deploy an instance of Claude Haiku in Azure AI foundry
  2. Use the above config with URL and API key set appropriately
  3. Verify the continue plugin for VSCode can use the configured model
  4. Continue CLI fails to connect

Log output

Error: {"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure
to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}

SteveM-ROQ avatar Jan 05 '26 11:01 SteveM-ROQ

Related Issues

  • #9352 - Azure AI Foundry: Anthropic models (Claude) generate incorrect URLs and fail conversation compacting
  • #9224 - Error: "Requested API is currently not supported" when using Azure Foundry deployed Anthropic models
  • #9009 - Bug: Anthropic provider fails with Azure AI Foundry endpoints (incorrect auth header)

continue avatar Jan 05 '26 11:01 continue

this works for me using the following config:

  - name: claude-sonnet-4-5
    provider: anthropic
    model: claude-sonnet-4-5
    apiBase: https://<my-resource>.services.ai.azure.com/anthropic/v1
    apiKey: required-but-not-used
    requestOptions:
      headers:
        x-api-key: <my-api-key>

looks like the recently added fix for Anthropic models via Azure requiring the "api-key" header instead of the "x-api-key" header (#9012) got obsolete again...

ulo avatar Jan 15 '26 13:01 ulo

this works for me using the following config:

  - name: claude-sonnet-4-5
    provider: anthropic
    model: claude-sonnet-4-5
    apiBase: https://<my-resource>.services.ai.azure.com/anthropic/v1
    apiKey: required-but-not-used
    requestOptions:
      headers:
        x-api-key: <my-api-key>

looks like the recently added fix for Anthropic models via Azure requiring the "api-key" header instead of the "x-api-key" header (#9012) got obsolete again...

That has resolved it - thank you 👍

SteveM-ROQ avatar Jan 15 '26 16:01 SteveM-ROQ