n8n - 💡(How to fix) Fix OpenAI credential fails with "config.headers.setContentType is not a function" on n8n cloud - model list won't populate

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Describe the problem/error/question

What is the error message (if any)?

The error occurs at the credential setup stage before any workflow is executed. It happens when trying to save/test an OpenAI credential. The error appears both when clicking the test button and when trying to save the credential. All other credential fields appear normal.

  • error: all

Root Cause

N/A — the workflow cannot execute because the OpenAI credential fails to connect, preventing model selection in any OpenAI node.

Code Example

Couldn't connect with these settings
config.headers.setContentType is not a function
RAW_BUFFERClick to expand / collapse

Describe the problem/error/question

When adding an OpenAI credential on n8n cloud, the credential cannot be saved and model lists will not populate inside any OpenAI nodes. This started happening on a fresh new n8n cloud account. The API key is valid, active, and has a positive billing balance confirmed on the OpenAI platform side.

What is the error message (if any)?

Couldn't connect with these settings
config.headers.setContentType is not a function

Please share your workflow/screenshots/recording

The error occurs at the credential setup stage before any workflow is executed. It happens when trying to save/test an OpenAI credential. The error appears both when clicking the test button and when trying to save the credential. All other credential fields appear normal.

Share the output returned by the last node

N/A — the workflow cannot execute because the OpenAI credential fails to connect, preventing model selection in any OpenAI node.

Debug info

core

  • n8nVersion: 2.20.6
  • platform: docker (cloud)
  • nodeJsVersion: 24.14.1
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: 5
  • license: enterprise (sandbox)

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 2500 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/147.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2026-05-12T12:02:23.658Z

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING