Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

⛴️ fix: Keep MCP App and Speech Limits in One E2E Config

Lia04461d4cdbac
diff --git a/client/src/components/Auth/TwoFactorScreen.tsx b/client/src/components/Auth/TwoFactorScreen.tsx
index aa7ff0c74f..ffb8772aad 100644
--- a/client/src/components/Auth/TwoFactorScreen.tsx
+++ b/client/src/components/Auth/TwoFactorScreen.tsx
@@ -86,11 +86,11 @@ const TwoFactorScreen: React.FC = React.memo(() => {
return (
<div className="mt-4">
<form onSubmit={handleSubmit(onSubmit)}>
- <Label className="flex justify-center break-keep text-center text-sm text-text-primary">
+ <Label className="text-text-primary flex justify-center text-center text-sm break-keep">
{localize('com_auth_two_factor')}
</Label>
{!useBackup && (
- <div className="my-4 flex justify-center text-text-primary">
+ <div className="text-text-primary my-4 flex justify-center">
<Controller
name="token"
control={control}
@@ -117,12 +117,12 @@ const TwoFactorScreen: React.FC = React.memo(() => {
)}
/>
{errors.token && (
- <span className="text-sm text-text-destructive">{errors.token.message}</span>
+ <span className="text-text-destructive text-sm">{errors.token.message}</span>
)}
</div>
)}
{useBackup && (
- <div className="my-4 flex justify-center text-text-primary">
+ <div className="text-text-primary my-4 flex justify-center">
<Controller
name="backupCode"
control={control}
@@ -148,7 +148,7 @@ const TwoFactorScreen: React.FC = React.memo(() => {
)}
/>
{errors.backupCode && (
- <span className="text-sm text-text-destructive">{errors.backupCode.message}</span>
+ <span className="text-text-destructive text-sm">{errors.backupCode.message}</span>
)}
</div>
)}
@@ -169,7 +169,7 @@ const TwoFactorScreen: React.FC = React.memo(() => {
type="button"
variant="link"
onClick={toggleBackupOn}
- className="inline-flex p-1 text-sm font-medium text-accent-primary transition-colors hover:text-accent-primary-hover"
+ className="text-accent-primary hover:text-accent-primary-hover inline-flex p-1 text-sm font-medium transition-colors"
>
{localize('com_ui_use_backup_code')}
</Button>
@@ -178,7 +178,7 @@ const TwoFactorScreen: React.FC = React.memo(() => {
type="button"
variant="link"
onClick={toggleBackupOff}
- className="inline-flex p-1 text-sm font-medium text-accent-primary transition-colors hover:text-accent-primary-hover"
+ className="text-accent-primary hover:text-accent-primary-hover inline-flex p-1 text-sm font-medium transition-colors"
>
{localize('com_ui_use_2fa_code')}
</Button>
diff --git a/e2e/config/librechat.e2e.yaml b/e2e/config/librechat.e2e.yaml
index e78d0d9a67..c7c2454fd7 100644
--- a/e2e/config/librechat.e2e.yaml
+++ b/e2e/config/librechat.e2e.yaml
@@ -32,6 +32,16 @@ memory:
personalize: true
tokenLimit: 10000
+# Budgets that exist only here, not in the environment, so
+# yaml-rate-limits.spec.ts proves librechat.yaml reaches the limiters that route
+# modules build while loading. No other spec calls the speech routes.
+rateLimits:
+ stt:
+ userMax: 2
+ tts:
+ userMax: 2
+# __E2E_MCP_APP_RATE_LIMITS__
+
# __E2E_MCP_APP_SANDBOX__
mcpSettings:
@@ -81,8 +91,6 @@ mcpServers:
# __E2E_DYNAMIC_MCP_NETWORK_SERVERS__
# __E2E_MCP_APPS_SERVER__
-# __E2E_MCP_APP_RATE_LIMITS__
-
# Per-endpoint file upload config so both upload UXs get e2e coverage:
# - Mock Provider A keeps the legacy 3-way dropdown (chat.spec.ts exercises
# "Upload to Provider"); legacyFileUploadUX also forces llmDeliveryPath
diff --git a/e2e/playwright.config.mock.ts b/e2e/playwright.config.mock.ts
index ed427b851e..544ed50845 100644
--- a/e2e/playwright.config.mock.ts
+++ b/e2e/playwright.config.mock.ts
@@ -304,7 +304,6 @@ function writeRuntimeMockConfig() {
const mcpAppsRateLimits =
mcpAppResourceLimit != null && mcpAppToolCallLimit != null
? [
- 'rateLimits:',
' mcpApps:',
` resourcesPerMinute: ${mcpAppResourceLimit}`,
` toolCallsPerMinute: ${mcpAppToolCallLimit}`,
diff --git a/e2e/specs/mock/mcp-apps.spec.ts b/e2e/specs/mock/mcp-apps.spec.ts
index 4837513b13..25e76bd81f 100644
--- a/e2e/specs/mock/mcp-apps.spec.ts
+++ b/e2e/specs/mock/mcp-apps.spec.ts
@@ -1049,6 +1049,14 @@ test.describe('MCP Apps full integration', () => {
test('enforces independent configured resource and tool-call quotas', async ({ page }) => {
test.skip(PHASE !== 'quota');
test.setTimeout(90_000);
+ const config = fs.readFileSync(
+ path.resolve(process.cwd(), 'e2e/.generated/librechat.e2e.yaml'),
+ 'utf8',
+ );
+ expect(config.match(/^rateLimits:/gm)).toHaveLength(1);
+ expect(config).toContain(
+ 'rateLimits:\n stt:\n userMax: 2\n tts:\n userMax: 2\n mcpApps:\n resourcesPerMinute: 2\n toolCallsPerMinute: 2',
+ );
await resetEvents(page);
await page.goto(NEW_CHAT_PATH, { timeout: 15_000 });
const token = await getAccessToken(page);