{"record":{"id":"08698e6b75662da9","repo":"n8n-io/n8n","slug":"this-model-requires-the-responses-api-enable-use","errorCode":null,"errorMessage":"This model requires the Responses API. Enable \"Use Responses API\" in the OpenAI Chat Model node options to use this model.","messagePattern":"This model requires the Responses API\\. Enable \"Use Responses API\" in the OpenAI Chat Model node options to use this model\\.","errorType":"exception","errorClass":"OperationalError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/helpers/error-handling.ts","lineNumber":38,"sourceCode":"\tif (typeof error !== 'object' || error === null) {\n\t\treturn false;\n\t}\n\treturn (\n\t\t'status' in error &&\n\t\terror.status === 404 &&\n\t\t'type' in error &&\n\t\terror.type === 'invalid_request_error' &&\n\t\t'param' in error &&\n\t\terror.param === 'model' &&\n\t\t'message' in error &&\n\t\ttypeof error.message === 'string' &&\n\t\terror.message.includes('not a chat model')\n\t);\n}\n\nexport const openAiFailedAttemptHandler = (error: unknown) => {\n\tif (isNonChatModelError(error)) {\n\t\tthrow new OperationalError(\n\t\t\t'This model requires the Responses API. Enable \"Use Responses API\" in the OpenAI Chat Model node options to use this model.',\n\t\t\t{ cause: error },\n\t\t);\n\t}\n\n\tif (error instanceof RateLimitError) {\n\t\t// If the error is a rate limit error, we want to handle it differently\n\t\t// because OpenAI has multiple different rate limit errors\n\t\tconst errorCode = error?.code;\n\t\tconst errorMessage =\n\t\t\tgetCustomErrorMessage(errorCode ?? 'rate_limit_exceeded') ?? errorMap.rate_limit_exceeded;\n\t\tthrow new OperationalError(errorMessage, { cause: error });\n\t}\n};\n","sourceCodeStart":20,"sourceCodeEnd":53,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/helpers/error-handling.ts#L20-L53","documentation":"When an OpenAI model that is only available via the Responses API (not the Chat Completions API) is selected, OpenAI returns a 404 with param 'model' and a message containing 'not a chat model'. The openAiFailedAttemptHandler detects this shape and throws an OperationalError directing the user to enable the 'Use Responses API' toggle in the node options. This is a model-vs-API-surface mismatch.","triggerScenarios":"Using a model like 'o3' or other reasoning/non-chat models with the OpenAI Chat Model node when 'Use Responses API' is not enabled. The SDK sends the request to /v1/chat/completions, and OpenAI returns a 404 invalid_request_error with param=model and 'not a chat model' in the message.","commonSituations":"Switching from a chat model (gpt-4o) to a Responses-API-only model (o1, o3) without toggling the node option; upgrading the model ID without checking API compatibility; using a model ID copy-pasted from OpenAI Playground that targets the Responses API.","solutions":["Open the OpenAI Chat Model node options and enable 'Use Responses API'","Switch to a chat-compatible model such as gpt-4o or gpt-4-turbo if you need the Chat Completions API","Check the OpenAI model documentation to confirm which API surface the model requires"],"exampleFix":"// before — model: 'o3', useResponsesApi: false\n// after  — model: 'o3', useResponsesApi: true","handlingStrategy":"validation","validationCode":"// Check model compatibility before the API call\nconst responsesApiModels = ['o1', 'o1-pro', 'o3', 'o3-mini', 'o4-mini'];\nconst needsResponsesApi = responsesApiModels.some(m => modelId.startsWith(m));\nif (needsResponsesApi && !options.useResponsesApi) {\n  throw new UserError(`Model ${modelId} requires the Responses API. Enable it in node options.`);\n}","typeGuard":"function isChatModel(modelId: string): boolean {\n  const nonChat = ['o1', 'o1-pro', 'o3', 'o3-mini', 'o4-mini'];\n  return !nonChat.some(prefix => modelId.startsWith(prefix));\n}","tryCatchPattern":null,"preventionTips":["Check the OpenAI model documentation for which API surface each model supports","When switching models, verify the 'Use Responses API' toggle matches the model's requirement","Test model changes in a simple workflow before deploying to production"],"tags":["openai","model-mismatch","responses-api","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}