On n8n v1.89.2 (self-hosted, Docker) the “xAI Grok Chat Model” node injects the field presencePenalty into the API request even when it is not set in the UI.
The model grok-3-mini-beta rejects that parameter and returns:
It differs from grok-3 (full), which doesn’t complain with the same settings.
To Reproduce
The same request succeeds from curl once presencePenalty is removed.
To Reproduce
- Create a new workflow.
- Add an AI agent node with xAI Grok Chat Model as model.
- Select valid xAI credentials.
- Choose Model →
grok-3-mini-beta(leave all other fields at their defaults). - Execute the node.
Current behavior
- The node fails with HTTP 400.
- Raw payload shows
presencePenaltyis present although it was never added in the UI and cannot be deleted.
Attempted work-arounds
| Attempt | Result |
|---|---|
| Searched under Parameters → Options → Add Option for “Presence Penalty” | Not listed as an active property → cannot remove/disable |
| Manual API call without the field | Success |
Screenshots
(attached) – shows the node parameters with no properties selected, yet the request still contains presencePenalty.
Additional context
- Only happens with
grok-3-mini-betaandgrok-3-mini-fast-beta grok-3(full) works fine.
Possible fix
Skip or strip presencePenalty when:
- the selected model is
grok-3-mini-betaandgrok-3-mini-fast-betaor - the UI value is empty/undefined.
If there is a hidden override I missed, please let me know.
Expected behavior
When no value is provided in the UI, the node should omit presencePenalty (or only send it for models that support the option).
Without that field the request succeeds.
Operating System
Ubuntu 24.04.2 LTS
n8n Version
1.89.2
Node.js Version
v20.19.0
Database
SQLite (default)
Execution mode
main (default)