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

🧪 ci: Isolate `auth.tenant` Spec From a Local `librechat.yaml` (#17642)

JOJOfba013c42e35
diff --git a/api/server/routes/__tests__/auth.tenant.spec.js b/api/server/routes/__tests__/auth.tenant.spec.js
index 31b8ba02fd..3e1f405ff4 100644
--- a/api/server/routes/__tests__/auth.tenant.spec.js
+++ b/api/server/routes/__tests__/auth.tenant.spec.js
@@ -1,3 +1,4 @@
+const path = require('path');
const { MongoMemoryServer } = require('mongodb-memory-server');
let express;
@@ -31,6 +32,10 @@ describe.each([false, true])('pre-auth tenant routes (strict=%s)', (strictMode)
process.env.DOMAIN_CLIENT = 'http://localhost:3080';
process.env.DOMAIN_SERVER = 'http://localhost:3080';
process.env.TENANT_ISOLATION_STRICT = String(strictMode);
+ // Login reaches getAppConfig through the balance middleware; without this, a local (gitignored)
+ // librechat.yaml at the repository root is loaded, and an unresolved `${VAR}` MCP URL in it
+ // turns every authenticated login into a 500.
+ process.env.CONFIG_PATH = path.join(__dirname, 'missing-librechat.yaml');
jest.resetModules();
express = require('express');
request = require('supertest');