Repository Analysis

danny-avila/LibreChat

Enhanced ChatGPT Clone: Features Agents, MCP, 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.

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-05-30
Last Push
37,676
Stars
TypeScript
Language
637,758
Lines of Code
2989
Files
688
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 7HIGH 0MEDIUM 80LOW 601

Pattern Findings

688 matches across 10 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers333 hits · 338 pts
SeverityFileLineSnippet
LOWconfig/migrate-orphaned-agent-files.js28async function migrateOrphanedAgentFiles({ dryRun = true, batchSize = 100 } = {}) {
LOWconfig/migrate-agent-permissions.js23async function migrateAgentPermissionsEnhanced({ dryRun = true, batchSize = 100 } = {}) {
LOWconfig/migrate-prompt-permissions.js16async function getGlobalProjectPromptGroupIds(db) {
LOWconfig/migrate-prompt-permissions.js23async function migrateToPromptGroupPermissions({ dryRun = true, batchSize = 100 } = {}) {
LOWconfig/translations/instructions.ts14function generateMarkdownFromObject(obj: object, depth = 0): string {
LOWconfig/translations/instructions.ts60async function createPromptsForTranslations() {
LOWutils/update_env.py42def update_env_file_with_local_env(input_file_path, output_file_path):
LOWpackages/data-schemas/src/methods/systemGrant.ts65 async function hasCapabilityForPrincipals({
LOWpackages/data-schemas/src/methods/systemGrant.ts264 async function getCapabilitiesForPrincipal({
LOWpackages/data-schemas/src/methods/systemGrant.ts321 async function getCapabilitiesForPrincipals({
LOWpackages/data-schemas/src/methods/mcpServer.ts35function generateServerNameFromTitle(title: string): string {
LOWpackages/data-schemas/src/methods/mcpServer.ts52 async function findNextAvailableServerName(
LOWpackages/data-schemas/src/methods/mcpServer.ts153 async function findMCPServerByServerName(serverName: string): Promise<MCPServerDocument | null> {
LOWpackages/data-schemas/src/methods/prompt.ts192 async function getListPromptGroupsByAccess({
LOWpackages/data-schemas/src/methods/prompt.ts308 async function incrementPromptGroupUsage(groupId: string) {
LOWpackages/data-schemas/src/methods/prompt.ts485 async function getPromptGroupsWithPrompts(filter: Record<string, unknown>) {
LOWpackages/data-schemas/src/methods/agent.ts201async function generateActionMetadataHash(
LOWpackages/data-schemas/src/methods/agent.ts285 async function hasAgentWithMCPServerName({
LOWpackages/data-schemas/src/methods/agent.ts305 async function getMCPServerNamesByAgentIds(agentIds: Types.ObjectId[]): Promise<string[]> {
LOWpackages/data-schemas/src/methods/agent.ts543 async function removeAgentResourceFilesFromAllAgents({
LOWpackages/data-schemas/src/methods/agent.ts849 async function removeAgentFromUserFavorites(
LOWpackages/data-schemas/src/methods/agentCategory.ts5export function createAgentCategoryMethods(mongoose: typeof import('mongoose')) {
LOWpackages/data-schemas/src/methods/conversationTag.ts15export function createConversationTagMethods(mongoose: typeof import('mongoose')) {
LOWpackages/data-schemas/src/methods/conversationTag.ts191 async function updateTagsForConversation(user: string, conversationId: string, tags: string[]) {
LOWpackages/data-schemas/src/methods/aclEntry.ts121 async function findEntriesByPrincipalsAndResource(
LOWpackages/data-schemas/src/methods/aclEntry.ts216 async function getEffectivePermissionsForResources(
LOWpackages/data-schemas/src/methods/transaction.ts95 function calculateStructuredTokenValue(txn: InternalTxDoc) {
LOWpackages/data-schemas/src/methods/transaction.ts268 async function createAutoRefillTransaction(txData: TxData) {
LOWpackages/data-schemas/src/methods/transaction.ts335 async function createStructuredTransaction(
LOWpackages/data-schemas/src/methods/agent.spec.ts3632function mockFindOneAndUpdateError(errorOnCall = 1) {
LOWpackages/data-schemas/src/methods/conversation.ts63export function createConversationMethods(
LOWpackages/data-schemas/src/methods/conversation.ts74 function getVisibleConversationRetentionFilter(): FilterQuery<IConversation> {
LOWpackages/data-schemas/src/methods/conversation.ts128 async function deleteNullOrEmptyConversations() {
LOWpackages/data-schemas/src/methods/userGroup.ts500 function transformUserToTPrincipalSearchResult(user: TUser): TPrincipalSearchResult {
LOWpackages/data-schemas/src/methods/userGroup.ts519 function transformGroupToTPrincipalSearchResult(group: IGroup): TPrincipalSearchResult {
LOWpackages/data-schemas/src/methods/skill.ts179export function validateSkillDisplayTitle(displayTitle: unknown): ValidationIssue[] {
LOWpackages/data-schemas/src/methods/skill.ts502export function deriveStructuredFrontmatterFields(
LOWpackages/data-schemas/src/methods/skill.ts687function extractAlwaysApplyFromBody(body: string | undefined): BodyAlwaysApplyResult {
LOWpackages/data-schemas/src/methods/skill.ts757function resolveAlwaysApplyFromInput(
LOWpackages/data-schemas/src/methods/skill.ts790export function validateAlwaysApplyInBody(body: string | undefined): ValidationIssue[] {
LOWpackages/data-schemas/src/methods/skill.ts1381 async function bumpSkillVersionAndAdjustFileCount(
LOWpackages/data-schemas/src/methods/skill.ts1493 async function updateSkillFileCodeEnvIds(
LOWpackages/data-schemas/src/config/parsers.ts27function getMatchingSensitivePatterns(valueStr: string): RegExp[] {
LOWpackages/data-schemas/src/utils/tempChatRetention.ts24export function getTempChatRetentionHours(
LOWpackages/data-schemas/src/utils/tempChatRetention.ts74export function createTempChatExpirationDate(interfaceConfig?: AppConfig['interfaceConfig']): Date {
LOWpackages/data-schemas/src/models/conversationTag.ts4export function createConversationTagModel(mongoose: typeof import('mongoose')) {
LOWpackages/api/src/middleware/share.ts89export function createSharePolicyMiddleware({ getRoleByName, hasCapability }: SharePolicyDeps): {
LOWpackages/api/src/middleware/share.ts141 async function hasResourceManagementCapability(
LOWpackages/api/src/middleware/capabilities.ts63export function capabilityContextMiddleware(
LOWpackages/api/src/middleware/concurrency.ts103export async function checkAndIncrementPendingRequest(
LOWpackages/api/src/middleware/remoteAgentAuth.ts59export function clearRemoteAgentAuthCache(): void {
LOWpackages/api/src/middleware/remoteAgentAuth.ts131function ensureRemoteOidcUrlAllowed(value: string, label: string): string {
LOWpackages/api/src/middleware/remoteAgentAuth.ts254function isResolvedUserConfigScope(initialOptions: GetAppConfigOptions, user: IUser): boolean {
LOWpackages/api/src/middleware/remoteAgentAuth.ts287async function enforceApiKeyTenantPolicy(
LOWpackages/api/src/middleware/tenant.ts208async function rejectRequestWithUploadCleanup(
LOWpackages/api/src/middleware/tenant.ts217function rejectRequestWithUploadCleanupInContext(
LOWpackages/api/src/middleware/tenant.ts237export function restoreTenantContextFromReq(
LOWpackages/api/src/tools/classification.ts56export function buildToolRegistryFromAgentOptions(
LOWpackages/api/src/tools/classification.ts215export function agentHasProgrammaticTools(toolRegistry: LCToolRegistry): boolean {
LOWpackages/api/src/tools/toolkits/web.ts26export function buildWebSearchDynamicContext(now?: string | number | Date): string {
273 more matches not shown…
Decorative Section Separators66 hits · 202 pts
SeverityFileLineSnippet
MEDIUMlibrechat.example.yaml396 # # ============================================================================
MEDIUMlibrechat.example.yaml399 # # ============================================================================
MEDIUMconfig/test-subdirectory-setup.sh2# =============================================================================
MEDIUMconfig/test-subdirectory-setup.sh21# =============================================================================
MEDIUM…ta-schemas/misc/ferretdb/multiTenancy.ferretdb.spec.ts225 // ─── PHASE 1: DATABASE-PER-ORG SCHEMA MAPPING ────────────────────────────
MEDIUM…ta-schemas/misc/ferretdb/multiTenancy.ferretdb.spec.ts290 // ─── PHASE 2: INDEX INITIALIZATION ────────────────────────────────────────
MEDIUM…ta-schemas/misc/ferretdb/multiTenancy.ferretdb.spec.ts378 // ─── PHASE 3: SCALING CURVE ───────────────────────────────────────────────
MEDIUM…ta-schemas/misc/ferretdb/multiTenancy.ferretdb.spec.ts508 // ─── PHASE 4: WRITE AMPLIFICATION ────────────────────────────────────────
MEDIUM…ta-schemas/misc/ferretdb/multiTenancy.ferretdb.spec.ts578 // ─── PHASE 5: SHARED-COLLECTION ALTERNATIVE ──────────────────────────────
MEDIUM…s/data-schemas/misc/ferretdb/sharding.ferretdb.spec.ts56// ─── TYPES ──────────────────────────────────────────────────────────────────
MEDIUM…s/data-schemas/misc/ferretdb/sharding.ferretdb.spec.ts70// ─── ALL 29 LIBRECHAT SCHEMAS ───────────────────────────────────────────────
MEDIUM…s/data-schemas/misc/ferretdb/sharding.ferretdb.spec.ts106// ─── TENANT ROUTER (INLINE POC) ────────────────────────────────────────────
MEDIUM…s/data-schemas/misc/ferretdb/sharding.ferretdb.spec.ts306// ─── TESTS ──────────────────────────────────────────────────────────────────
MEDIUM…a-schemas/misc/ferretdb/orgOperations.ferretdb.spec.ts93// ─── BACKUP/RESTORE UTILITIES ───────────────────────────────────────────────
MEDIUM…a-schemas/misc/ferretdb/orgOperations.ferretdb.spec.ts136// ─── MIGRATION UTILITIES ────────────────────────────────────────────────────
MEDIUM…a-schemas/misc/ferretdb/orgOperations.ferretdb.spec.ts198// ─── TESTS ──────────────────────────────────────────────────────────────────
MEDIUM…a-schemas/misc/ferretdb/orgOperations.ferretdb.spec.ts219 // ─── RETRY UTILITY ──────────────────────────────────────────────────────
MEDIUM…a-schemas/misc/ferretdb/orgOperations.ferretdb.spec.ts307 // ─── REAL DEADLOCK RETRY ────────────────────────────────────────────────
MEDIUM…a-schemas/misc/ferretdb/orgOperations.ferretdb.spec.ts337 // ─── BACKUP/RESTORE ─────────────────────────────────────────────────────
MEDIUM…a-schemas/misc/ferretdb/orgOperations.ferretdb.spec.ts538 // ─── SCHEMA MIGRATION ──────────────────────────────────────────────────
MEDIUMpackages/api/src/app/service.ts15// ── Types ────────────────────────────────────────────────────────────
MEDIUMpackages/api/src/app/service.ts60// ── Helpers ──────────────────────────────────────────────────────────
MEDIUMpackages/api/src/app/service.ts89// ── Service factory ──────────────────────────────────────────────────
MEDIUMpackages/api/src/admin/config.handler.spec.ts617 // ── Invariant tests: rules that must hold across ALL handlers ──────
MEDIUMpackages/api/src/admin/config.ts117// ── Validation helpers ───────────────────────────────────────────────
MEDIUMpackages/api/src/admin/config.ts158// ── Handler factory ──────────────────────────────────────────────────
MEDIUM…/agents/responses/__tests__/responses-api.live.test.sh23# ── Helpers ───────────────────────────────────────────────────────────
MEDIUM…/agents/responses/__tests__/responses-api.live.test.sh80# ── Test 1: Basic single-turn request ─────────────────────────────────
MEDIUM…/agents/responses/__tests__/responses-api.live.test.sh91# ── Test 2: Multi-turn with output_text assistant blocks ──────────────
MEDIUM…/agents/responses/__tests__/responses-api.live.test.sh118# ── Test 3: Multi-turn with refusal blocks ────────────────────────────
MEDIUM…/agents/responses/__tests__/responses-api.live.test.sh145# ── Test 4: Streaming request ─────────────────────────────────────────
MEDIUM…/agents/responses/__tests__/responses-api.live.test.sh156# ── Test 5: Back-and-forth using previous_response_id ─────────────────
MEDIUM…/agents/responses/__tests__/responses-api.live.test.sh185# ── Summary ───────────────────────────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts5 // ── String input shorthand ─────────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts11 // ── Empty input array ──────────────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts17 // ── Role mapping ───────────────────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts49 // ── input_text content blocks ──────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts62 // ── output_text content blocks (the original bug) ──────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts77 // ── refusal content blocks ─────────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts92 // ── input_image content blocks ─────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts117 // ── input_file content blocks ──────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts146 // ── Null / undefined filtering ─────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts159 // ── Missing text field defaults to empty string ────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts196 // ── Unknown block types are filtered out ───────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts212 // ── Mixed valid/invalid content in same array ──────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts238 // ── Non-array, non-string content defaults to empty string ─────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts245 // ── Function call items ────────────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts272 // ── Function call output items ─────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts291 // ── Item references are skipped ────────────────────────────────────
MEDIUM…ges/api/src/agents/responses/__tests__/service.test.ts301 // ── Multi-turn conversation (the real-world scenario) ──────────────
MEDIUM.github/workflows/gitnexus-deploy.yml387 # ── Step 1: prune FIRST ────────────────────────────────
MEDIUM.github/workflows/gitnexus-deploy.yml413 # ── Step 2: rsync-then-swap ─────────────────────────────
MEDIUM.github/workflows/gitnexus-deploy.yml461 # ── Disk cleanup ──────────────────────────────────────
MEDIUMapi/server/middleware/__tests__/requireJwtAuth.spec.js13// ── Mocks ──────────────────────────────────────────────────────────────
MEDIUMapi/server/middleware/__tests__/requireJwtAuth.spec.js84// ── Helpers ─────────────────────────────────────────────────────────────
MEDIUMapi/server/middleware/__tests__/requireJwtAuth.spec.js116// ── Tests ──────────────────────────────────────────────────────────────
MEDIUM…rvices/Config/__tests__/invalidateConfigCaches.spec.js1// ── Mocks ──────────────────────────────────────────────────────────────
MEDIUM…rvices/Config/__tests__/invalidateConfigCaches.spec.js42// ── Tests ──────────────────────────────────────────────────────────────
MEDIUM…c/utils/__tests__/applyModelSpecEphemeralAgent.test.ts44 // ─── New Conversations ─────────────────────────────────────────────
MEDIUM…c/utils/__tests__/applyModelSpecEphemeralAgent.test.ts123 // ─── Existing Conversations: Per-Conversation Persistence ──────────
6 more matches not shown…
Fake / Example Data132 hits · 130 pts
SeverityFileLineSnippet
LOWpackages/data-schemas/src/methods/prompt.spec.ts142 email: 'admin@example.com',
LOWpackages/data-schemas/src/methods/user.methods.spec.ts433 { name: 'John Doe', email: 'john@example.com', username: 'johnd', provider: 'local' },
LOWpackages/data-schemas/src/methods/user.methods.spec.ts612 email: 'user@example.com',
LOWpackages/data-schemas/src/methods/user.methods.spec.ts662 name: 'John Doe',
LOWpackages/data-schemas/src/methods/user.methods.spec.ts678 expect(found?.name).toBe('John Doe');
LOWpackages/data-schemas/src/methods/file.acl.spec.ts84 email: 'user@example.com',
LOWpackages/data-schemas/src/methods/file.acl.spec.ts234 email: 'user@example.com',
LOWpackages/data-schemas/src/methods/file.acl.spec.ts297 email: 'user@example.com',
LOWpackages/api/src/middleware/remoteAgentAuth.spec.ts1308 expect(await captureEmailArg({ sub: 's1', email: 'user@example.com' })).toBe(
LOWpackages/api/src/middleware/remoteAgentAuth.spec.ts1309 'user@example.com',
LOWpackages/api/src/middleware/remoteAgentAuth.spec.ts1339 email: 'user@example.com',
LOWpackages/api/src/auth/domain.spec.ts95 const email = 'user@example.com';
LOWpackages/api/src/auth/refresh.spec.ts28 email: 'admin@example.com',
LOWpackages/api/src/auth/refresh.spec.ts137 email: 'admin@example.com',
LOWpackages/api/src/auth/refresh.spec.ts167 expect(result.user.email).toBe('admin@example.com');
LOWpackages/api/src/auth/refresh.spec.ts638 expect(logger.debug).toHaveBeenCalledWith(expect.stringContaining('admin@example.com'));
LOWpackages/api/src/auth/exchange.spec.ts21 email: 'admin@example.com',
LOWpackages/api/src/auth/exchange.spec.ts50 expect(result!.user.email).toBe('admin@example.com');
LOWpackages/api/src/auth/openid.spec.ts312 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts322 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts330 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts699 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts704 expect(mockFindUser).toHaveBeenCalledWith({ email: 'user@example.com' });
LOWpackages/api/src/auth/openid.spec.ts713 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts752 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts761 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts765 expect(mockFindUser).toHaveBeenCalledWith({ email: 'user@example.com' });
LOWpackages/api/src/auth/openid.spec.ts967 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts976 expect(getOpenIdEmail({ email: 'user@example.com' }, 'remoteAgentAuth')).toBe(
LOWpackages/api/src/auth/openid.spec.ts977 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts987 expect(getOpenIdEmail({ email: 'user@example.com', groups: ['a'] })).toBe('user@example.com');
LOWpackages/api/src/auth/openid.spec.ts98 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts108 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts128 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts163 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts174 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts195 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts205 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts225 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts258 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts292 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts296 expect(mockFindUser).toHaveBeenCalledWith({ email: 'user@example.com' });
LOWpackages/api/src/auth/openid.spec.ts348 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts386 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts398 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts413 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts423 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts439 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts449 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts465 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts475 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts491 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts501 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts516 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts529 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts547 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts557 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts577 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts587 email: 'user@example.com',
LOWpackages/api/src/auth/openid.spec.ts601 email: 'user@example.com',
72 more matches not shown…
Verbosity Indicators47 hits · 84 pts
SeverityFileLineSnippet
LOWconfig/smart-reinstall.js143 // Step 1: Dependencies
LOWconfig/smart-reinstall.js163 // Step 2: Build via Turborepo
LOWpackages/api/src/utils/oidc.spec.ts414 // Step 1: Extract token info
LOWpackages/api/src/utils/oidc.spec.ts418 // Step 2: Validate token
LOWpackages/api/src/utils/oidc.spec.ts422 // Step 3: Process placeholders
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts967 // Step 1: preProcessGraphTokens resolves graph token placeholders (async)
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts973 // Step 2: processMCPEnv resolves user and env placeholders (sync)
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1005 // Step 1: preProcessGraphTokens
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1011 // Step 2: processMCPEnv
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1045 // Step 1: preProcessGraphTokens
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1051 // Step 2: processMCPEnv with customUserVars
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1078 // Step 1: preProcessGraphTokens (no-op since no graph placeholders)
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1084 // Step 2: processMCPEnv
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1117 // Step 1: preProcessGraphTokens
LOWpackages/api/src/mcp/__tests__/mcp.spec.ts1123 // Step 2: processMCPEnv
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts391 // Step 1: Get initial tokens
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts405 // Step 2: Store tokens with valid expiry first
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts413 // Step 3: Verify tokens work
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts422 // Step 4: Simulate token expiry by directly updating the stored token's expiresAt
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts425 // Step 5: Revoke refresh token on server side (simulating server-side revocation)
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts428 // Step 6: Try to get tokens — refresh should fail, return null
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts455 // Step 7: Simulate the re-auth flow via FlowStateManager
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts471 // Step 8: Get a new auth code and exchange for tokens (simulating user re-auth)
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts485 // Step 9: Complete the flow
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts493 // Step 10: Store the new tokens
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts503 // Step 11: Verify new tokens work
LOW…ages/api/src/mcp/__tests__/MCPOAuthTokenExpiry.test.ts512 // Step 12: Verify new token works against server
LOW…er/controllers/agents/__tests__/jobReplacement.spec.js233 // Step 1: Save message
LOW…er/controllers/agents/__tests__/jobReplacement.spec.js236 // Step 2: Check for replacement
LOW…er/controllers/agents/__tests__/jobReplacement.spec.js240 // Step 3: Emit if not replaced
LOWapi/server/services/PermissionService.js489 // Step 1: Get all group IDs user should be member of
LOWapi/server/services/PermissionService.js517 // Step 2: Try to add user to existing groups (fast operation)
LOWapi/server/services/PermissionService.js532 // Step 3: Find which groups don't exist in DB using db layer
LOWapi/server/services/PermissionService.js543 // Step 4: Fetch details only for missing groups (optimized batch request)
LOWapi/server/services/PermissionService.js555 // Step 5: Upsert missing groups (race-safe by design)
LOWapi/server/services/PermissionService.js572 // Step 6: Add user to all newly created/upserted groups
LOWapi/server/services/PermissionService.js597 // Step 7: Remove user from Entra groups they're no longer member of
LOWclient/src/utils/__tests__/citations.test.ts200 // Step 1: Extract highlighted spans
LOWclient/src/utils/__tests__/citations.test.ts209 // Step 2: Extract composite blocks
LOWclient/src/utils/__tests__/citations.test.ts224 // Step 3: Extract standalone citations (not in composites)
LOWclient/src/utils/__tests__/citations.test.ts241 // Step 4: Clean up text
LOWclient/src/hooks/Messages/useCopyToClipboard.ts130 // Step 1: Process highlighted text first (simplify by just making it bold in markdown)
LOWclient/src/hooks/Messages/useCopyToClipboard.ts136 // Step 2: Find all standalone citations and composite citation blocks
LOWclient/src/hooks/Messages/useCopyToClipboard.ts185 // Step 3: Process each citation and build the reference mapping
LOWclient/src/hooks/Messages/useCopyToClipboard.ts325 // Step 4: Apply all replacements (from longest to shortest to avoid nested replacement issues)
LOWclient/src/hooks/Messages/useCopyToClipboard.ts331 // Step 5: Remove any orphaned composite blocks at the end of the text
LOWclient/src/hooks/Messages/useCopyToClipboard.ts335 // Step 6: Clean up any remaining citation markers
Hallucination Indicators7 hits · 75 pts
SeverityFileLineSnippet
CRITICALpackages/api/src/app/service.spec.ts264 const setCalls = deps._cache.set.mock.calls.filter(
CRITICALapi/server/services/Threads/manage.js413 promises.push(openai.beta.threads.runs.steps.list(run_id, { thread_id }));
CRITICALapi/server/services/Runs/handle.js182 const runSteps = await openai.beta.threads.runs.steps.list(run_id, { thread_id });
CRITICALapi/server/services/Runs/RunManager.js94 // const { data: steps, first_id, last_id, has_more } = await openai.beta.threads.runs.steps.list(run_id, { thread_i
CRITICALapi/server/services/Runs/RunManager.js95 const { data: _steps } = await openai.beta.threads.runs.steps.list(
CRITICALapi/server/services/Runs/StreamRunManager.js172 const streamRun = this.openai.beta.threads.runs.createAndStream(
CRITICALapi/server/services/Runs/StreamRunManager.js575 toolRun = this.openai.beta.threads.runs.submitToolOutputsStream(
Over-Commented Block73 hits · 65 pts
SeverityFileLineSnippet
LOWlibrechat.example.yaml1# For more information, see the Configuration Guide:
LOWlibrechat.example.yaml21# Available strategies: "local", "s3", "firebase", "azure_blob", "cloudfront"
LOWlibrechat.example.yaml41# # /a/... tenant-visible avatars, tenant-scoped when tenantId is present
LOWlibrechat.example.yaml141 # Remote Agents configuration
LOWlibrechat.example.yaml161 # de-DE: 'Ich verstehe und möchte fortfahren' # You can narrow translation to regions like (de-DE or de-CH)
LOWlibrechat.example.yaml181#turnstile:
LOWlibrechat.example.yaml201
LOWlibrechat.example.yaml221# url: ''
LOWlibrechat.example.yaml241# public destination not also listed.
LOWlibrechat.example.yaml261 # private IP, the exemption follows. Only list hostnames whose DNS you control.
LOWlibrechat.example.yaml281# - 'localhost:11434'
LOWlibrechat.example.yaml301# # Hostname/IP + port pairs listed here bypass the default-deny block for that
LOWlibrechat.example.yaml321# args:
LOWlibrechat.example.yaml341endpoints:
LOWlibrechat.example.yaml361 # disableBuilder: false
LOWlibrechat.example.yaml381 # # This is similar to Azure OpenAI but for Anthropic models on Google Cloud
LOWlibrechat.example.yaml401 # # Option 1: Simple array (legacy format - model name = deployment name)
LOWlibrechat.example.yaml421 # claude-3.7-sonnet:
LOWlibrechat.example.yaml481 # Summary Model: Specify the model to use if summarization is enabled.
LOWlibrechat.example.yaml541 summarize: false
LOWlibrechat.example.yaml561 # "us.anthropic.claude-sonnet-4-6": "${BEDROCK_INFERENCE_PROFILE_CLAUDE_SONNET}"
LOWlibrechat.example.yaml581# The 'groupIcon' field sets an icon for custom groups:
LOWlibrechat.example.yaml601# endpoint: "groq"
LOWlibrechat.example.yaml621# preset:
LOWlibrechat.example.yaml641# preset:
LOWlibrechat.example.yaml661# serverFileSizeLimit: 100 # Global server file size limit in MB
LOWlibrechat.example.yaml681# cohereApiKey: '${COHERE_API_KEY}'
LOWlibrechat.example.yaml701# searchDepth: basic # 'basic', 'advanced', 'fast', or 'ultra-fast' (default: basic)
LOWlibrechat.example.yaml721# # format: markdown # 'markdown' (default) or 'text' (plain text, may increase latency)
LOWlibrechat.example.yaml741# id: "your-memory-agent-id"
LOWconfig/test-subdirectory-setup.sh1#!/usr/bin/env bash
LOW.do/gitnexus/docker-compose.yml1# GitNexus stack for the DigitalOcean droplet.
LOW.do/gitnexus/entrypoint.sh1#!/bin/sh
LOWpackages/api/src/stream/GenerationJobManager.ts561 // Abort the controller to signal all pending operations (e.g., OAuth flow monitors)
LOW…/agents/responses/__tests__/responses-api.live.test.sh1#!/usr/bin/env bash
LOWpackages/api/src/mcp/parsers.ts21
LOWpackages/data-provider/src/artifacts.ts3101 // badge: badge,
LOW.github/playwright.yml1# name: Playwright Tests
LOW.github/playwright.yml21# CI: true
LOW.github/playwright.yml41# with:
LOW.github/playwright.yml61# npx playwright install chromium
LOW.github/workflows/gitnexus-pr-command.yml1# Responds to `/gitnexus index` comments on pull requests.
LOW.github/workflows/gitnexus-deploy.yml1# Deploys GitNexus indexes to a droplet via SSH + rsync.
LOW.github/workflows/gitnexus-deploy.yml21# curl -fsSL https://get.docker.com | sh
LOW.github/workflows/gitnexus-deploy.yml61 description: 'Optional PR number to post completion comment on (set by bot-triggered dispatches from gitnexus-in
LOW.github/workflows/gitnexus-deploy.yml161 pull-requests: write # post deploy-complete comments on served PR indexes
LOW.github/workflows/gitnexus-deploy.yml341 # secret is populated from `ssh-keyscan -H <host>` at bootstrap.
LOW.github/workflows/gitnexus-deploy.yml461 # ── Disk cleanup ──────────────────────────────────────
LOWapi/app/clients/tools/structured/Wolfram.js21 this.override = fields.override ?? false;
LOWapi/app/clients/tools/structured/Wolfram.js41 // - Convert inputs to simplified keyword queries whenever possible (e.g. convert "how many people live in France" t
LOWapi/app/clients/tools/structured/DALLE3.js101 `// Whenever a description of an image is given, generate prompts (following these rules), and use dalle to create
LOWapi/server/controllers/agents/client.js981 // if (noSystemMessages === true && systemContent?.length) {
LOWapi/server/services/PluginService.js61// const encryptedValue = encrypt(value);
LOWapi/server/services/Endpoints/agents/initialize.js481 }
LOWapi/server/services/__tests__/ToolService.spec.js901
LOWclient/src/utils/files.ts81 // 'application/json':,
LOW…nt/src/components/Auth/__tests__/Registration.spec.tsx161// const { getByTestId, getByRole, history } = setup({
LOW…c/components/SidePanel/Agents/ActionsTable/Columns.tsx41 header: 'Path',
LOW…/components/SidePanel/Builder/ActionsTable/Columns.tsx41 header: 'Path',
LOWclient/src/hooks/Chat/useChatHelpers.ts61 // const setConversation = useCallback(
13 more matches not shown…
Redundant / Tautological Comments14 hits · 21 pts
SeverityFileLineSnippet
LOWredis-config/stop-cluster.sh22 # Check if still running and force kill if needed
LOWredis-config/start-redis-tls.sh6# Check if Redis is already running
LOWredis-config/start-cluster.sh17# Check if Redis is installed
LOWredis-config/start-cluster.sh26# Check if Redis CLI is available
LOWredis-config/start-cluster.sh40# Check if all nodes are running
LOWredis-config/start-cluster.sh57# Check if cluster is already initialized
LOWutils/update_env.py58 # Check if the environment variable is set in the local environment
LOWpackages/data-provider/check_updates.sh33 # Check if this date is within the last three days
LOW.github/workflows/i18n-unused-keys.yml36 # Check if translation file exists
LOW.github/workflows/i18n-unused-keys.yml48 # Check if each key is used in the source code
LOW.github/workflows/i18n-unused-keys.yml54 # Check if TSpecialVarLabel is used in the codebase
LOW.github/workflows/i18n-unused-keys.yml73 # Check if agent category localization is being used
LOW.github/workflows/i18n-unused-keys.yml111 # Output results
LOWclient/check_updates.sh32 # Check if this date is within the last three days
Slop Phrases7 hits · 20 pts
SeverityFileLineSnippet
MEDIUMlibrechat.example.yaml455 # For `apiKey` and `baseURL`, you can use environment variables that you define.
MEDIUMlibrechat.example.yaml497 # For `apiKey` and `baseURL`, you can use environment variables that you define.
MEDIUMlibrechat.example.yaml514 # For `apiKey` and `baseURL`, you can use environment variables that you define.
MEDIUMapi/server/utils/import/__data__/chatgpt-export.json1127 "To find the point where all intervals intersect, you need to determine the common overlap region among al
MEDIUMclient/src/mobile.css128 /* More styling for demonstration purposes */
MEDIUMhelm/librechat-rag-api/values.yaml30 # postgres-password is needed to enable pgvector extension. If you enable it manually you can use "password" and use
MEDIUMhelm/librechat/examples/dns-configuration.yaml37# Note: For simple host-to-IP mappings, you can also use hostAliases
AI Slop Vocabulary7 hits · 16 pts
SeverityFileLineSnippet
MEDIUMlibrechat.example.yaml571 # # - "enabled_full": Include comprehensive trace details (recommended for debugging)
MEDIUMpackages/api/src/tools/toolkits/web.ts6**Execute immediately without preface.** After search, provide a brief summary addressing the query directly, then struc
MEDIUM…tests__/RedisEventTransport.stream_integration.spec.ts901 // Poll for the fire-and-forget DEL to complete (robust under CI load)
MEDIUMapi/server/utils/import/__data__/chatgpt-export.json606 "result": "# \u30100\u20202014 Volkswagen Transporter MPG - Actual MPG from 14 2014 ... - Fuelly\u2020www.fu
MEDIUMapi/server/utils/import/__data__/chatgpt-export.json783 "text": "# \u30100\u20202014 Volkswagen Transporter MPG - Actual MPG from 14 2014 ... - Fuelly\u2020ww
MEDIUMapi/server/utils/import/__data__/chatgpt-citations.json20 "result": "# 【0†Signal Sciences - Crunchbase Company Profile & Funding†www.crunchbase.com】\nFounded Date Mar
MEDIUMapi/server/utils/import/__data__/chatgpt-citations.json199 "text": "# 【0†Signal Sciences - Crunchbase Company Profile & Funding†www.crunchbase.com】\nFounded Date
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippet
LOWconfig/test-subdirectory-setup.sh10# Usage:
LOW…/agents/responses/__tests__/responses-api.live.test.sh7# Usage: