Skip to content

OpenAI Node - “Message a Model” (v2 Actions) - Bad request - please check your parameters #32433

Description

@bridgewaretech

Bug Description

There appears to be a regression in the latest version of the native OpenAI node (2.3 (Latest)) when using the new v2 Actions layout. Specifically, when selecting Resource: Text → Operation: Message a Model and configuring the Output Format to either JSON Schema or JSON Object, the node completely fails on execution.
The background API call crashes with a 400 Bad Request error from OpenAI.

Error message:

Invalid value: ‘input_text’. Supported values are: ‘output_text’ and ‘refusal’.

OpenAI’s API guidelines dictate that it strictly expects output_text or refusal at this level of the payload object array.

What we did to test and isolate the issue:
Tested Output Format Toggles: We tried switching from JSON Schema (recommended) to a basic JSON Object to remove strict schema enforcement. The error still occurred, showing that n8n’s background tool-calling/chat wrapper layer is hardcoding or forcing the input_text parameter regardless of the format chosen.

Tested Message Role Workarounds: We tried combining the user inputs and system rules into a single System message block to prevent n8n from creating nested User role array parameters. The node still forced the invalid payload configuration.

To Reproduce

  1. Create a workflow where you add the latest OpenAI "Message a model" node.
  2. Selecting Resource: Text → Operation: Message a Model
  3. Add the message for the User Role, System Role and Assistant Role.
  4. Configuring the Output Format to either JSON Schema or JSON Object.
  5. Node completely fails on execution. The background API call crashes with a 400 Bad Request error from OpenAI.

Expected behavior

Node should execute with no error and generate the JSON output.
The background API call should not crash with a 400 Bad Request error from OpenAI.

Verified via HTTP Request Node: To prove the issue was an n8n node formatting bug and not an OpenAI API outage or bad prompt design, we manual-coded the request using a standard HTTP Request Node targeting https://api.openai.com/v1/chat/completions with the exact same payload. It executed and parsed the JSON perfectly.

The Working Solution / Workaround:
As a definitive test, we copied an older version of the OpenAI integration (Node Version 1.4) from a legacy workflow into the canvas. Using the legacy version 1.4 node structure with the identical prompt, parameters, and input data, the workflow runs flawlessly. This points to a bug in how Node Version 2.3 handles payload rendering for OpenAI’s newer Responses API endpoints.

Debug Info

Debug info

core

  • n8nVersion: 2.23.4
  • platform: docker (self-hosted)
  • nodeJsVersion: 24.15.0
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: d7001eab-098b-4417-b831-3fa35af19068

storage

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

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

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

cluster

  • instanceCount: 1
  • versions: 2.23.4
  • instances:
    • instanceKey: 0ca51285-8e23-43a8-97a2-6dcbd29c1408, hostId: main-e8a942bdb100, instanceType: main, instanceRole: leader, version: 2.23.4
  • checks:
    • check: hostid-clash, status: succeeded, warnings: -
    • check: lifecycle, status: succeeded, warnings: -
    • check: split-brain, status: succeeded, warnings: -
    • check: version-mismatch, status: succeeded, warnings: -

Generated at: 2026-06-17T05:53:42.665Z

Operating System

Ubuntu Linux

n8n Version

2.23.4

Node.js Version

24.15.0

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:in-linearIssue or PR is now in Linearstatus:team-assignedA team has been assigned the issue or PRteam:nodesIssue is with the Nodes team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions