LibreChat
LibreChat copied to clipboard
[Bug]: Provider Switch Causes Model Mismatch and "Illegal Model Request" Error
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
- Start generating a response with Provider A
- While the response is being generated, switch to Provider B
- Wait for the response to complete or for an error to occur
- Observe that the UI switches back to Provider A
- Attempt to send a new message
- Observe the "illegal model request" error
What browsers are you seeing the problem on?
Firefox, Chrome, Microsoft Edge
Relevant log output
No response
Screenshots
Code of Conduct
- [X] I agree to follow this project's Code of Conduct