Bug Description
When using Anthropic Chat Model (Claude) in AI Agent node, the workflow fails with:
- Error:
Bad request - please check your parameters
- Message:
'temperature' and 'top_p' cannot both be specified for this model
Root Cause
n8n sends both temperature and top_p parameters by default, but Anthropic's API requires only one to be set (as per their documentation: "You should either alter temperature or top_p, but not both").
To Reproduce
- Add AI Agent node
- Select Anthropic Chat Model
- Choose any Claude model (tested with Claude Opus 4.1)
- Run workflow
- Error occurs regardless of parameter configuration
Expected Behavior
n8n should only send either temperature OR top_p to Anthropic's API, not both.
Environment
- n8n version: [your version]
- Deployment: [self-hosted/cloud]
- Node: AI Agent with Anthropic Chat Model
Workaround
Currently using HTTP Request node to directly call Anthropic API as the AI Agent node is unusable with Claude models.
To Reproduce
- Add AI Agent node
- Select Anthropic Chat Model
- Choose any Claude model (tested with Claude Opus 4.1)
- Run workflow
- Error occurs regardless of parameter configuration
Expected behavior
n8n should only send either temperature OR top_p to Anthropic's API, not both.
Debug Info
n8n sends both temperature and top_p parameters by default, but Anthropic's API requires only one to be set (as per their documentation: "You should either alter temperature or top_p, but not both").
Operating System
macOS 13.7.7
n8n Version
1.106.3
Node.js Version
n8n Cloud
Database
SQLite (default)
Execution mode
main (default)
Hosting
n8n cloud
Bug Description
When using Anthropic Chat Model (Claude) in AI Agent node, the workflow fails with:
Bad request - please check your parameters'temperature' and 'top_p' cannot both be specified for this modelRoot Cause
n8n sends both
temperatureandtop_pparameters by default, but Anthropic's API requires only one to be set (as per their documentation: "You should either alter temperature or top_p, but not both").To Reproduce
Expected Behavior
n8n should only send either temperature OR top_p to Anthropic's API, not both.
Environment
Workaround
Currently using HTTP Request node to directly call Anthropic API as the AI Agent node is unusable with Claude models.
To Reproduce
Expected behavior
n8n should only send either temperature OR top_p to Anthropic's API, not both.
Debug Info
n8n sends both
temperatureandtop_pparameters by default, but Anthropic's API requires only one to be set (as per their documentation: "You should either alter temperature or top_p, but not both").Operating System
macOS 13.7.7
n8n Version
1.106.3
Node.js Version
n8n Cloud
Database
SQLite (default)
Execution mode
main (default)
Hosting
n8n cloud