Credential OpenAI problem

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:

welcome to the n8n community @Giuseppe_Scarpenti
HTTP Request node fails with “config.headers.setContentType is not a function” when calling api.openai.com · Issue #29471 · n8n-io/n8n

its a know issue
I don’t see a safe user-side workaround for this specific error
If you are self-hosted, the only practical temporary options reported by the community are downgrading to 2.18.5 or testing another OpenAI-compatible provider/base URL if your workflow allows it, but on Cloud this should be handled through n8n support with the workspace URL, node details, and debug info.