-
Notifications
You must be signed in to change notification settings - Fork 55.5k
Description
Describe the problem/error/question
The Anthropic credential test fails with a 404 error even when using a valid API key. The credential test in AnthropicApi.credentials.js hardcodes claude-3-haiku-20240307 as the test model, but this model is no longer available on newer Anthropic accounts.
What is the error message (if any)?
The resource you are requesting could not be found
Please share your workflow/screenshots/recording
No workflow required — this occurs at the credential setup stage before any workflow is created.
Share the output returned by the last node
N/A — failure occurs during credential verification, not workflow execution.
The hardcoded model in /node_modules/@n8n/n8n-nodes-langchain/dist/credentials/AnthropicApi.credentials.js:
json{
"model": "claude-3-haiku-20240307"
}
Confirmed via curl https://api.anthropic.com/v1/models that this model is not present on the account. Available models start from claude-haiku-4-5-20251001.
Workaround: Manually patching the file to use claude-haiku-4-5-20251001 resolves the issue, but this is overwritten on every n8n update.
Suggested fix: Either update the hardcoded model to a current one, or dynamically query /v1/models and use the first available model for the test request.
n8n version: 2.10.3
Node.js version: 22.22.1