mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 21:43:06 +00:00
⚙️ fix: Default Running Chat Rename to On (#16769)
interface.runningChatRename now defaults to true, so a running chat or a placeholder-title chat can be renamed without a librechat.yaml override. Set it to false during a rolling upgrade from a version without title ownership.
This commit is contained in:
parent
d55dbc3bd8
commit
c6e5f98552
5 changed files with 31 additions and 25 deletions
|
|
@ -217,10 +217,10 @@ Keep storage state, traces, logs, and session data private. Check that the PNGs
|
|||
|
||||
## Running-chat rename rollout
|
||||
|
||||
`interface.runningChatRename` defaults to `false`. Keep it off during rolling upgrades.
|
||||
After **every API replica** supports title ownership, drain all title-generation tasks
|
||||
started on older replicas, then enable it fleet-wide. The client also requires the
|
||||
server's title-ownership capability; an old replica cannot advertise it.
|
||||
`interface.runningChatRename` defaults to `true`. Set it to `false` during rolling upgrades
|
||||
from a version without title ownership. After **every API replica** supports title ownership,
|
||||
drain all title-generation tasks started on older replicas, then remove the override. The client
|
||||
also requires the server's title-ownership capability; an old replica cannot advertise it.
|
||||
|
||||
With the fence off, running rows and unowned placeholder titles cannot be renamed.
|
||||
Other menu actions remain available. Settled non-placeholder chats retain Rename.
|
||||
|
|
|
|||
|
|
@ -155,10 +155,11 @@ projects:
|
|||
# Custom interface configuration
|
||||
interface:
|
||||
customWelcome: 'Welcome to LibreChat! Enjoy your experience.'
|
||||
# After ALL API replicas are upgraded and old title-generation jobs have drained:
|
||||
# Allow renaming a running chat or one with a placeholder title (default: true).
|
||||
# Set to false during a rolling upgrade, until ALL API replicas are upgraded and old
|
||||
# title-generation jobs have drained. While false, rename is disabled for running chats
|
||||
# and unowned placeholder titles; other actions stay available.
|
||||
# runningChatRename: true
|
||||
# Keep false (default) during rolling upgrades. Missing server capability disables
|
||||
# rename for running chats and unowned placeholder titles; other actions stay available.
|
||||
# Minimum interval between syntax-highlighting passes while streamed code changes (default: 300 ms)
|
||||
# codeHighlightThrottleMs: 300
|
||||
# How long a conversation's message history stays cached in the browser after leaving it (default: 60000 ms),
|
||||
|
|
|
|||
|
|
@ -2575,10 +2575,14 @@ it.each([{ baseMs: 1 }, { maxMs: 600001 }, { baseMs: 1000, maxMs: 500 }])(
|
|||
);
|
||||
|
||||
describe('conversation title ownership rollout', () => {
|
||||
it('defaults running rename off and accepts only an explicit deployment opt-in', () => {
|
||||
expect(interfaceSchema.parse({}).runningChatRename).toBe(false);
|
||||
expect(interfaceSchema.parse(undefined).runningChatRename).toBe(false);
|
||||
expect(interfaceSchema.parse({ runningChatRename: true }).runningChatRename).toBe(true);
|
||||
it('defaults running rename on when the option is omitted', () => {
|
||||
expect(interfaceSchema.parse({}).runningChatRename).toBe(true);
|
||||
});
|
||||
it('defaults running rename on when the whole interface block is omitted', () => {
|
||||
expect(interfaceSchema.parse(undefined).runningChatRename).toBe(true);
|
||||
});
|
||||
it('lets a deployment opt out of running rename explicitly', () => {
|
||||
expect(interfaceSchema.parse({ runningChatRename: false }).runningChatRename).toBe(false);
|
||||
});
|
||||
it('fails closed when an old replica omits the version or the operator leaves the fence off', () => {
|
||||
expect(supportsConversationTitleOwnership(undefined)).toBe(false);
|
||||
|
|
|
|||
|
|
@ -2579,8 +2579,8 @@ export const interfaceSchema = z
|
|||
customWelcome: z.string().optional(),
|
||||
mcpServers: mcpServersSchema.optional(),
|
||||
modelSelect: z.boolean().optional(),
|
||||
/** Enable only after every API replica supports title ownership and old title jobs drain. */
|
||||
runningChatRename: z.boolean().default(false),
|
||||
/** Set to false during a rolling upgrade, until every API replica supports title ownership and old title jobs drain. */
|
||||
runningChatRename: z.boolean().default(true),
|
||||
/** Milliseconds between syntax highlights while a code block streams. */
|
||||
codeHighlightThrottleMs: z.number().int().min(0).max(60_000).default(300),
|
||||
/** Most agents the agents panel selector lists before a search term is
|
||||
|
|
@ -2828,7 +2828,7 @@ export const interfaceSchema = z
|
|||
})
|
||||
.default({
|
||||
modelSelect: true,
|
||||
runningChatRename: false,
|
||||
runningChatRename: true,
|
||||
codeHighlightThrottleMs: 300,
|
||||
agentSelectorLimit: DEFAULT_AGENT_SELECTOR_LIMIT,
|
||||
parameters: true,
|
||||
|
|
|
|||
|
|
@ -446,15 +446,16 @@ describe('loadDefaultInterface', () => {
|
|||
});
|
||||
|
||||
describe('running chat rename deployment fence', () => {
|
||||
it.each([undefined, false, true])(
|
||||
'forwards operator opt-in without enabling it by default: %s',
|
||||
async (enabled) => {
|
||||
const configDefaults = getConfigDefaults();
|
||||
const interfaceConfig = await loadDefaultInterface({
|
||||
config: { interface: enabled === undefined ? {} : { runningChatRename: enabled } },
|
||||
configDefaults,
|
||||
});
|
||||
expect(interfaceConfig?.runningChatRename).toBe(enabled === true);
|
||||
},
|
||||
);
|
||||
it.each([
|
||||
[undefined, true],
|
||||
[false, false],
|
||||
[true, true],
|
||||
])('resolves runningChatRename %s to %s', async (configured, expected) => {
|
||||
const configDefaults = getConfigDefaults();
|
||||
const interfaceConfig = await loadDefaultInterface({
|
||||
config: { interface: configured === undefined ? {} : { runningChatRename: configured } },
|
||||
configDefaults,
|
||||
});
|
||||
expect(interfaceConfig?.runningChatRename).toBe(expected);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue