Continue CLI 1.5.26 and above fails to connect to Anthropic model in Azure - continue VScode plugin ok with same config
Before submitting your bug report
- [x] I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- [x] I'm not able to find a related conversation on GitHub discussions that reports the same bug
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
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
- Deploy an instance of Claude Haiku in Azure AI foundry
- Use the above config with URL and API key set appropriately
- Verify the continue plugin for VSCode can use the configured model
- 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."}}
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)
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...
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 👍