mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-19 06:23:32 +00:00
* 🧷 fix: Close Only Scheduled MCP Authority at Request Cleanup resolveScheduledMCPBearerConfig runs on every MCPManager.callTool, and it threw ScheduledMCPBearerError('binding_mismatch') whenever the request context had started cleanup, before checking whether the context was scheduled at all. A detached subagent keeps its parent turn's MCP request context; once the parent turn ended, every pooled MCP call from the child threw that error, and with no scheduled identity bound the receipt recorder fenced it as "Scheduled generation is no longer current." Unscheduled contexts now return the declared config before the cleanup check, as pooled calls did before #16699. A scheduled context still denies after cleanup (scopes are never cleared), quiesce stays unconditional, and request-scoped servers still refuse a closed context at connection checkout. * 🧪 test: Cover Pooled Connection Creation After Request Cleanup The pooled-call integration test made its first call before cleanup, so it only reached the resolver on connection reuse (MCPManager.callTool). A detached child's first call to a server its parent never used, or a call after idle eviction, creates the pooled connection instead (UserConnectionManager -> MCPConnectionFactory). The new case cleans the context first and then makes the first pooled call, so a cleanup check added at either creation site now fails CI. The resolver comment now says why the early return is safe for every unscheduled context: request-scoped checkout refuses a closed context. |
||
|---|---|---|
| .. | ||
| openapi | ||
| src | ||
| types | ||
| .gitignore | ||
| babel.config.cjs | ||
| jest.config.mjs | ||
| jest.setup.cjs | ||
| package.json | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsconfig.openapi.json | ||
| tsconfig.spec.json | ||
| tsdown.config.mjs | ||