Describe the problem/error/question
Hi all!
I’m running n8n (self-hosted, v1.121.2) with the new OpenAI Langchain node.
When I set “Type” to Text, the API sends “input_text”, causing this error:
Invalid value: 'input_text'. Supported values are: 'output_text' and 'refusal'.
The node only gives “Type” options: text, image, file.
There’s no “output_text”, and I’ve checked advanced settings and fields.
My prompt and role work in older nodes, but not now. Screenshot attached.
How can I fix this so messages get sent as “output_text?”
Is there a node update, manual override, or workaround?
Thanks for helping!
What is the error message (if any)?
Invalid value: 'input_text'. Supported values are: 'output_text' and 'refusal'.
Please share your workflow
{
"nodes": [
{
"parameters": {
"formTitle": "Yacht Designer",
"formDescription": "Design your dream Yacht with just a few clicks",
"formFields": {
"values": [
{
"fieldLabel": "Yacht name",
"requiredField": true
},
{
"fieldLabel": "Yacht description",
"fieldType": "textarea",
"placeholder": "Please describe the look of your dream yacht",
"requiredField": true
},
{
"fieldLabel": "Select the Length of your yacht in meters",
"fieldType": "dropdown",
"fieldOptions": {
"values": [
{
"option": "5"
},
{
"option": "10"
},
{
"option": "20"
},
{
"option": "30"
}
]
},
"requiredField": true
},
{
"fieldLabel": "Turbo Sport Package",
"fieldType": "checkbox",
"fieldOptions": {
"values": [
{
"option": "Include"
}
]
}
},
{
"fieldLabel": "Name",
"placeholder": "Please enter your name",
"requiredField": true
},
{
"fieldLabel": "Email",
"fieldType": "email",
"placeholder": "please enter your Emial so we can reach out to you with an offer",
"requiredField": true
}
]
},
"options": {}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.3,
"position": [
-384,
-32
],
"id": "bd4832a0-9118-44ad-91ef-f72fe32e966d",
"name": "Pop up Form",
"webhookId": "8a1fdd7f-3713-4a37-a4b1-bd7c7ada2e5c"
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "chatgpt-4o-latest",
"mode": "list",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"responses": {
"values": [
{
"content": "=This is the name of the Yacht:{{ $json['Yacht name'] }}\nThis is the Description of the Yacht:{{ $json['Yacht description'] }}\nThis is the Length (meters) of the Yacht:{{ $json['Select the Length of your yacht in meters'] }}\nThis is the info if the yacht has the turbo sport package : {{ $json['Turbo Sport Package'][0] }}"
},
{
"role": "system",
"content": "#Role: You are a world class yacht designer with tons of experience in designing high end\nluxury yachts.\n#Task: You have two tasks.\n1) Your first task is to look at the provided inputs and create an image prompt that perfectly\nrepresents the yacht described in your inputs. If the \"Turbo Sport Package\" is included, make\nthe yacht look extremely sporty, fast and powerful.\n2) Your second task is to create three bullet points, that perfectly describe the yachts benefits.\nmakeup the information for these points but make it reasonable, e.g. engine type, power. Make\neach bullet point max 5-6 words long.\n#Output style:\nAlways output the same valid JSON structure and always use the exact same JSON key\nnames:\n{\n\"Yacht_image_prompt\": \"...\",\n\n\"Yacht_name\": \"...\",\n\"Bullet_point_1\": \"...\",\n\"Bullet_point_2\": \"...\",\n\"Bullet_point_3\": \"...\"\n}"
},
{
"role": "assistant",
"content": "Assistant Prompt:\nAlways output the same valid JSON structure and always use the exact same JSON key\nnames:\n{\n\"Yacht_image_prompt\": \"...\",\n\"Yacht_name\": \"...\",\n\"Bullet_point_1\": \"...\",\n\"Bullet_point_2\": \"...\",\n\"Bullet_point_3\": \"...\"\n}"
}
]
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 2,
"position": [
-176,
-32
],
"id": "b4820541-2d63-4fb4-b788-df3e9e3d97f0",
"name": "LLM",
"credentials": {
"openAiApi": {
"id": "5Ls3ygHEcdvbcqJW",
"name": "OpenAi account"
}
}
}
],
"connections": {
"Pop up Form": {
"main": [
[
{
"node": "LLM",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"Pop up Form": [
{
"Yacht name": "Jasani",
"Yacht description": "beautiful White and Soft pink yacht",
"Select the Length of your yacht in meters": "10",
"Turbo Sport Package": [
"Include"
],
"Name": "Tiko",
"Email": "[email protected]",
"submittedAt": "2025-11-26T08:32:16.674-05:00",
"formMode": "test"
}
]
},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "9f4edfb63b2f3631ce1d92c854f93f2d3c43b7649dbd1fb0db18f6941261fa65"
}
}(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
{
“errorMessage”: “Bad request - please check your parameters”,
“errorDescription”: “Invalid value: ‘input_text’. Supported values are: ‘output_text’ and ‘refusal’.”,
“errorDetails”: {
“rawErrorMessage”: [
“400 - {“error”:{“message”:“Invalid value: ‘input_text’. Supported values are: ‘output_text’ and ‘refusal’.”,“type”:“invalid_request_error”,“param”:“input[2].content[0]”,“code”:“invalid_value”}}”
],
“httpCode”: “400”
},
“n8nDetails”: {
“nodeName”: “LLM”,
“nodeType”: “@n8n/n8n-nodes-langchain.openAi”,
“nodeVersion”: 2,
“resource”: “text”,
“operation”: “response”,
“itemIndex”: 0,
“time”: “11/26/2025, 4:19:59 PM”,
“n8nVersion”: “1.121.2 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Bad request - please check your parameters”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1498:10)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1798:11)“,
" at ExecuteContext.apiRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_20900c8302166d11a7199f732c8d7bf5/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/OpenAi/transport/index.ts:56:9)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_20900c8302166d11a7199f732c8d7bf5/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/OpenAi/v2/actions/text/response.operation.ts:607:18)“,
" at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_20900c8302166d11a7199f732c8d7bf5/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/OpenAi/v2/actions/router.ts:58:25)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_20900c8302166d11a7199f732c8d7bf5/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/OpenAi/v2/OpenAiV2.node.ts:89:10)“,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1074:8)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1255:11)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1691:27”
]
}
}
Information on your n8n setup
- n8n version: 1.121.2
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): Repocloud
- Operating system:
