Skip to content

feat: use model dropdown for ChatXAI and add Grok models to catalog#6480

Open
PythonToGo wants to merge 2 commits into
FlowiseAI:mainfrom
PythonToGo:feature/chatxai-model-dropdown
Open

feat: use model dropdown for ChatXAI and add Grok models to catalog#6480
PythonToGo wants to merge 2 commits into
FlowiseAI:mainfrom
PythonToGo:feature/chatxai-model-dropdown

Conversation

@PythonToGo
Copy link
Copy Markdown
Contributor

Align the xAI Grok (ChatXAI) node with the standard chat model nodes by loading its model list from the central models.json instead of a free-text input.

Changes

  • ChatXAI node: change the Model input from a free-text string to an asyncOptions dropdown (loadMethod: listModels), matching ChatAnthropic, ChatOpenAI, ChatCerebras, etc.
  • models.json: add a chatXAI entry to the chat catalog with the current Grok models (grok-4, grok-3, grok-3-mini, grok-2-vision-1212, grok-2-1212).
  • Bugfix: remove a duplicated Max Tokens input that was defined twice in the node.
  • Bump node version 2.0 → 2.1.

Notes

  • Backward compatible: modelName is still stored/read as a string, so existing flows keep working. The version bump handles node upgrade detection.
  • Pricing fields are intentionally omitted (same pattern as the existing chatCerebras entry) to avoid committing inaccurate cost values; they can be added in a follow-up once verified.
image

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the ChatXAI component to load models dynamically via asyncOptions and adds a list of Grok models (including grok-4, grok-3, and grok-2 variants) to models.json. It also removes a duplicate Max Tokens parameter and increments the component version to 2.1. The reviewer recommends enabling freeSolo: true on the modelName parameter to maintain backward compatibility for custom model names and changing the default model to a more cost-effective option like grok-2 to prevent unexpected high costs for users.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/components/nodes/chatmodels/ChatXAI/ChatXAI.ts Outdated
… default for ChatXAI

- add freeSolo to the modelName input so users can still type custom or
  newly-released model names not yet in models.json (preserves the previous
  free-text behavior; matches the AzureChatOpenAI pattern)
- change default model from grok-3 to grok-3-mini for a more cost-effective
  out-of-the-box choice
@PythonToGo
Copy link
Copy Markdown
Contributor Author

Addressed both points from Geemini solved: added freeSolo: true so custom/newly-released model names can still be entered (matches AzureChatOpenAI), and changed the default to grok-3-mini — a current-generation, cost-effective option (preferred over the older grok-2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant