LibreChat icon indicating copy to clipboard operation
LibreChat copied to clipboard

[Bug]: Provider Switch Causes Model Mismatch and "Illegal Model Request" Error

Open berry-13 opened this issue 5 months ago • 1 comments

What happened?

when changing the provider while a model is generating a response, the system switches back to the old provider after completion or error, but the model doesn't update. This mismatch causes an "illegal model request" error when trying to send a new message. the expected behavior is that both the provider and the model should update consistently when a change is made, allowing users to continue sending messages with the newly selected provider and model without errors

  • The bug occurs when changing the provider during an ongoing response generation
  • After the response finishes or an error occurs, the UI shows the old provider (the one used for generation)
  • However, the model doesn't update to match the displayed provider
  • Attempting to send a new message results in an "illegal model request" error
  • This creates a confusing user experience and prevents normal operation after switching providers

Steps to Reproduce

  1. Start generating a response with Provider A
  2. While the response is being generated, switch to Provider B
  3. Wait for the response to complete or for an error to occur
  4. Observe that the UI switches back to Provider A
  5. Attempt to send a new message
  6. Observe the "illegal model request" error

What browsers are you seeing the problem on?

Firefox, Chrome, Microsoft Edge

Relevant log output

No response

Screenshots

image

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

berry-13 avatar Sep 14 '24 16:09 berry-13