Skip to content

fix: randomSeed always ignored in ChatMistral node#6299

Open
PythonToGo wants to merge 1 commit intoFlowiseAI:mainfrom
PythonToGo:bugfix/mistral-randomseed-reads-safemode
Open

fix: randomSeed always ignored in ChatMistral node#6299
PythonToGo wants to merge 1 commit intoFlowiseAI:mainfrom
PythonToGo:bugfix/mistral-randomseed-reads-safemode

Conversation

@PythonToGo
Copy link
Copy Markdown

@PythonToGo PythonToGo commented Apr 27, 2026

Problem

In ChatMistral.ts, the randomSeed variable was reading from the wrong input key:

// before (line 128)
const randomSeed = nodeData.inputs?.safeMode as string  // ← reads safeMode, not randomSeed

This means the Random Seed UI field is completely ignored — no value entered by the user is ever passed to the model.

Additionally, when safeMode is true, this bug causes randomSeed to receive "true" (a string), and parseFloat("true") evaluates to NaN, which is silently passed to obj.randomSeed.

Fix

// after
const randomSeed = nodeData.inputs?.randomSeed as string

Tested

  • randomSeed set, safeMode off -> obj.randomSeed correctly assigned
  • randomSeed empty, safeMode on -> obj.randomSeed not set
  • randomSeed set, safeMode on -> both fields applied independently

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 fixes a bug in the ChatMistral component where the randomSeed variable was incorrectly assigned the value of safeMode instead of randomSeed. I have no additional feedback to provide.

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.

2 participants