The AI Agent node throws a NodeApiError: config.headers.setContentType is not a function when configured with OpenAI API credentials (added via n8n’s built-in credential system). No HTTP Request node is involved — the error occurs exclusively through the AI Agent node.
Environment
- n8n version: latest (n8n Cloud – app.n8n.cloud)
- Node type: AI Agent
- Authentication method: OpenAI API credentials (via n8n credential store)
- Hosting: n8n Cloud
Requesting confirmation that this is a known issue and an ETA for the fix to be deployed to Cloud instances.
Thank you!
Describe the problem/error/question
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: