Can't use O1 model as an agent

Describe the problem/error/question

I need to use O1 as the LLM for an agent but I can’t because I can’t turn off the ‘stream’ param.

I found Unable to use o1 with AI agent node · Issue #11854 · n8n-io/n8n · GitHub and Jean Paul said “There’s no reason to use the Agent for now” but there are absolutely very good reasons to use O1 (or O1-mini, and O3 models now too) with agents. I don’t understand the logic behind that comment and why n8n wouldn’t just fix this.

Please explain, thank you!

What is the error message (if any)?

stream parament is not supported

Information on your n8n setup

  • n8n version: 1.75.2
  • Database (default: SQLite): SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): **
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • **Operating system: **

Are you running the LLM locally or are you connecting to openai with a priv key?

OpenAI using an API key.
I noticed we weren’t using latest version so earlier today updated to 1.77.3 version and the stream error went away and now we’re getting:

Unsupported value: ‘messages[0].role’ does not support ‘developer’ with this model

with o1-preview, o1-mini.

Then I scrolled all the way down in the list and found model just ‘o1’ and that one actually worked. So for any other people - try selecting different versions of the same model!

nice glad the update and switching model worked for you.

Hi,
I’m using self-hosted 1.78.1 version , and I faced the same error . I tested all o1 versions

regards.

Can you retry with the n8n cloud and see if it works for you via free trail? If it does i suspect it has something to fo with you running it locally and possibly your firewall is blocking the api call to openai i think. Im assuming because i dont know how your computer or network is configured.

Hi !

I’m using the latest version of n8n 1.84.0 on trial mode and I face the same issue. I always get this error :

{
  "errorMessage": "Bad request - please check your parameters",
  "errorDescription": "Unsupported value: 'messages[0].role' does not support 'developer' with this model.",
  "errorDetails": {},
  "n8nDetails": {
    "time": "18/03/2025 10:58:55",
    "n8nVersion": "1.84.0 (Cloud)",
    "binaryDataMode": "filesystem",
    "cause": {
      "status": 400,
      "headers": {
        "access-control-expose-headers": "X-Request-ID",
        "alt-svc": "h3=\":443\"; ma=86400",
        "cf-cache-status": "DYNAMIC",
        "cf-ray": "9223dfd46cc81e6a-FRA",
        "connection": "keep-alive",
        "content-length": "224",
        "content-type": "application/json",
        "date": "Tue, 18 Mar 2025 09:58:55 GMT",
        "openai-organization": "techoverlord",
        "openai-processing-ms": "19",
        "openai-version": "2020-10-01",
        "server": "cloudflare",
        "set-cookie": "__cf_bm=rkhQWwk9PNy7Ruy8PDO1IWq5_tMDKHcjPL8yQiwhwfI-1742291935-1.0.1.1-QRbz_Ld5dDLIfrTrbe.IIRgbEdD12juos_ZowZLNJ_mTd1zRscjjbHL4cEbY5uQFGky_uNntIfbjY6Ap0Y4PS3AB3_1mDqGmv6E5wr8IExk; path=/; expires=Tue, 18-Mar-25 10:28:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=U8A7uXpEKK9QL5SLZ_im0gdrdhJQG5PlIkXyxaEk6II-1742291935573-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None",
        "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
        "x-content-type-options": "nosniff",
        "x-ratelimit-limit-requests": "500",
        "x-ratelimit-limit-tokens": "200000",
        "x-ratelimit-remaining-requests": "499",
        "x-ratelimit-remaining-tokens": "198455",
        "x-ratelimit-reset-requests": "120ms",
        "x-ratelimit-reset-tokens": "463ms",
        "x-request-id": "req_b2ba12011bb5b178d934764a87aaa1a6"
      },
      "request_id": "req_b2ba12011bb5b178d934764a87aaa1a6",
      "error": {
        "message": "Unsupported value: 'messages[0].role' does not support 'developer' with this model.",
        "type": "invalid_request_error",
        "param": "messages[0].role",
        "code": "unsupported_value"
      },
      "code": "unsupported_value",
      "param": "messages[0].role",
      "type": "invalid_request_error",
      "attemptNumber": 1,
      "retriesLeft": 2
    }
  }
}

[details="instance information"]
# Debug info

## core

- n8nVersion: 1.84.0
- platform: docker (cloud)
- nodeJsVersion: 20.18.3
- database: sqlite
- executionMode: regular
- concurrency: 5
- license: community
- consumerId: 00000000-0000-0000-0000-000000000000

## 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 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/133.0.0.0 safari/537.36
- isTouchDevice: false

Generated at: 2025-03-18T10:02:06.190Z
[/details]

My setup is basically using the agent node with an open AI node as model (preferably using o1) that uses a notion tool and a window conversation buffer of 5 messages.

The setup works with gpt 4o but doesn’t with the o series of open ai models.

I tried switching to deepseek but their platform is glitched for the moment and I can’t sign up to use their API …

Any idea how to fix this ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.