LibreChat/api/server/services/__tests__
Marco Beretta f7b053789e
🔐 feat: Defer MCP OAuth Sign-In Until a Deferred Tool Is Used (#17225)
* feat: Defer MCP OAuth Sign-In Until a Deferred Tool Is Used

Adds an oauthPrompt server option (on_start by default, or on_use) and an
operator-declared oauthToolCatalog. With on_use, an operator-configured
OAuth server whose selected agent tools are all deferred no longer prompts
at turn start: tool search offers the declared catalog (or the user's own
cached catalog), and sign-in happens on the first tool call through the
existing in-run OAuth step. Without a declared catalog the turn-start
prompt is kept. Both fields are operator-only.

Related to #16765

* test: Cover MCP OAuth Sign-In on First Deferred Tool Use

* fix: Bound the Declared OAuth Tool Schema to Non-Recursive Types

* refactor: Move MCP OAuth Deferral Orchestration Into packages/api

* refactor: Move the Cached-Catalog OAuth Prompt Branch Into packages/api

* fix: Defer MCP OAuth Only When the Offered Catalog Covers the Selection

* fix: Cover Runtime OAuth, Background Tools, and Tokenless Discovery in Deferral

* fix: Match Legacy Keys, Honor Background Capability, and Reject Unsupported Schema Keywords

* fix: Resolve Wildcard Background Opt-In and Tighten Declared Catalog Matching

* fix: Validate Declared Tool Schema Types and Enums

* fix: Accept Canonical Catalog Keys the Definitions Loader Accepts

* test: Pin the Declared Catalog Requirement for Cached User Catalogs

* fix: Resolve Deferred Tool Options Across MCP Spelling Aliases
2026-10-21 18:18:42 +02:00
..
AssistantService.logging.spec.js 🛂 feat: Filter Model-Bound Content by Source (#14425) 2026-08-21 22:43:32 -04:00
MCP.spec.js 🫰 feat: Configure Tool Approval Modes Per Agent (#16707) 2026-10-04 13:14:48 -04:00
toolCapabilityGates.spec.js 🎒 feat: Carry Project Context Across Conversations (#15684) 2026-10-01 03:46:19 +00:00
ToolService.spec.js 🔐 feat: Defer MCP OAuth Sign-In Until a Deferred Tool Is Used (#17225) 2026-10-21 18:18:42 +02:00