Repository navigation
[Enhancement]: Lock model/endpoint selection per conversation (prevent context leaking to a different model after the first message) #17917
hboie
started this conversation in
Feature Requests & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem / Motivation
LibreChat currently allows switching the endpoint/model mid-conversation at any time, which silently serializes and forwards the entire existing conversation history to the newly selected model/provider. While this is a well-documented and intentional feature for flexibility, it creates a problem for deployments with strict data governance requirements:
interface.modelSelect: falseandmodelSpecs.enforce: trueoptions solve this only globally (disabling model choice entirely, even for new conversations), which is too restrictive for deployments that want to offer multiple models to users — just not allow switching within an already-started conversation.Proposed Solution
Add a new
interface.lockModelPerConversationboolean option (default:false, fully backward-compatible) tolibrechat.yaml:Behavior when enabled:
Implementation Details (prototype already built and tested)
We've implemented and are currently running this in a staging/test environment. Rough outline of the changes, happy to adapt based on maintainer feedback on architecture/placement:
Areas of the Application Affected
All reactions