-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I'm not able to find a related conversation on GitHub discussions that reports the same bug
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows
- Continue version: 1.0.61
- IDE version: Android Studio Panda 1 | 2025.3.1 Patch 1
- Model:
- config:
: Local Config
version: 1.0.0
schema: v1
models:
- name: Claude Opus (Azure)
provider: anthropic
model: claude-opus-4-6
apiKey:
apiBase: https://abc123-resource.services.ai.azure.com/anthropic/v1
OR link to agent in Continue hub:Description
When using the above config, with a apiBase url hosted on azure.com, the endpoint kept returning
'''{"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."}
Was able to work it around using a proxy, and then went into rabbit hole for finding the root cause
Cause appears to be in the file continue/packages/openai-adapters/src/apis/AnthropicUtils.ts line 81, using api-key in header if isAzure is true, instead of x-api-key
Requesting change like below or requesting leads for similar approach
const authHeaderName = isAzure && apiBase?.includes("cognitiveservices.azure.com") ? "api-key" : "x-api-key";
Forked and pushed the changes here
To reproduce
- Make a local config for any azure hosted anthropic model
Log output
{"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."}}
[info] Starting Continue core...
[2026-03-16T19:27:18] [info] Starting Continue core...
[2026-03-16T19:27:18] Setup
[2026-03-16T19:27:18] [binary] Core started
[2026-03-16T19:27:18] (node:323136) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `continue-binary --trace-warnings ...` to show where the warning was created)
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:11] deleteChain called from files/closed
[2026-03-16T19:50:12] [info] Exiting Continue core...
[info] Starting Continue core...
[2026-03-16T19:50:46] [info] Starting Continue core...
[2026-03-16T19:50:46] Setup
[2026-03-16T19:50:46] [binary] Core started
[2026-03-16T19:50:47] (node:294016) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `continue-binary --trace-warnings ...` to show where the warning was created)
[2026-03-16T19:50:50] [DEBUG] Request URL: https://abc123-resource.services.ai.azure.com/anthropic/v1/messages
[2026-03-16T19:50:50] [DEBUG] Request headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"anthropic-version": "2023-06-01",
"api-key": "" <-removed on purpose
}Metadata
Metadata
Assignees
Labels
Type
Projects
Status