mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-06-26 17:31:27 +00:00
🧾 refactor: Disable Context Cost By Default (#13768)
This commit is contained in:
parent
bf946975ca
commit
ec94437854
2 changed files with 18 additions and 3 deletions
|
|
@ -1274,7 +1274,7 @@ export const interfaceSchema = z
|
|||
runCode: true,
|
||||
webSearch: true,
|
||||
contextUsage: true,
|
||||
contextCost: true,
|
||||
contextCost: false,
|
||||
peoplePicker: {
|
||||
users: true,
|
||||
groups: true,
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ describe('loadDefaultInterface', () => {
|
|||
expect(interfaceConfig?.buildInfo).toBe(true);
|
||||
});
|
||||
|
||||
it('enables context cost by default', async () => {
|
||||
it('disables context cost by default', async () => {
|
||||
const interfaceConfig = await loadDefaultInterface({
|
||||
config: {},
|
||||
configDefaults: getConfigDefaults(),
|
||||
});
|
||||
|
||||
expect(interfaceConfig?.contextCost).toBe(true);
|
||||
expect(interfaceConfig?.contextCost).toBe(false);
|
||||
});
|
||||
|
||||
it('preserves a disabled context cost flag', async () => {
|
||||
|
|
@ -90,6 +90,21 @@ describe('loadDefaultInterface', () => {
|
|||
expect(interfaceConfig?.contextCost).toBe(false);
|
||||
});
|
||||
|
||||
it('preserves enabled context cost config', async () => {
|
||||
const config: Partial<TCustomConfig> = {
|
||||
interface: {
|
||||
contextCost: true,
|
||||
},
|
||||
};
|
||||
|
||||
const interfaceConfig = await loadDefaultInterface({
|
||||
config,
|
||||
configDefaults: getConfigDefaults(),
|
||||
});
|
||||
|
||||
expect(interfaceConfig?.contextCost).toBe(true);
|
||||
});
|
||||
|
||||
it('passes through a configured display currency', async () => {
|
||||
const config: Partial<TCustomConfig> = {
|
||||
interface: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue