LibreChat/api/server/controllers/agents
Danny Avila 5c69d1f7fa 🩹 fix: define appConfig in Responses API createResponse
responses.js referenced `appConfig` on lines 381 / 396 without ever
declaring it, so `createResponse` threw `ReferenceError: appConfig is
not defined` the moment it entered the skills-capability block. The
existing `recordCollectedUsage` unit tests silently stopped running
(try/catch swallowed the error into `logger.error`), so CI showed
6 assertions failing with "Expected calls: 1, Received: 0" — the
function never reached the recorder.

Mirror initialize.js: seed `appConfig = req.config` at the top of the
try block, before the `enabledCapabilities` Set it feeds into. The two
later `appConfig: req.config` call-sites keep the direct reference —
only the lexical reads needed a binding.

This failure already exists on origin/feat/agent-skills (the same 6
tests fail there with the same stack) but blocks our branch too since
we're rebased on top, so fix it here and cherry-pick back if needed.
2026-04-25 04:02:01 -04:00
..
__tests__ 📍 feat: always-apply frontmatter: auto-prime skills every turn (#12746) 2026-04-25 04:02:00 -04:00
callbacks.js ⚙️ feat: Skill runtime integration: catalog, tools, execution, file priming (#12649) 2026-04-25 04:02:00 -04:00
client.js 📍 feat: always-apply frontmatter: auto-prime skills every turn (#12746) 2026-04-25 04:02:00 -04:00
client.test.js 🏗️ feat: 3-Tier MCP Server Architecture with Config-Source Lazy Init (#12435) 2026-03-28 10:36:43 -04:00
errors.js 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-21 14:28:53 -04:00
filterAuthorizedTools.spec.js 🏗️ refactor: Remove Redundant Caching, Migrate Config Services to TypeScript (#12466) 2026-03-30 16:49:48 -04:00
openai.js 📍 feat: always-apply frontmatter: auto-prime skills every turn (#12746) 2026-04-25 04:02:00 -04:00
recordCollectedUsage.spec.js 🪢 chore: Consolidate Pricing and Tx Imports After tx.js Module Removal (#12086) 2026-03-21 14:28:53 -04:00
request.js 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-21 14:28:53 -04:00
responses.js 🩹 fix: define appConfig in Responses API createResponse 2026-04-25 04:02:01 -04:00
v1.js 🧹 fix: Clean Up Orphaned Agent File Stubs After Deletion (#12781) 2026-04-22 11:35:48 -07:00
v1.spec.js 🧹 fix: Clean Up Orphaned Agent File Stubs After Deletion (#12781) 2026-04-22 11:35:48 -07:00