ISSUE: Xai (Grok) with AI agent node Does NOT works

Hey guys,
I’m currently using xAI (Grok) as my AI agent node, and it was working fine until earlier today.
Now it’s stopped working, and I’m seeing the following error:

Error in sub-node ‘xAI Grok Chat Model‘
Argument not supported: stream_options

Has anyone else run into a similar issue?
Any idea how I can disable the stream_options parameter in n8n?

Herewith a simple test workflow to reproduce it:

Update: I tried using the same Grok API with curl with stream turned on. It works, but it does not work on the ‘AI agent’ node. That is weird. Any idea why this is happening?
The cURL test working seems like pointing the issue is specific to n8n’s implementation rather than the xAI API itself.

curl https://api.x.ai/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer <xai-api-key>" -d '{
  "messages": [
    {
      "role": "system",
      "content": "You are a test assistant."
    },
    {
      "role": "user",
      "content": "Testing. Just say hi and hello world and nothing else."
    }
  ],
  "model": "grok-2-latest",
  "stream": true,
  "temperature": 0
}'
1 Like

Update: I tried using the same Grok API with curl with stream turned on. It works, but it does not work on the ‘AI agent’ node. That is weird. Any idea why this is happening?
The cURL test working seems like pointing the issue is specific to n8n’s implementation rather than the xAI API itself.

curl https://api.x.ai/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer <xai-api-key>" -d '{
  "messages": [
    {
      "role": "system",
      "content": "You are a test assistant."
    },
    {
      "role": "user",
      "content": "Testing. Just say hi and hello world and nothing else."
    }
  ],
  "model": "grok-2-latest",
  "stream": true,
  "temperature": 0
}'
1 Like

did you ever get this resolved? I can connect after adding credits to XAi; however, I am getting the following output from grok 3 fast: “Open the Google Calendar tool (double-click) and choose a credential from the drop-down.” for EVERY prompt I enter. Curious if you ran into this?