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
}'