From a365ab3daef6f8033b9866c437b54b28d861d1c3 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 22 Jul 2026 10:02:41 -0400 Subject: [PATCH 01/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Prepare=20v0.8.8-r?= =?UTF-8?q?c1=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/config_v1.3.14.mdx | 74 ++++++ content/changelog/v0.8.8-rc1.mdx | 219 ++++++++++++++++++ content/docs/configuration/dotenv.mdx | 125 +++++++++- content/docs/configuration/langfuse.mdx | 48 ++++ .../configuration/librechat_yaml/example.mdx | 4 +- .../object_structure/agents.mdx | 120 +++++++++- .../object_structure/config.mdx | 47 +++- .../object_structure/custom_endpoint.mdx | 1 + .../object_structure/file_config.mdx | 2 +- .../object_structure/interface.mdx | 2 + .../object_structure/mcp_servers.mdx | 1 + .../object_structure/memory.mdx | 31 ++- .../object_structure/model_specs.mdx | 169 +++++++++++++- .../object_structure/summarization.mdx | 39 +++- content/docs/features/agents.mdx | 39 ++++ content/docs/features/code_interpreter.mdx | 11 + content/docs/features/memory.mdx | 27 ++- content/docs/features/shareable_links.mdx | 11 +- 18 files changed, 946 insertions(+), 24 deletions(-) create mode 100644 content/changelog/config_v1.3.14.mdx create mode 100644 content/changelog/v0.8.8-rc1.mdx diff --git a/content/changelog/config_v1.3.14.mdx b/content/changelog/config_v1.3.14.mdx new file mode 100644 index 000000000..b16412aff --- /dev/null +++ b/content/changelog/config_v1.3.14.mdx @@ -0,0 +1,74 @@ +--- +date: 2026-07-22 +title: โš™๏ธ Config v1.3.14 +version: '1.3.14' +--- + +- Updated Agents endpoint capabilities + - Added `memory` and `ask_user_question` to the default capability list + - Added opt-in `stateful_code_sessions` for reusable Code Interpreter workspaces + - Added opt-in `run_in_background` for eligible background MCP tool calls + +- Added `endpoints.agents.toolApproval` + - Enables human approval for matching Agent tool calls + - Supports `default`, `dontAsk`, and `bypass` modes plus glob-based `allow`, `deny`, and `ask` rules + - Supports trusted programmatic hooks for context-aware approval policy; hooks can only make the static policy stricter + +- Added `endpoints.agents.checkpointer` + - Persists paused Ask User and tool-approval runs so they can resume later + - Uses MongoDB by default with a 24-hour TTL + - Supports configurable collection names and a process-local `memory` mode for development + +- Added `summarization.retainRecent` + - `turns` preserves a configurable number of recent complete conversation turns outside the summary + - `tokens` sets a recent token-retention budget + +- Updated automatic memory extraction + - `memory.agent.enabled: true` is now required to run the automatic memory agent + - Manual memories and Agent memory tools remain available when automatic extraction is off + +- Added model spec controls + - `showInMenu` can hide a spec from the selector while retaining trusted explicit `spec` access + - `memory` equips an ephemeral Agent with memory tools + - `askUserQuestion` enables durable question-and-resume flows + - `runInBackground` marks eligible model-spec tools as background-capable + +- Added OpenAI reasoning controls + - `reasoning_mode` supports `standard` and `pro` + - `reasoning_context` supports `auto`, `current_turn`, and `all_turns` + - `reasoning_effort` now supports `max` on compatible models + - GPT-5.6 reasoning requests default to the Responses API unless `useResponsesApi: false` is set explicitly + +- Added top-level `langfuse` tenant configuration + - Supports tenant public and secret keys, an allowed destination key, and `fanout.enabled` + - Secret keys written through administrator config APIs are encrypted and returned only as a redacted display value + - Added opt-in Compose and Helm fanout deployment settings for central and tenant-scoped trace export + +- Added Code Interpreter runtime settings + - `CODE_SANDBOX_PREWARM` controls stateful sandbox prewarming + - `CODE_SANDBOX_COLD_AFTER_MS` controls when tracked sandboxes are treated as cold + - `LIBRECHAT_CODE_IMAGE_CHUNK_BYTES` controls transport chunk size for sandbox images returned by `read_file` + +- Added file upload runtime settings + - `FILE_UPLOAD_SSE_ENABLED` keeps long-running uploads alive with SSE heartbeats + - `REMOTE_FILE_FETCH_TIMEOUT_MS` limits server-side remote file download time + - `REMOTE_FILE_FETCH_MAX_BYTES` limits server-side remote file download size + +- Added Agent conversation control `STEER_MAX_LENGTH` + - Caps the length of one mid-run steering message + +- Added authentication and permission cache settings + - `ALLOW_EMAIL_LOGIN_OVERRIDE` permits audited direct API email login while the regular email login UI is disabled + - `AUTH_USER_CACHE_MODE=on` opts into a short Redis-backed authenticated-user cache + - `USER_PRINCIPALS_CACHE_TTL_MS`, `USER_PRINCIPALS_LOCK_TTL_MS`, and `USER_PRINCIPALS_LOCK_WAIT_MS` tune ACL principal caching and cross-process cache builds + +- Added `{{LIBRECHAT_USER_TERMSACCEPTEDAT}}` + - Makes the recorded terms acceptance timestamp available to MCP and custom endpoint header templates + - Existing accepted users can be backfilled with `npm run migrate:terms-timestamp` + +- Updated built-in model defaults + - Added GPT-5.6 Sol, Terra, and Luna + - Added Claude Sonnet 5, including Bedrock model IDs + - Added Gemini 3.6 Flash and Gemini 3.5 Flash-Lite + +- Updated the config version to `1.3.14` diff --git a/content/changelog/v0.8.8-rc1.mdx b/content/changelog/v0.8.8-rc1.mdx new file mode 100644 index 000000000..0975d0d92 --- /dev/null +++ b/content/changelog/v0.8.8-rc1.mdx @@ -0,0 +1,219 @@ +--- +date: 2026-07-22 +title: ๐Ÿš€ LibreChat v0.8.8-rc1 +description: The v0.8.8-rc1 release of LibreChat +version: '0.8.8-rc1' +--- + +## What's Changed + +### ๐Ÿž๏ธ Highlights + +- Steer Agent runs in progress or queue the next message +- Agents can pause to ask questions or request tool approval, then resume +- Redesigned Agent Builder with a unified Tools marketplace and background tool calls +- Stateful Code Interpreter sessions with reusable conversation workspaces +- Agent-managed memory with optional per-agent isolation +- Continue shared conversations as personal copies +- Opt-in Langfuse fanout for central and tenant tracing +- Provider updates: GPT-5.6, Claude Sonnet 5, Gemini 3.6 Flash, and Gemini 3.5 Flash-Lite + +--- + +### โœจ Features + +- ๐Ÿ•’ feat: Track terms acceptance timestamp by [@berry-13](https://github.com/berry-13) in [#10810](https://github.com/danny-avila/LibreChat/pull/10810) +- ๐Ÿ”„ feat: Continue Shared Conversations as Personal Copies by [@berry-13](https://github.com/berry-13) in [#13714](https://github.com/danny-avila/LibreChat/pull/13714) +- ๐Ÿช feat: HITL Tool Approval Scaffolding (Slice A) by [@danny-avila](https://github.com/danny-avila) in [#12938](https://github.com/danny-avila/LibreChat/pull/12938) +- ๐Ÿง  feat: Add Memory as an Agent Capability with Inline Tools and Ephemeral Badge by [@danny-avila](https://github.com/danny-avila) in [#13869](https://github.com/danny-avila/LibreChat/pull/13869) +- ๐Ÿ“‡ feat: Agent Contact Visibility with Owner Fallback by [@peeeteeer](https://github.com/peeeteeer) in [#13663](https://github.com/danny-avila/LibreChat/pull/13663) +- ๐ŸชŸ feat: Faithful Over-Window Context Estimate via Prune Mirror and Overhead Reserve by [@danny-avila](https://github.com/danny-avila) in [#13959](https://github.com/danny-avila/LibreChat/pull/13959) +- ๐Ÿชญ feat: Add opt-in Langfuse fanout gateway + collector by [@upman](https://github.com/upman) in [#13872](https://github.com/danny-avila/LibreChat/pull/13872) +- ๐Ÿช feat: Human-in-the-Loop Runtime - Tool Approval + Ask-User-Question (Slice B) by [@danny-avila](https://github.com/danny-avila) in [#13942](https://github.com/danny-avila/LibreChat/pull/13942) +- ๐Ÿช— feat: Dock-Style Fisheye Nav Rail With Instant Hover Preview by [@danny-avila](https://github.com/danny-avila) in [#14021](https://github.com/danny-avila/LibreChat/pull/14021) +- ๐Ÿค– feat: Add Claude Sonnet 5 Support by [@danny-avila](https://github.com/danny-avila) in [#14042](https://github.com/danny-avila/LibreChat/pull/14042) +- ๐Ÿฅท feat: Add `showInMenu` Option to Model Specs by [@alexkorep](https://github.com/alexkorep) in [#14034](https://github.com/danny-avila/LibreChat/pull/14034) +- ๐Ÿซท feat: Exclude File Authoring Tools From Eager Execution by [@danny-avila](https://github.com/danny-avila) in [#14051](https://github.com/danny-avila/LibreChat/pull/14051) +- ๐Ÿช feat: Configurable Tool-Approval Policy via Programmatic Hooks by [@danny-avila](https://github.com/danny-avila) in [#14025](https://github.com/danny-avila/LibreChat/pull/14025) +- ๐Ÿงน feat: Eager HITL Checkpoint Cleanup (Expiry + Deletion) & Full-Wiring E2E by [@danny-avila](https://github.com/danny-avila) in [#14123](https://github.com/danny-avila/LibreChat/pull/14123) +- ๐Ÿงฐ feat: Redesign Agent Builder with Unified Tools Marketplace, Skills & Orchestration by [@berry-13](https://github.com/berry-13) in [#13952](https://github.com/danny-avila/LibreChat/pull/13952) +- ๐Ÿ“ก feat: add rum browser page-load diagnostics by [@upman](https://github.com/upman) in [#14106](https://github.com/danny-avila/LibreChat/pull/14106) +- ๐ŸŽš๏ธ feat: Explicit "Use All Skills" Toggle in the Skills Section by [@berry-13](https://github.com/berry-13) in [#14125](https://github.com/danny-avila/LibreChat/pull/14125) +- ๐Ÿ™‹ feat: ask_user_question - agent-initiated questions with durable pause/resume by [@danny-avila](https://github.com/danny-avila) in [#14139](https://github.com/danny-avila/LibreChat/pull/14139) +- ๐Ÿ—‚๏ธ feat: Per-Agent Memory Partitions by [@danny-avila](https://github.com/danny-avila) in [#14084](https://github.com/danny-avila/LibreChat/pull/14084) +- ๐Ÿค– feat: Add GPT-5.6 (Sol/Terra/Luna) OpenAI Models by [@danny-avila](https://github.com/danny-avila) in [#14206](https://github.com/danny-avila/LibreChat/pull/14206) +- ๐Ÿชญ feat: support per-run central export suppression by [@upman](https://github.com/upman) in [#14207](https://github.com/danny-avila/LibreChat/pull/14207) +- โœจ feat: stateful_code_sessions capability for warm Code API sandbox sessions (experimental) by [@danny-avila](https://github.com/danny-avila) in [#14150](https://github.com/danny-avila/LibreChat/pull/14150) +- ๐Ÿง  feat: Add GPT-5.6 reasoning.mode + reasoning.context (Responses API) by [@danny-avila](https://github.com/danny-avila) in [#14233](https://github.com/danny-avila/LibreChat/pull/14233) +- ๐Ÿงต feat: Background Tool Calls for Agents & Model Specs by [@danny-avila](https://github.com/danny-avila) in [#14197](https://github.com/danny-avila/LibreChat/pull/14197) +- ๐Ÿ—๏ธ feat: Encrypted Langfuse Fanout Config by [@dustinhealy](https://github.com/dustinhealy) in [#14107](https://github.com/danny-avila/LibreChat/pull/14107) +- ๐Ÿงญ feat: Mid-Run Steering and Queued Messages for Agent Runs by [@danny-avila](https://github.com/danny-avila) in [#14220](https://github.com/danny-avila/LibreChat/pull/14220) +- โ™จ๏ธ feat: Prewarm Stateful Code Sandboxes with Cold-Boot UX Feedback by [@danny-avila](https://github.com/danny-avila) in [#14239](https://github.com/danny-avila/LibreChat/pull/14239) +- ๐Ÿ“› feat: Add Client Name Header to Tavily Search Requests by [@manisrinivasan2k1](https://github.com/manisrinivasan2k1) in [#14082](https://github.com/danny-avila/LibreChat/pull/14082) +- ๐Ÿ’ฌ feat: Explain Steering & Queuing at Every User-Facing Surface by [@danny-avila](https://github.com/danny-avila) in [#14260](https://github.com/danny-avila/LibreChat/pull/14260) +- ๐Ÿ–ผ๏ธ feat: Return Sandbox Images From `read_file` as Viewable Artifacts by [@danny-avila](https://github.com/danny-avila) in [#14277](https://github.com/danny-avila/LibreChat/pull/14277) +- feat: add low-noise Redis observability by [@upman](https://github.com/upman) in [#14309](https://github.com/danny-avila/LibreChat/pull/14309) +- โœ‹ feat: Add Reclaim-Gated Controls to In-Flight Steers by [@danny-avila](https://github.com/danny-avila) in [#14321](https://github.com/danny-avila/LibreChat/pull/14321) +- ๐Ÿซง feat: Float In-Flight Steers Over the Thread with Collapsible Content by [@danny-avila](https://github.com/danny-avila) in [#14365](https://github.com/danny-avila/LibreChat/pull/14365) +- โšก feat: Add Gemini 3.6 Flash and Gemini 3.5 Flash-Lite Support by [@danny-avila](https://github.com/danny-avila) in [#14369](https://github.com/danny-avila/LibreChat/pull/14369) + +### ๐Ÿ› Fixes + +- ๐Ÿ”‘ fix: Honor User-Provided MCP API Key Instead of Forcing OAuth by [@danny-avila](https://github.com/danny-avila) in [#13954](https://github.com/danny-avila/LibreChat/pull/13954) +- ๐Ÿช™ fix: Count Quote Tokens on Message Edit by [@danny-avila](https://github.com/danny-avila) in [#13958](https://github.com/danny-avila/LibreChat/pull/13958) +- ๐Ÿ“‹ fix: Route Clipboard Paste Through Upload Options by [@dustinhealy](https://github.com/dustinhealy) in [#13957](https://github.com/danny-avila/LibreChat/pull/13957) +- ๐Ÿ“‡ fix: Index sharedlinks updatedAt for Cosmos DB Sorts by [@danny-avila](https://github.com/danny-avila) in [#13979](https://github.com/danny-avila/LibreChat/pull/13979) +- ๐Ÿ“‚ fix: Mount Skill Files Under skills/ in Code Interpreter by [@danny-avila](https://github.com/danny-avila) in [#13961](https://github.com/danny-avila/LibreChat/pull/13961) and [#13975](https://github.com/danny-avila/LibreChat/pull/13975) +- ๐ŸชŸ fix: Re-measure Sidebar Chat List on Width Change to Fix Date-Group Spacing by [@danny-avila](https://github.com/danny-avila) in [#13981](https://github.com/danny-avila/LibreChat/pull/13981) +- ๐Ÿ“ fix: Make create_file Missing-Content Error Truncation-Aware by [@danny-avila](https://github.com/danny-avila) in [#14043](https://github.com/danny-avila/LibreChat/pull/14043) +- fix: use `logAxiosError` at the RAG file_search/context call sites by [@mawburn](https://github.com/mawburn) in [#14014](https://github.com/danny-avila/LibreChat/pull/14014) +- fix: `stripHeavyErrorFields` Winston format (defense-in-depth) by [@mawburn](https://github.com/mawburn) in [#14018](https://github.com/danny-avila/LibreChat/pull/14018) +- ๐Ÿ“ฅ fix: Download Original File From Artifact Preview Panel for Office Documents by [@berry-13](https://github.com/berry-13) in [#14026](https://github.com/danny-avila/LibreChat/pull/14026) +- ๐Ÿ”ฅ fix: Firebase CDN Initialization Under tsdown CJS Interop by [@jakacenta](https://github.com/jakacenta) in [#14046](https://github.com/danny-avila/LibreChat/pull/14046) +- fix: preserve role SHARE permissions across boot in initializeRoles by [@mawburn](https://github.com/mawburn) in [#14022](https://github.com/danny-avila/LibreChat/pull/14022) +- fix: bound peak memory of concurrent base64 attachment encoding by [@mawburn](https://github.com/mawburn) in [#14023](https://github.com/danny-avila/LibreChat/pull/14023) +- ๐Ÿ“ง fix: Add .eml (message/rfc822) Support to File Upload by [@Zirkonium88](https://github.com/Zirkonium88) in [#13989](https://github.com/danny-avila/LibreChat/pull/13989) +- ๐Ÿšช fix: Support Admin Redirect Detection for Same-Origin Subpaths by [@arjunvijay24](https://github.com/arjunvijay24) in [#14040](https://github.com/danny-avila/LibreChat/pull/14040) +- ๐Ÿฉน fix: Coerce Stringified `edit_file` Edits (JSON-in-JSON) by [@danny-avila](https://github.com/danny-avila) in [#14056](https://github.com/danny-avila/LibreChat/pull/14056) +- ๐Ÿง  fix: Apply Bedrock thinking config to bare inference-profile model IDs by [@danny-avila](https://github.com/danny-avila) in [#14054](https://github.com/danny-avila/LibreChat/pull/14054) +- ๐Ÿง  fix: Default Bedrock thinking `maxTokens` to model max output by [@danny-avila](https://github.com/danny-avila) in [#14058](https://github.com/danny-avila/LibreChat/pull/14058) +- fix: stop the artifact-edit retry loop on unrecoverable 400s by [@mawburn](https://github.com/mawburn) in [#14060](https://github.com/danny-avila/LibreChat/pull/14060) +- ๐ŸŽฃ fix: Surface Resumable Stream Start Errors by [@danny-avila](https://github.com/danny-avila) in [#14072](https://github.com/danny-avila/LibreChat/pull/14072) +- ๐Ÿงฏ fix: Harden Principals Cache Invalidation and Lock-Wait Paths by [@danny-avila](https://github.com/danny-avila) in [#14120](https://github.com/danny-avila/LibreChat/pull/14120) +- ๐Ÿ fix: Ignore Finalized SSE Transport Errors by [@danny-avila](https://github.com/danny-avila) in [#14114](https://github.com/danny-avila/LibreChat/pull/14114) +- fix: fall back to `_id` for user id in `createSafeUser` by [@mawburn](https://github.com/mawburn) in [#14083](https://github.com/danny-avila/LibreChat/pull/14083) +- ๐ŸŒ fix: guard IME composition on Enter in prompt name/labels and dynamic tag inputs by [@mahirhir](https://github.com/mahirhir) in [#13996](https://github.com/danny-avila/LibreChat/pull/13996) +- ๐Ÿ—„๏ธ fix: Return Cached Transaction-Support Value on Cache Hit by [@Osamaali313](https://github.com/Osamaali313) in [#13999](https://github.com/danny-avila/LibreChat/pull/13999) +- ๐Ÿง  fix: Format Reasoning Exports by [@danny-avila](https://github.com/danny-avila) in [#14116](https://github.com/danny-avila/LibreChat/pull/14116) +- ๐Ÿงฎ fix: Prevent String Corruption of Numeric Agent Model Parameters by [@danny-avila](https://github.com/danny-avila) in [#14119](https://github.com/danny-avila/LibreChat/pull/14119) +- ๐Ÿงข fix: Raise Claude Sonnet 4.6 Output Cap by [@danny-avila](https://github.com/danny-avila) in [#14115](https://github.com/danny-avila/LibreChat/pull/14115) +- ๐Ÿงต fix: Preserve Fenced Markdown Artifacts by [@danny-avila](https://github.com/danny-avila) in [#14121](https://github.com/danny-avila/LibreChat/pull/14121) +- ๐Ÿ”’ fix: Prevent Role Grants on Shared Links by [@danny-avila](https://github.com/danny-avila) in [#14137](https://github.com/danny-avila/LibreChat/pull/14137) +- ๐Ÿค fix: Exclude Provider Secrets from HITL Pending Actions by [@danny-avila](https://github.com/danny-avila) in [#14136](https://github.com/danny-avila/LibreChat/pull/14136) +- โณ fix: Defer MCP Connection for Request-Scoped Placeholders on Reinitialize by [@danny-avila](https://github.com/danny-avila) in [#14148](https://github.com/danny-avila/LibreChat/pull/14148) +- ๐Ÿงท fix: Align Agent File Attachment Ownership by [@danny-avila](https://github.com/danny-avila) in [#14149](https://github.com/danny-avila/LibreChat/pull/14149) +- ๐ŸงŠ fix: Include Conversation Starters in Agent View and List Responses by [@serhiizghama](https://github.com/serhiizghama) in [#14142](https://github.com/danny-avila/LibreChat/pull/14142) +- โ™Š fix: Resolve Local JSON Pointer Refs & Sanitize Tool Search Schema for Gemini by [@usnavy13](https://github.com/usnavy13) in [#14161](https://github.com/danny-avila/LibreChat/pull/14161) +- ๐Ÿ›ก๏ธ fix: Guard HITL checkpoint size against MongoDB 16MB limit by [@danny-avila](https://github.com/danny-avila) in [#14157](https://github.com/danny-avila/LibreChat/pull/14157) +- ๐Ÿ”ก fix: Normalize Email Case When Issuing Verification Tokens by [@VictorEPlus](https://github.com/VictorEPlus) in [#14172](https://github.com/danny-avila/LibreChat/pull/14172) +- ๐Ÿชœ fix: Apply Recursion Limit Config to Subagents by [@danny-avila](https://github.com/danny-avila) in [#14185](https://github.com/danny-avila/LibreChat/pull/14185) +- ๐Ÿ’‚ fix: Enforce ALLOW_EMAIL_LOGIN on the Backend Login Route by [@lurkerCha](https://github.com/lurkerCha) in [#14180](https://github.com/danny-avila/LibreChat/pull/14180) +- ๐Ÿงฉ fix: Allow `compatibility` Field in Skill Frontmatter by [@danny-avila](https://github.com/danny-avila) in [#14189](https://github.com/danny-avila/LibreChat/pull/14189) +- ๐Ÿ“Ž fix: Translate Finite `supportedMimeTypes` Allowlists to Picker Accept by [@danny-avila](https://github.com/danny-avila) in [#14186](https://github.com/danny-avila/LibreChat/pull/14186) +- ๐Ÿช† fix: Serve Nested Skill Files Through a Wildcard Route by [@danny-avila](https://github.com/danny-avila) in [#14191](https://github.com/danny-avila/LibreChat/pull/14191) +- ๐Ÿƒ fix: Attach Request-Scoped MCP Servers From the Builder via the `mcp_all` Wildcard by [@adamscross04](https://github.com/adamscross04) in [#14177](https://github.com/danny-avila/LibreChat/pull/14177) +- ๐Ÿ” fix: Sync Conversation Title Updates to MeiliSearch by [@danny-avila](https://github.com/danny-avila) in [#14223](https://github.com/danny-avila/LibreChat/pull/14223) +- ๐Ÿ‘ป fix: Guard Redis Stream Resume Against Disposed HITL Graph by [@danny-avila](https://github.com/danny-avila) in [#14258](https://github.com/danny-avila/LibreChat/pull/14258) +- ๐Ÿค fix: Discover MCP OAuth Exchange Methods by [@danny-avila](https://github.com/danny-avila) in [#14256](https://github.com/danny-avila/LibreChat/pull/14256) +- ๐Ÿ‘‹ fix: Terminate Streamable HTTP MCP Sessions on Teardown by [@danny-avila](https://github.com/danny-avila) in [#14252](https://github.com/danny-avila/LibreChat/pull/14252) +- ๐Ÿ—‚๏ธ fix: Route read_file Through the Stateful Code Session by [@danny-avila](https://github.com/danny-avila) in [#14259](https://github.com/danny-avila/LibreChat/pull/14259) +- ๐Ÿ’ญ fix: Default GPT-5.6 Reasoning Requests to Responses API by [@jomspk](https://github.com/jomspk) in [#14232](https://github.com/danny-avila/LibreChat/pull/14232) +- ๐Ÿ”– fix: Preserve Ephemeral Agent Params and Identity for ask_user_question Resume by [@jjhidalgar-celonis](https://github.com/jjhidalgar-celonis) in [#14254](https://github.com/danny-avila/LibreChat/pull/14254) +- ๐ŸŽซ fix: Strip Reserved Fields From Bedrock `additionalModelRequestFields` by [@danny-avila](https://github.com/danny-avila) in [#14246](https://github.com/danny-avila/LibreChat/pull/14246) +- ๐Ÿ“ฑ fix: Single-Tap Select for Pinned Agents, Model Specs & Models on Touch by [@danny-avila](https://github.com/danny-avila) in [#14272](https://github.com/danny-avila/LibreChat/pull/14272) +- ๐Ÿงฝ fix: Clear Deleted Chats From Message Cache by [@danny-avila](https://github.com/danny-avila) in [#14270](https://github.com/danny-avila/LibreChat/pull/14270) +- ๐ŸงŸ fix: Prevent Drained Steer From Re-Queuing After Run-End Race by [@danny-avila](https://github.com/danny-avila) in [#14276](https://github.com/danny-avila/LibreChat/pull/14276) +- ๐Ÿ™‹ fix: Await `ask_user_question` Tool Factory in `loadTools` by [@danny-avila](https://github.com/danny-avila) in [#14291](https://github.com/danny-avila/LibreChat/pull/14291) +- ๐Ÿงท fix: Flush Pending File Deletion on Unmount by [@danny-avila](https://github.com/danny-avila) in [#14293](https://github.com/danny-avila/LibreChat/pull/14293) +- ๐Ÿ™‹ fix: Stop Answered `ask_user_question` Card From Reopening Its Popover by [@danny-avila](https://github.com/danny-avila) in [#14297](https://github.com/danny-avila/LibreChat/pull/14297) +- ๐Ÿ”’ fix: Scope, Cap, and De-Execute the In-Flight Steer Stack by [@danny-avila](https://github.com/danny-avila) in [#14310](https://github.com/danny-avila/LibreChat/pull/14310) +- ๐Ÿ“ฑ fix: Don't Connect the Favorites Drag Source on Touch Pointers by [@danny-avila](https://github.com/danny-avila) in [#14312](https://github.com/danny-avila/LibreChat/pull/14312) +- ๐Ÿงต fix: Harden Request-Scoped MCP Lifecycle by [@danny-avila](https://github.com/danny-avila) in [#14342](https://github.com/danny-avila/LibreChat/pull/14342) +- ๐Ÿช† fix: Build RAG-API Chart Before Parent to Bundle PostgreSQL Dependency by [@Aho-Bakaa](https://github.com/Aho-Bakaa) in [#14262](https://github.com/danny-avila/LibreChat/pull/14262) +- ๐Ÿšช fix: Keep Owners From Being Locked Out of Their Own Resource When Sharing by [@danny-avila](https://github.com/danny-avila) in [#14347](https://github.com/danny-avila/LibreChat/pull/14347) +- ๐Ÿš fix: Route Admin-Configured Document Types to RAG /text on Agent Upload by [@danny-avila](https://github.com/danny-avila) in [#14345](https://github.com/danny-avila/LibreChat/pull/14345) +- ๐ŸŽŸ๏ธ fix: Claim Idempotency Keys to Dedup Retried Generation Requests and Prevent Double Billing by [@danny-avila](https://github.com/danny-avila) in [#14344](https://github.com/danny-avila/LibreChat/pull/14344) +- ๐Ÿง  fix: Restore Agent Memory Scope Control in Unified Builder by [@danny-avila](https://github.com/danny-avila) in [#14292](https://github.com/danny-avila/LibreChat/pull/14292) +- ๐Ÿ›Ÿ fix: Keep File Uploads Alive With SSE Heartbeats by [@MarcAmick](https://github.com/MarcAmick) in [#14295](https://github.com/danny-avila/LibreChat/pull/14295) +- ๐Ÿงฉ fix: Preserve Deployment Skill IDs on Agents by [@danny-avila](https://github.com/danny-avila) in [#14368](https://github.com/danny-avila/LibreChat/pull/14368) +- ๐Ÿงญ fix: Keep Message Nav Chevrons Working on In-Thread Steers by [@danny-avila](https://github.com/danny-avila) in [#14377](https://github.com/danny-avila/LibreChat/pull/14377) +- ๐Ÿค fix: Withhold MCP OAuth Headers From Untrusted Preconfigured Discovery by [@danny-avila](https://github.com/danny-avila) in [#14379](https://github.com/danny-avila/LibreChat/pull/14379) +- ๐Ÿ”— fix: Preserve resource owner access when sharing (key share diff by stable id) by [@jomspk](https://github.com/jomspk) in [#14317](https://github.com/danny-avila/LibreChat/pull/14317) +- ๐Ÿช† fix: Preserve Nested Subagent Delegation by [@danny-avila](https://github.com/danny-avila) in [#14392](https://github.com/danny-avila/LibreChat/pull/14392) + +### ๐Ÿ”ง Refactoring and Performance + +- โ™ป๏ธ refactor: Compute Context Gauge Client-Side, Drop Projection Endpoint by [@danny-avila](https://github.com/danny-avila) in [#13953](https://github.com/danny-avila/LibreChat/pull/13953) +- ๐Ÿชฃ refactor: Rate-Limit Token Routes and Cap Remote File Downloads by [@danny-avila](https://github.com/danny-avila) in [#13978](https://github.com/danny-avila/LibreChat/pull/13978) +- ๐Ÿฆฅ perf: Lazy-Load Agent Version History in Editor by [@danny-avila](https://github.com/danny-avila) in [#13977](https://github.com/danny-avila/LibreChat/pull/13977) +- ๐Ÿ›— perf: Fetch Pinned Agents Directly Past the Global Agents Map by [@danny-avila](https://github.com/danny-avila) in [#13972](https://github.com/danny-avila/LibreChat/pull/13972) +- โšก perf: memoize FavoritesList and BookmarkNav to prevent re-renders during streaming by [@berry-13](https://github.com/berry-13) in [#14011](https://github.com/danny-avila/LibreChat/pull/14011) +- ๐Ÿ—บ๏ธ refactor: Light Up In-Viewport Ribs at Rest in Message Nav by [@danny-avila](https://github.com/danny-avila) in [#14041](https://github.com/danny-avila/LibreChat/pull/14041) +- โšก perf: Minimize group membership query in principal resolution by [@danny-avila](https://github.com/danny-avila) in [#14055](https://github.com/danny-avila/LibreChat/pull/14055) +- โšก perf: Skip Role Route Capability Probe for Own and Default Roles by [@danny-avila](https://github.com/danny-avila) in [#14073](https://github.com/danny-avila/LibreChat/pull/14073) +- ๐Ÿชญ refactor: safe structured failure logging for langfuse fanout gateway by [@upman](https://github.com/upman) in [#14050](https://github.com/danny-avila/LibreChat/pull/14050) +- ๐Ÿ“‰ perf: Skip Redundant Permission Queries on MCP Servers List by [@danny-avila](https://github.com/danny-avila) in [#14077](https://github.com/danny-avila/LibreChat/pull/14077) +- โšก perf: Persist HITL checkpoints only on pause (lazy checkpointer) by [@danny-avila](https://github.com/danny-avila) in [#14024](https://github.com/danny-avila/LibreChat/pull/14024) +- ๐Ÿ—ƒ๏ธ perf: Cache Group Memberships for ACL Principal Resolution by [@danny-avila](https://github.com/danny-avila) in [#14075](https://github.com/danny-avila/LibreChat/pull/14075) +- โš™๏ธ perf: reduce first-load MongoDB round trips by [@upman](https://github.com/upman) in [#14101](https://github.com/danny-avila/LibreChat/pull/14101) +- ๐ŸŽฏ style: Center Scroll-to-Bottom Rib in Message Nav Rail by [@danny-avila](https://github.com/danny-avila) in [#14151](https://github.com/danny-avila/LibreChat/pull/14151) +- ๐Ÿ“‰ perf: cache OpenID JWT user documents by [@upman](https://github.com/upman) in [#14187](https://github.com/danny-avila/LibreChat/pull/14187) +- ๐Ÿ“‰ perf: start message queries before file map loads by [@upman](https://github.com/upman) in [#14188](https://github.com/danny-avila/LibreChat/pull/14188) +- ๐Ÿชœ style: Adjust rib dimensions and button sizes in `MessageNav` by [@danny-avila](https://github.com/danny-avila) in [#14234](https://github.com/danny-avila/LibreChat/pull/14234) +- ๐Ÿชœ style: Center scroll-to-bottom marker in MessageNav by [@danny-avila](https://github.com/danny-avila) in [#14238](https://github.com/danny-avila/LibreChat/pull/14238) +- ๐Ÿ›ž style: Reveal the Steered "?" on Message Hover/Focus by [@danny-avila](https://github.com/danny-avila) in [#14271](https://github.com/danny-avila/LibreChat/pull/14271) +- ๐Ÿ™Š refactor: Clarify Ask Question Schema Errors and Retry Guidance by [@danny-avila](https://github.com/danny-avila) in [#14279](https://github.com/danny-avila/LibreChat/pull/14279) +- ๐Ÿ’ฌ refactor: Anchor In-Flight Steers Above the Composer by [@danny-avila](https://github.com/danny-avila) in [#14308](https://github.com/danny-avila/LibreChat/pull/14308) +- โšก perf: Halve Per-Delta Redis Round Trips in Resumable Streams by [@danny-avila](https://github.com/danny-avila) in [#14313](https://github.com/danny-avila/LibreChat/pull/14313) +- ๐Ÿงญ refactor: `web_search` Description on When To Search vs Answer Directly by [@joshbla](https://github.com/joshbla) in [#13930](https://github.com/danny-avila/LibreChat/pull/13930) +- ๐Ÿงท perf: Stabilize Mutation-Dependent Memos in Chat Hooks by [@danny-avila](https://github.com/danny-avila) in [#14328](https://github.com/danny-avila/LibreChat/pull/14328) +- ๐Ÿšฐ perf: Suppress No-Op Conversation Writes and Widen-Proof Atom Subscriptions by [@danny-avila](https://github.com/danny-avila) in [#14329](https://github.com/danny-avila/LibreChat/pull/14329) +- ๐Ÿ” refactor: Surface primary OpenID JWT failure reason in auth failure log by [@danny-avila](https://github.com/danny-avila) in [#14346](https://github.com/danny-avila/LibreChat/pull/14346) +- ๐Ÿงญ perf: Warm Conversation Switches with Single-Navigation Focus Intent by [@danny-avila](https://github.com/danny-avila) in [#14334](https://github.com/danny-avila/LibreChat/pull/14334) +- ๐Ÿงน perf: Share Voices Store, Gate Timestamp Ticker, Stabilize Greeting Springs by [@danny-avila](https://github.com/danny-avila) in [#14335](https://github.com/danny-avila/LibreChat/pull/14335) +- ๐ŸŽž๏ธ perf: Coalesce Streaming Delta Cache Writes Per Animation Frame by [@danny-avila](https://github.com/danny-avila) in [#14332](https://github.com/danny-avila/LibreChat/pull/14332) +- ๐ŸŽ›๏ธ perf: Narrow Composer Subscriptions to Streaming State by [@danny-avila](https://github.com/danny-avila) in [#14333](https://github.com/danny-avila/LibreChat/pull/14333) +- ๐Ÿงฌ perf: Memoize Message Spine and Isolate Scroll-Button State by [@danny-avila](https://github.com/danny-avila) in [#14330](https://github.com/danny-avila/LibreChat/pull/14330) +- ๐ŸชŸ perf: Virtualize Search Results and Stop the Per-Query Remount by [@danny-avila](https://github.com/danny-avila) in [#14352](https://github.com/danny-avila/LibreChat/pull/14352) + +### ๐Ÿงช Tests + +- ๐Ÿ“ test: Guard Web Search Description Length by [@danny-avila](https://github.com/danny-avila) in [#14044](https://github.com/danny-avila/LibreChat/pull/14044) + +### ๐Ÿ“ฆ Dependencies, Chores & CI + +- ๐Ÿ“ฆ chore: bump `@librechat/agents` to v3.2.52 by [@danny-avila](https://github.com/danny-avila) in [#13939](https://github.com/danny-avila/LibreChat/pull/13939) +- โฌ†๏ธ chore: Migrate off deprecated @ariakit/react-core to @ariakit/react-components by [@danny-avila](https://github.com/danny-avila) in [#13940](https://github.com/danny-avila/LibreChat/pull/13940) +- ๐Ÿงช ci: Resolve DataTable test infinite re-render by [@danny-avila](https://github.com/danny-avila) in [#13947](https://github.com/danny-avila/LibreChat/pull/13947) +- ๐Ÿ“ฆ chore: bump `@librechat/agents` to v3.2.54 by [@danny-avila](https://github.com/danny-avila) in [#14035](https://github.com/danny-avila/LibreChat/pull/14035) +- ๐Ÿ”„ chore: Bump `@librechat/agents` to v3.2.55 by [@danny-avila](https://github.com/danny-avila) in [`954caef3a3`](https://github.com/danny-avila/LibreChat/commit/954caef3a35dabec2e5d5b56ae78ea5349c4721f) +- ๐Ÿงช ci: De-flake ConversationsSection Memoization Spec on Slow Runners by [@danny-avila](https://github.com/danny-avila) in [#14071](https://github.com/danny-avila/LibreChat/pull/14071) +- ๐Ÿงท chore: Expose Retain Recent Summarization Config by [@danny-avila](https://github.com/danny-avila) in [#14134](https://github.com/danny-avila/LibreChat/pull/14134) +- ๐Ÿ“ฆ chore: bump langfuse fanout Go dependencies by [@upman](https://github.com/upman) in [#14126](https://github.com/danny-avila/LibreChat/pull/14126) +- โญ docs: update Star History section by [@berry-13](https://github.com/berry-13) in [#14198](https://github.com/danny-avila/LibreChat/pull/14198) +- ๐Ÿ“ฆ chore: Update `@librechat/agents` to v3.2.62 by [@danny-avila](https://github.com/danny-avila) in [#14235](https://github.com/danny-avila/LibreChat/pull/14235) +- ๐Ÿ“ฆ chore: Update `@librechat/agents` to v3.2.65 by [@danny-avila](https://github.com/danny-avila) in [#14263](https://github.com/danny-avila/LibreChat/pull/14263) +- ๐Ÿงน chore: Prune Dangling Images After deployed-update Pull by [@danny-avila](https://github.com/danny-avila) in [#14269](https://github.com/danny-avila/LibreChat/pull/14269) +- ๐Ÿฝ๏ธ chore: Drop Pending Composer Draft When Steering or Queuing by [@danny-avila](https://github.com/danny-avila) in [#14289](https://github.com/danny-avila/LibreChat/pull/14289) +- ๐Ÿงฉ chore: Prebundle Node Polyfills for Buffer, Process, and Global in Vite `optimizeDeps` by [@danny-avila](https://github.com/danny-avila) in [#14354](https://github.com/danny-avila/LibreChat/pull/14354) +- ๐Ÿ“ฆ chore: Update `@librechat/agents` to v3.2.66 & `npm audit fix` by [@danny-avila](https://github.com/danny-avila) in [#14361](https://github.com/danny-avila/LibreChat/pull/14361) +- ๐Ÿงพ ci: Skip Workflows for Markdown-Only Changes by [@danny-avila](https://github.com/danny-avila) in [#14378](https://github.com/danny-avila/LibreChat/pull/14378) +- ๐Ÿ“ฆ chore: Update `@librechat/agents` to v3.2.68 by [@danny-avila](https://github.com/danny-avila) in [#14380](https://github.com/danny-avila/LibreChat/pull/14380) + +### ๐ŸŒ Internationalization + +- ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14053](https://github.com/danny-avila/LibreChat/pull/14053) +- ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14070](https://github.com/danny-avila/LibreChat/pull/14070) +- ๐ŸŒ i18n: Localize Token Balance Error Message by [@Philipp-Voss](https://github.com/Philipp-Voss) in [#14169](https://github.com/danny-avila/LibreChat/pull/14169) +- ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14266](https://github.com/danny-avila/LibreChat/pull/14266) +- ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14307](https://github.com/danny-avila/LibreChat/pull/14307) +- ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14376](https://github.com/danny-avila/LibreChat/pull/14376) + +## New Contributors + +- [@alexkorep](https://github.com/alexkorep) made their first contribution in [#14034](https://github.com/danny-avila/LibreChat/pull/14034) +- [@jakacenta](https://github.com/jakacenta) made their first contribution in [#14046](https://github.com/danny-avila/LibreChat/pull/14046) +- [@Zirkonium88](https://github.com/Zirkonium88) made their first contribution in [#13989](https://github.com/danny-avila/LibreChat/pull/13989) +- [@arjunvijay24](https://github.com/arjunvijay24) made their first contribution in [#14040](https://github.com/danny-avila/LibreChat/pull/14040) +- [@mahirhir](https://github.com/mahirhir) made their first contribution in [#13996](https://github.com/danny-avila/LibreChat/pull/13996) +- [@Osamaali313](https://github.com/Osamaali313) made their first contribution in [#13999](https://github.com/danny-avila/LibreChat/pull/13999) +- [@Philipp-Voss](https://github.com/Philipp-Voss) made their first contribution in [#14169](https://github.com/danny-avila/LibreChat/pull/14169) +- [@VictorEPlus](https://github.com/VictorEPlus) made their first contribution in [#14172](https://github.com/danny-avila/LibreChat/pull/14172) +- [@adamscross04](https://github.com/adamscross04) made their first contribution in [#14177](https://github.com/danny-avila/LibreChat/pull/14177) +- [@manisrinivasan2k1](https://github.com/manisrinivasan2k1) made their first contribution in [#14082](https://github.com/danny-avila/LibreChat/pull/14082) +- [@jomspk](https://github.com/jomspk) made their first contribution in [#14232](https://github.com/danny-avila/LibreChat/pull/14232) +- [@jjhidalgar-celonis](https://github.com/jjhidalgar-celonis) made their first contribution in [#14254](https://github.com/danny-avila/LibreChat/pull/14254) +- [@Aho-Bakaa](https://github.com/Aho-Bakaa) made their first contribution in [#14262](https://github.com/danny-avila/LibreChat/pull/14262) +- [@joshbla](https://github.com/joshbla) made their first contribution in [#13930](https://github.com/danny-avila/LibreChat/pull/13930) + +**Full Changelog**: [v0.8.7...v0.8.8-rc1](https://github.com/danny-avila/LibreChat/compare/v0.8.7...v0.8.8-rc1) diff --git a/content/docs/configuration/dotenv.mdx b/content/docs/configuration/dotenv.mdx index 0f22cb132..24e5fdc62 100644 --- a/content/docs/configuration/dotenv.mdx +++ b/content/docs/configuration/dotenv.mdx @@ -387,6 +387,43 @@ Note: `DEBUG_CONSOLE` is not recommended, as the outputs can be quite verbose, a ]} /> +### Langfuse Tracing and Tenant Fanout + +Use the standard Langfuse variables for one central observability project. The optional fanout deployment can additionally route tenant traces, media, and feedback scores to tenant-specific Langfuse projects. See [Langfuse Tracing](/docs/configuration/langfuse) for setup and architecture. + +'], + ['LANGFUSE_FANOUT_CENTRAL_MEDIA_EXPORT_DISABLED', 'boolean', 'Disable central media fanout without disabling central traces.', '# LANGFUSE_FANOUT_CENTRAL_MEDIA_EXPORT_DISABLED=false'], + ['LANGFUSE_FANOUT_TENANT_DESTINATIONS', 'string', 'Comma-separated destination key and base URL mappings allowed at startup.', '# LANGFUSE_FANOUT_TENANT_DESTINATIONS=eu=https://cloud.langfuse.com,us=https://us.cloud.langfuse.com'], + ['LANGFUSE_FANOUT_TRACE_DESTINATION_KEYS', 'string', 'Destination keys supported by the collector routing configuration.', '# LANGFUSE_FANOUT_TRACE_DESTINATION_KEYS=eu,us,jp'], + ['LANGFUSE_FANOUT_PUBLIC_URL', 'string', 'Gateway base URL used to create one-time media upload URLs.', '# LANGFUSE_FANOUT_PUBLIC_URL=http://langfuse-fanout-collector:4318'], + ['LANGFUSE_FANOUT_TRACE_COLLECTOR_URL', 'string', 'Internal gateway-to-collector trace endpoint.', '# LANGFUSE_FANOUT_TRACE_COLLECTOR_URL=http://langfuse-fanout-otel:4319'], + ['LANGFUSE_FANOUT_REDIS_URI', 'string', 'Redis URI for one-time media upload plans.', '# LANGFUSE_FANOUT_REDIS_URI=redis://langfuse-fanout-redis:6379'], + ['LANGFUSE_FANOUT_REDIS_USERNAME', 'string', 'Optional Redis username for the fanout gateway.', '# LANGFUSE_FANOUT_REDIS_USERNAME='], + ['LANGFUSE_FANOUT_REDIS_PASSWORD', 'string', 'Optional Redis password for the fanout gateway.', '# LANGFUSE_FANOUT_REDIS_PASSWORD='], + ['LANGFUSE_FANOUT_REDIS_KEY_PREFIX', 'string', 'Redis key prefix for fanout media plans.', '# LANGFUSE_FANOUT_REDIS_KEY_PREFIX=langfuse-fanout'], + ['LANGFUSE_FANOUT_OTEL_RECEIVER_ENDPOINT', 'string', 'Internal collector receiver bind address.', '# LANGFUSE_FANOUT_OTEL_RECEIVER_ENDPOINT=0.0.0.0:4319'], + ['LANGFUSE_FANOUT_TENANT_EU_BASE_URL', 'string', 'Static EU destination URL for the included Compose collector.', '# LANGFUSE_FANOUT_TENANT_EU_BASE_URL=https://cloud.langfuse.com'], + ['LANGFUSE_FANOUT_TENANT_US_BASE_URL', 'string', 'Static US destination URL for the included Compose collector.', '# LANGFUSE_FANOUT_TENANT_US_BASE_URL=https://us.cloud.langfuse.com'], + ['LANGFUSE_FANOUT_TENANT_JP_BASE_URL', 'string', 'Static JP destination URL for the included Compose collector.', '# LANGFUSE_FANOUT_TENANT_JP_BASE_URL=https://jp.cloud.langfuse.com'], + ['LANGFUSE_FANOUT_UPSTREAM_TIMEOUT', 'duration', 'Timeout for gateway requests to Langfuse and media upload URLs.', '# LANGFUSE_FANOUT_UPSTREAM_TIMEOUT=30s'], + ['LANGFUSE_FANOUT_METRICS_SECRET', 'string', 'Bearer token required to scrape the gateway metrics endpoint.', '# LANGFUSE_FANOUT_METRICS_SECRET='], + ['LANGFUSE_FANOUT_MEMORY_LIMIT_MIB', 'number', 'Collector memory limit in MiB.', '# LANGFUSE_FANOUT_MEMORY_LIMIT_MIB=256'], + ['LANGFUSE_FANOUT_MEMORY_SPIKE_LIMIT_MIB', 'number', 'Collector memory spike allowance in MiB.', '# LANGFUSE_FANOUT_MEMORY_SPIKE_LIMIT_MIB=64'], + ['LANGFUSE_FANOUT_BATCH_TIMEOUT', 'duration', 'Collector batch flush timeout.', '# LANGFUSE_FANOUT_BATCH_TIMEOUT=1s'], + ['LANGFUSE_FANOUT_BATCH_SEND_SIZE', 'number', 'Collector batch send size.', '# LANGFUSE_FANOUT_BATCH_SEND_SIZE=128'], + ['LANGFUSE_FANOUT_METADATA_CARDINALITY_LIMIT', 'number', 'Collector metadata cardinality limit.', '# LANGFUSE_FANOUT_METADATA_CARDINALITY_LIMIT=1000'], + ]} +/> + ### OpenTelemetry Tracing LibreChat can emit backend OpenTelemetry traces for general API, HTTP, MongoDB, Mongoose, Redis, and outbound request visibility. Redis command-level spans are opt-in so default traces stay high-level. Use Langfuse for GenAI-specific prompt/model observability. @@ -1182,6 +1219,31 @@ See detailed instructions here: **[OpenWeather](/docs/configuration/tools/openwe ]} /> +## File Uploads + + + ## Code Interpreter The Code Interpreter API provides a secure environment for executing code and managing files. See: [Code Interpreter API](/docs/features/code_interpreter) @@ -1197,9 +1259,27 @@ The Code Interpreter API provides a secure environment for executing code and ma [ 'LIBRECHAT_CODE_BASEURL', 'string', - 'Custom base URL for the Code Interpreter API (Enterprise plans only).', + 'Base URL for your Code Interpreter service.', '# LIBRECHAT_CODE_BASEURL=https://your-custom-domain.com', ], + [ + 'CODE_SANDBOX_PREWARM', + 'boolean', + 'Prewarm stateful per-conversation sandboxes in parallel with model generation. Set to false to disable. Default: true.', + '# CODE_SANDBOX_PREWARM=true', + ], + [ + 'CODE_SANDBOX_COLD_AFTER_MS', + 'number', + 'Time in milliseconds before LibreChat treats a tracked sandbox as cold. Default: 2100000 (35 minutes).', + '# CODE_SANDBOX_COLD_AFTER_MS=2100000', + ], + [ + 'LIBRECHAT_CODE_IMAGE_CHUNK_BYTES', + 'number', + 'Bytes read per sandbox image chunk. Lower this when the runner has a smaller stdout limit. Default: 32768.', + '# LIBRECHAT_CODE_IMAGE_CHUNK_BYTES=32768', + ], ]} /> @@ -1392,6 +1472,19 @@ This section contains the configuration for: - [Registration and Social Logins](#registration-and-login) - [Email Password Reset](#password-reset) +### Agent Conversation Controls + + + ### Moderation The Automated Moderation System uses a scoring mechanism to track user violations. As users commit actions like excessive logins, registrations, or messaging, they accumulate violation scores. Upon reaching a set threshold, the user and their IP are temporarily banned. This system ensures platform security by monitoring and penalizing rapid or suspicious activities. @@ -1946,6 +2039,12 @@ see: **[Authentication System](/docs/configuration/authentication)** 'Enable or disable ONLY email login.', 'ALLOW_EMAIL_LOGIN=true', ], + [ + 'ALLOW_EMAIL_LOGIN_OVERRIDE', + 'boolean', + 'Permit direct API email login while ALLOW_EMAIL_LOGIN=false. Each use is logged. Default: false.', + '# ALLOW_EMAIL_LOGIN_OVERRIDE=false', + ], [ 'ALLOW_REGISTRATION', 'boolean', @@ -3159,6 +3258,30 @@ For detailed configuration and examples, see: **[Redis Configuration Guide](/doc 'Comma-separated cache keys to force in-memory storage even when Redis is enabled.', '# FORCED_IN_MEMORY_CACHE_NAMESPACES=ROLES,MESSAGES', ], + [ + 'AUTH_USER_CACHE_MODE', + 'string', + 'Set exactly to `on` to cache authenticated user documents during request bursts. Requires Redis and a Redis-backed AUTH_USER_DOC namespace. Default: off.', + '# AUTH_USER_CACHE_MODE=off', + ], + [ + 'USER_PRINCIPALS_CACHE_TTL_MS', + 'number', + 'TTL in milliseconds for cached group memberships used in ACL checks. Set to 0 to disable. Default: 300000.', + '# USER_PRINCIPALS_CACHE_TTL_MS=300000', + ], + [ + 'USER_PRINCIPALS_LOCK_TTL_MS', + 'number', + 'Redis lock TTL in milliseconds for cross-container principal-cache builds. Set to 0 to disable build locking. Default: 5000.', + '# USER_PRINCIPALS_LOCK_TTL_MS=5000', + ], + [ + 'USER_PRINCIPALS_LOCK_WAIT_MS', + 'number', + 'Maximum time to wait for another container to fill the principal cache before reading the database directly. Defaults to USER_PRINCIPALS_LOCK_TTL_MS.', + '# USER_PRINCIPALS_LOCK_WAIT_MS=5000', + ], [ 'REDIS_USE_ALTERNATIVE_DNS_LOOKUP', 'boolean', diff --git a/content/docs/configuration/langfuse.mdx b/content/docs/configuration/langfuse.mdx index c7d0daac2..e50af757f 100644 --- a/content/docs/configuration/langfuse.mdx +++ b/content/docs/configuration/langfuse.mdx @@ -50,6 +50,54 @@ LANGFUSE_BASE_URL=https://cloud.langfuse.com `http://localhost:3000` for local development). +## Tenant Fanout (Optional) + +Langfuse fanout lets a multi-tenant LibreChat deployment export each eligible trace and its media to both a central Langfuse project and a tenant-specific project. The feature is opt-in and adds a gateway plus an internal OpenTelemetry collector; normal single-project tracing above is unchanged when fanout is not deployed. + +Fanout uses two configuration layers: + +- Deployment environment variables define the central project, gateway, and allowed tenant destinations at startup. +- Tenant app configuration supplies that tenant's public key, encrypted secret key, and one allowed destination. Keys can be changed at runtime without restarting the gateway. + +The included Compose override supports the `eu`, `us`, and `jp` Langfuse Cloud destinations: + +```sh filename=".env" +LANGFUSE_BASE_URL=https://cloud.langfuse.com +LANGFUSE_FANOUT_CENTRAL_BASE_URL=https://cloud.langfuse.com +LANGFUSE_FANOUT_CENTRAL_AUTH_HEADER="Basic " +LANGFUSE_FANOUT_TENANT_DESTINATIONS="eu=https://cloud.langfuse.com,us=https://us.cloud.langfuse.com,jp=https://jp.cloud.langfuse.com" +LANGFUSE_FANOUT_TRACE_DESTINATION_KEYS=eu,us,jp +LANGFUSE_FANOUT_TENANT_EXPORT_DISABLED=false +``` + +Start the regular Compose stack with the fanout override: + +```sh +docker compose -f docker-compose.yml -f docker-compose.langfuse-fanout.yml up -d +``` + +The override enables `LANGFUSE_FANOUT_ENABLED`, points LibreChat at the gateway, and starts the collector and private Redis services. For the deployed stack, combine `deploy-compose.yml` with `deploy-compose.langfuse-fanout.yml` instead. + +For Helm, set `langfuseFanout.enabled: true`, configure `langfuseFanout.central`, and list allowed destinations under `langfuseFanout.tenant.destinations`. Store the central Basic auth header and Redis password in Kubernetes Secrets. + +Tenant configuration uses the following shape. Prefer an administrator-facing config interface so `secretKey` is encrypted at write time; `displaySecretKey` is generated for redacted display and should not be supplied directly. + +```yaml filename="Tenant app configuration" +langfuse: + enabled: true + publicKey: 'pk-lf-tenant' + secretKey: 'sk-lf-tenant' + destination: 'us' + fanout: + enabled: true +``` + +Tenant export occurs only when fanout is enabled, both tenant keys are present, and `destination` matches an allowed startup destination. Other traces can still flow to the central project. Set `LANGFUSE_FANOUT_TENANT_EXPORT_DISABLED=true` as an emergency switch to stop tenant trace and feedback-score export while retaining central export. + +Trace and media traffic goes through the fanout gateway. Feedback scores are sent directly from LibreChat: central scores use `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, and `LANGFUSE_BASE_URL`, while tenant scores use tenant app configuration. + +See the [Langfuse fanout deployment reference](https://github.com/danny-avila/LibreChat/blob/dev/otel/langfuse-fanout/README.md) for every gateway variable, custom destination setup, metrics, scaling, and Redis behavior. + ## Restart LibreChat After adding the environment variables, restart your LibreChat instance to apply the changes: diff --git a/content/docs/configuration/librechat_yaml/example.mdx b/content/docs/configuration/librechat_yaml/example.mdx index c4d59b3a4..fd3865343 100644 --- a/content/docs/configuration/librechat_yaml/example.mdx +++ b/content/docs/configuration/librechat_yaml/example.mdx @@ -10,7 +10,7 @@ icon: FileCode This example config includes all documented endpoints (Except Azure, LiteLLM, MLX, and Ollama, which all require additional configurations) ```yaml filename="librechat.yaml" -version: 1.3.13 +version: 1.3.14 cache: true @@ -323,7 +323,7 @@ This example configuration file sets up LibreChat with detailed options across s # https://www.librechat.ai/docs/configuration/librechat_yaml # Configuration version (required) -version: 1.3.13 +version: 1.3.14 # Cache settings: Set to true to enable caching cache: true diff --git a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx index d2f8c8e47..d3fa0a2fc 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx @@ -14,8 +14,8 @@ endpoints: maxRecursionLimit: 100 disableBuilder: false # (optional) Agent Capabilities available to all users. Omit the ones you wish to exclude. Defaults to list below. - # Add "programmatic_tools" with "execute_code" to enable Programmatic Tool Calling for MCP tools. - # capabilities: ["deferred_tools", "execute_code", "file_search", "web_search", "artifacts", "subagents", "actions", "context", "skills", "tools", "chain", "ocr"] + # Opt-in capabilities: "programmatic_tools", "stateful_code_sessions", and "run_in_background". + # capabilities: ["deferred_tools", "execute_code", "file_search", "web_search", "artifacts", "subagents", "actions", "context", "skills", "memory", "ask_user_question", "tools", "chain", "ocr"] # (optional) File citation configuration for file_search capability maxCitations: 30 # Maximum total citations in responses (1-50) maxCitationsPerFile: 7 # Maximum citations from each file (1-10) @@ -23,6 +23,14 @@ endpoints: titleTiming: immediate skills: maxCatalogSkills: 20 + toolApproval: + enabled: true + mode: default + deny: ['mcp:*:delete_*'] + ask: ['mcp:*:*'] + checkpointer: + type: mongo + ttl: 86400 remoteApi: auth: oidc: @@ -162,9 +170,9 @@ allowedProviders: ]} /> -**Default:** `["deferred_tools", "execute_code", "file_search", "web_search", "artifacts", "subagents", "actions", "context", "skills", "tools", "chain", "ocr"]` +**Default:** `["deferred_tools", "execute_code", "file_search", "web_search", "artifacts", "subagents", "actions", "context", "skills", "memory", "ask_user_question", "tools", "chain", "ocr"]` -Programmatic Tool Calling is opt-in. Add `programmatic_tools` alongside `execute_code` only when your Code Interpreter deployment includes the Tool Call Server component. +`programmatic_tools`, `stateful_code_sessions`, and `run_in_background` are opt-in and must be added explicitly. Programmatic tools and stateful sessions also require `execute_code` and a compatible Code Interpreter deployment. **Example:** @@ -182,13 +190,113 @@ capabilities: - 'actions' - 'context' - 'skills' + - 'memory' + - 'ask_user_question' - 'tools' - 'chain' - 'ocr' + # Optional: reuse one Code Interpreter workspace per conversation. + # - 'stateful_code_sessions' + # Optional: allow selected eligible MCP tools to run as background tasks. + # - 'run_in_background' ``` **Note:** This field is optional. If omitted, the default behavior is to include all the capabilities listed in the default. +## toolApproval + +Controls human review for Agent tool calls. This feature is disabled by default. When enabled, matching calls pause until the user submits an allowed decision, such as approving, rejecting, or editing the arguments. + + + +Patterns use glob matching. MCP tools can be scoped with `mcp::`; for example, `mcp:github:*` matches every tool from the `github` server. Evaluation gives `deny` the highest priority, including in `bypass` mode. + +```yaml filename="endpoints / agents / toolApproval" +toolApproval: + enabled: true + mode: default + allow: + - 'mcp:analytics:read_*' + deny: + - 'mcp:*:delete_*' + ask: + - 'mcp:*:*' + reason: 'Review {tool} before it runs.' +``` + +Hooks are loaded once at server startup and execute in the LibreChat process. Each entry accepts a `module`, an optional tool-name `matcher` regex, and an optional `options` object passed to the module's builder. Only load code you trust. Per-role or tenant overrides do not reload hook modules; implement contextual behavior inside the hook. + +```yaml filename="endpoints / agents / toolApproval / hooks" +toolApproval: + enabled: true + hooks: + - module: '@acme/librechat-approval-hook' + matcher: '^mcp:production:' + options: + requireTicket: true +``` + +## checkpointer + +Configures storage for Agent runs paused by tool approval or Ask User. When either feature needs a checkpointer and this block is omitted, LibreChat uses the primary MongoDB with a 24-hour decision window. + + + +```yaml filename="endpoints / agents / checkpointer" +checkpointer: + type: mongo + ttl: 86400 +``` + +Use `type: memory` only for a single-process development deployment. A paused run stored in memory cannot resume after a restart or on another replica. + ## skills Controls endpoint-level Skills settings for agents. @@ -329,6 +437,7 @@ The `capabilities` field allows you to enable or disable specific functionalitie - **deferred_tools**: Allows agents to discover deferred MCP tools at runtime instead of loading every tool into context upfront. - **programmatic_tools**: Enables Programmatic Tool Calling for MCP tools marked Programmatic in the Agent Builder. Requires `execute_code` and a Code Interpreter deployment with the Tool Call Server component. This capability is opt-in and is not enabled by default. - **execute_code**: Allows the agent to execute code. +- **stateful_code_sessions**: Lets opted-in agents reuse one Code Interpreter workspace per conversation. Requires `execute_code`, a compatible Code Interpreter deployment, and the per-agent Advanced setting. This experimental capability is not enabled by default. - **file_search**: Enables the agent to search and interact with files. When enabled, citation behavior is controlled by `maxCitations`, `maxCitationsPerFile`, and `minRelevanceScore` settings. - **web_search**: Enables web search functionality for agents, allowing them to search and retrieve information from the internet. - **artifacts**: Enables the agent to generate interactive artifacts (React components, HTML, Mermaid diagrams). @@ -336,9 +445,12 @@ The `capabilities` field allows you to enable or disable specific functionalitie - **actions**: Permits the agent to perform predefined actions. - **context**: Enables "Upload as Text" functionality in chat, and "File Context" for agents, allowing users to upload files and have their content extracted and included directly in the conversation. - **skills**: Enables Skills in the side panel, manual `$` invocation, model-invoked skills, and agent skill allowlists. See [Skills](/docs/features/skills). +- **memory**: Lets agents use `set_memory` and `delete_memory` when memory is configured and the user has access. Enabled by default; removed at runtime when memory is disabled. +- **ask_user_question**: Lets agents pause to ask the user questions and resume with the answer. Enabled by default. - **tools**: Grants the agent access to various tools. - **chain**: Enables Beta feature for agent chaining, also known as Mixture-of-Agents (MoA) workflows. - **ocr**: Optionally enhances "Upload as Text" in chat, and "File Context" for agents, allowing files to be uploaded and processed with OCR. **Requires an OCR service to be configured.** +- **run_in_background**: Lets eligible tools marked Background return immediately while the agent continues and polls for completion. This capability is not enabled by default. By specifying the capabilities, you can control the features available to users when interacting with agents. diff --git a/content/docs/configuration/librechat_yaml/object_structure/config.mdx b/content/docs/configuration/librechat_yaml/object_structure/config.mdx index 66b6ae249..94ee7a7fa 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/config.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/config.mdx @@ -11,7 +11,7 @@ icon: Settings @@ -28,6 +28,38 @@ icon: Settings ]} /> +## langfuse + + + +**Subkeys:** + + + +`displaySecretKey` is generated for redacted administrator display and should not be configured directly. See [Langfuse Configuration](/docs/configuration/langfuse#tenant-fanout-optional) for deployment variables, Compose and Helm setup, secret handling, and routing behavior. + ## skillSync @@ -841,6 +878,12 @@ see: [Memory Object Structure](/docs/configuration/librechat_yaml/object_structu 'Configures position-based tool result degradation for older messages.', '', ], + [ + 'retainRecent', + 'Object', + 'Preserves recent complete turns and/or tokens outside the generated summary.', + '', + ], ]} /> diff --git a/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx b/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx index 77874fe3a..3680d6aba 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx @@ -801,6 +801,7 @@ When `models.fetch: true` is used, these headers are also resolved and forwarded | `{{LIBRECHAT_USER_EMAILVERIFIED}}` | `emailVerified` | Boolean โ†’ String | Email verification status ("true" or "false") | | `{{LIBRECHAT_USER_TWOFACTORENABLED}}` | `twoFactorEnabled` | Boolean โ†’ String | 2FA status ("true" or "false") | | `{{LIBRECHAT_USER_TERMSACCEPTED}}` | `termsAccepted` | Boolean โ†’ String | Terms acceptance status ("true" or "false") | +| `{{LIBRECHAT_USER_TERMSACCEPTEDAT}}` | `termsAcceptedAt` | Date โ†’ String | Terms acceptance timestamp | **Available Request Body Placeholders:** diff --git a/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx b/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx index cb8f6abba..9171c125e 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx @@ -207,7 +207,7 @@ fileConfig: ]} /> -**Default:** All text files and common programming languages +**Default:** All text files, common programming languages, and `.eml` email files ```yaml filename="fileConfig / text / supportedMimeTypes" fileConfig: diff --git a/content/docs/configuration/librechat_yaml/object_structure/interface.mdx b/content/docs/configuration/librechat_yaml/object_structure/interface.mdx index 7cb10ade9..69951e10e 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/interface.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/interface.mdx @@ -298,6 +298,8 @@ interface: ]} /> +When modal acceptance is enabled, LibreChat records both the acceptance state and the time it was accepted. After upgrading an existing deployment, run `npm run migrate:terms-timestamp` to backfill accepted users that do not have a timestamp. The migration uses each user's account creation time as the fallback and asks for confirmation before writing. + ## modelSelect **Key:** diff --git a/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx b/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx index 81c5b8237..a5ed75d64 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx @@ -328,6 +328,7 @@ mcpServers: | `{{LIBRECHAT_USER_EMAILVERIFIED}}` | `emailVerified` | Boolean โ†’ String | Email verification status ("true" or "false") | | `{{LIBRECHAT_USER_TWOFACTORENABLED}}` | `twoFactorEnabled` | Boolean โ†’ String | 2FA status ("true" or "false") | | `{{LIBRECHAT_USER_TERMSACCEPTED}}` | `termsAccepted` | Boolean โ†’ String | Terms acceptance status ("true" or "false") | +| `{{LIBRECHAT_USER_TERMSACCEPTEDAT}}` | `termsAcceptedAt` | Date โ†’ String | Terms acceptance timestamp | **Note:** Missing fields will be replaced with empty strings. diff --git a/content/docs/configuration/librechat_yaml/object_structure/memory.mdx b/content/docs/configuration/librechat_yaml/object_structure/memory.mdx index 12166c734..e241ffb4a 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/memory.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/memory.mdx @@ -19,6 +19,7 @@ memory: personalize: true messageWindowSize: 5 agent: + enabled: true provider: 'openAI' model: 'gpt-4' instructions: 'You are a helpful assistant that remembers user preferences and context.' @@ -178,12 +179,29 @@ memory: [ 'agent', 'Object | Union', - 'Configures the agent responsible for memory processing. Can be either a reference to an existing agent by ID or a complete agent configuration.', - 'agent: { provider: "openAI", model: "gpt-4" }', + 'Configures the optional automatic memory agent. Can be either a reference to an existing agent by ID or a complete agent configuration.', + 'agent: { enabled: true, provider: "openAI", model: "gpt-4" }', ], ]} /> +Automatic extraction is opt-in. Set `agent.enabled: true` in either configuration format below. Omitting `enabled`, or setting it to `false`, keeps manual memory and Agent memory tools available without running the automatic memory agent on chat requests. + +### enabled + + + +**Default:** `false` + The `agent` field supports two different configuration formats: ### Agent by ID @@ -193,6 +211,7 @@ When you have a pre-configured agent, you can reference it by its ID: ```yaml filename="memory / agent (by ID)" memory: agent: + enabled: true id: 'memory-agent-001' ``` @@ -203,6 +222,7 @@ For more control, you can define a complete agent configuration: ```yaml filename="memory / agent (custom)" memory: agent: + enabled: true provider: 'openAI' model: 'gpt-4' instructions: 'You are a memory assistant that helps maintain conversation context and user preferences.' @@ -268,7 +288,7 @@ When using custom agent configuration, the following fields are available: Here's a comprehensive example showing all memory configuration options: ```yaml filename="librechat.yaml" -version: 1.3.10 +version: 1.3.14 cache: true memory: @@ -284,6 +304,7 @@ memory: personalize: true messageWindowSize: 8 agent: + enabled: true provider: 'openAI' model: 'gpt-4' instructions: | @@ -330,6 +351,7 @@ memory: personalize: true messageWindowSize: 10 agent: + enabled: true provider: 'Custom Memory Endpoint' model: 'gpt-4o-mini' ``` @@ -344,6 +366,7 @@ memory: - `maxInputTokens` bounds the chat context sent to the automatic memory agent, while `tokenLimit` controls stored memory usage - Valid keys provide granular control over what information can be stored - Custom `instructions` replace default memory handling instructions and should be used with `validKeys` -- Agent configuration allows customization of memory processing behavior +- `agent.enabled: true` is required for automatic memory extraction +- Agent configuration allows customization of automatic memory processing behavior - When disabled, all memory features are turned off regardless of other settings - The message window size affects how much recent context is considered for memory updates diff --git a/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx b/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx index f6297749e..09015c82c 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx @@ -267,6 +267,34 @@ modelSpecs: --- +### showInMenu + + + +Set `showInMenu: false` to hide a spec from interactive selection while keeping it available for trusted server-side callers that explicitly send its `name` in the `spec` field. This differs from `showIconInMenu`, which hides only the icon. + +```yaml filename="modelSpecs / showInMenu" +modelSpecs: + list: + - name: 'api-only-assistant' + label: 'API-only Assistant' + showInMenu: false + preset: + endpoint: 'openAI' + model: 'gpt-4o-mini' +``` + +--- + ### iconURL + +Requires configured [User Memory](/docs/features/memory), the endpoint-level `memory` capability, and user memory permissions. When enabled, the model can save or delete structured memories when the user explicitly requests it. + +```yaml filename="modelSpecs / memory" +modelSpecs: + list: + - name: 'memory-assistant' + memory: true + preset: + endpoint: 'openAI' + model: 'gpt-4o-mini' +``` + +--- + +### askUserQuestion + + + +Requires the endpoint-level `ask_user_question` capability. This is supported in Agent chat runs that provide LibreChat's durable pause/resume flow. + +```yaml filename="modelSpecs / askUserQuestion" +modelSpecs: + list: + - name: 'interactive-assistant' + askUserQuestion: true + preset: + endpoint: 'openAI' + model: 'gpt-4o-mini' +``` + +--- + +### runInBackground + + + +Requires the opt-in endpoint-level `run_in_background` capability. LibreChat marks the spec's eligible tools as background-capable; the model can start one, continue working, and poll with `check_background_task`. Background task state is process-local and does not survive a server restart or move across replicas. + +```yaml filename="modelSpecs / runInBackground" +modelSpecs: + list: + - name: 'operations-assistant' + mcpServers: ['operations'] + runInBackground: true + preset: + endpoint: 'openAI' + model: 'gpt-4o-mini' +``` + +--- + ### mcpServers **Supported by:** `openAI`, `azureOpenAI`, custom (OpenAI-like), `bedrock` (ZAI, MoonshotAI models) @@ -1441,7 +1552,7 @@ preset: [ 'reasoning_effort', 'String', - 'Controls the reasoning effort level for the model. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning. The `xhigh` option provides maximum reasoning capability for complex problems. For Bedrock, accepted values are `low`, `medium`, `high`.', + 'Controls the reasoning effort level for the model. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning. Supported OpenAI models may expose `xhigh` and `max`; for Bedrock, accepted values are `low`, `medium`, `high`.', '', ], ]} @@ -1486,6 +1597,62 @@ preset: --- +#### reasoning_mode + +**Accepted Values:** + +- `""` (empty string - unset) +- `"standard"` +- `"pro"` + +> **Supported by:** OpenAI Responses API models that expose reasoning mode, including GPT-5.6 + + + +```yaml +preset: + reasoning_effort: 'high' + reasoning_mode: 'pro' +``` + +--- + +#### reasoning_context + +**Accepted Values:** + +- `""` (empty string - unset) +- `"auto"` +- `"current_turn"` +- `"all_turns"` + +> **Supported by:** OpenAI Responses API models that expose reasoning context, including GPT-5.6 + + + +```yaml +preset: + reasoning_effort: 'high' + reasoning_context: 'all_turns' +``` + +For GPT-5.6, LibreChat defaults reasoning requests to the Responses API unless `useResponsesApi: false` is set explicitly. + +--- + #### useResponsesApi > **Supported by:** `openAI`, `azureOpenAI`, custom (OpenAI-like) diff --git a/content/docs/configuration/librechat_yaml/object_structure/summarization.mdx b/content/docs/configuration/librechat_yaml/object_structure/summarization.mdx index 9322d692a..a6b356336 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/summarization.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/summarization.mdx @@ -22,6 +22,9 @@ summarization: trigger: type: 'token_ratio' value: 0.8 + retainRecent: + turns: 2 + tokens: 2000 contextPruning: enabled: true keepLastAssistants: 3 @@ -188,6 +191,36 @@ summarization: value: 8000 ``` +## retainRecent + +Controls how much of the newest conversation content remains verbatim outside the generated summary. This helps preserve recent instructions, tool results, and conversational continuity during compaction. + + + +```yaml filename="summarization / retainRecent" +summarization: + retainRecent: + turns: 2 + tokens: 2000 +``` + +Both fields are optional. Omit `retainRecent` to use the Agents SDK's normal compaction behavior. + ## contextPruning This is **not** semantic memory over your entire conversation history. It does not index, embed, or search past conversations. Instead, it maintains a structured set of key/value pairs (e.g., `user_preferences`, `learned_facts`) that are injected into each request as context. Think of it as a persistent notepad the AI reads before every response. @@ -22,20 +22,21 @@ For context about previous messages within a single conversation, LibreChat alre ## Key Features -- **Runs Every Request**: The memory agent executes at the start of each chat request, ensuring stored context is always available +- **Optional Automatic Extraction**: Set `memory.agent.enabled: true` to run the configured memory agent with chat requests - **Key/Value Storage**: Information is stored as structured key/value pairs, not as raw conversation logs - **Manual Entries**: Users can manually add, edit, or remove memory entries directly, giving full control over what the AI remembers - **User Control**: When enabled, users can toggle memory on/off for their individual chats - **Customizable Keys**: Restrict what categories of information can be stored using `validKeys` - **Token Management**: Set limits on memory usage to control costs -- **Agent Integration**: Use AI agents to intelligently manage what gets remembered +- **Agent Tools**: Agents can save or delete memories when the user explicitly requests it +- **Agent Partitions**: Keep an agent's memories separate from the user's shared personal pool ## Configuration To enable memory features, you need to add the `memory` configuration to your `librechat.yaml` file: ```yaml filename="librechat.yaml" -version: 1.3.5 +version: 1.3.14 cache: true memory: @@ -45,6 +46,7 @@ memory: maxInputTokens: 12000 # Maximum recent-chat tokens sent to the memory agent messageWindowSize: 5 # Number of recent messages to consider agent: + enabled: true # Automatic extraction is opt-in provider: 'openAI' model: 'gpt-4' ``` @@ -58,7 +60,7 @@ See the [Memory Configuration Guide](/docs/configuration/librechat_yaml/object_s ## How It Works -The memory agent runs on **every chat request** when memory is enabled. It executes concurrently with the main chat response โ€” it begins before the main response starts and is limited to the duration of the main request plus up to 3 seconds after it finishes. +When `memory.agent.enabled: true`, the configured memory agent runs with chat requests. It executes concurrently with the main chat response โ€” it begins before the main response starts and is limited to the duration of the main request plus up to 3 seconds after it finishes. This means every message you send triggers the memory agent to: @@ -75,6 +77,14 @@ This means every message you send triggers the memory agent to: +## Agent Memory + +The Agents endpoint includes a `memory` capability. When memory is configured, the user has memory write permissions, and personalization is enabled, adding **Memory** to an agent gives it `set_memory` and `delete_memory` tools. The agent is instructed to use these tools only when the user explicitly asks it to remember, update, or forget something. + +Agents use the user's shared personal memory pool by default. In the Agent Builder's Memory settings, enable **Keep memories separate for this agent** to isolate storage by user and agent. An isolated agent does not see existing personal memories or memories belonging to other isolated agents. Agent-scoped entries appear with the agent's name in the Memory panel and can be filtered by partition. + +The automatic memory agent and inline Agent memory tools are independent. `memory.agent.enabled: true` controls automatic extraction, while the Agents endpoint's `memory` capability controls whether saved Agents can manage memories during a conversation. + ### 1. Key/Value Storage Memory entries are stored as key/value pairs. When memory is enabled, the system can store entries such as: @@ -130,6 +140,7 @@ When using `validKeys`, provide custom instructions to the memory agent: ```yaml filename="memory / agent with instructions" memory: agent: + enabled: true provider: 'openAI' model: 'gpt-4' instructions: | @@ -156,6 +167,7 @@ memory: tokenLimit: 2000 maxInputTokens: 12000 agent: + enabled: true provider: 'openAI' model: 'gpt-4.1-mini' ``` @@ -173,6 +185,7 @@ memory: personalize: true messageWindowSize: 10 agent: + enabled: true provider: 'anthropic' model: 'claude-3-opus-20240229' instructions: 'Remember only explicitly stated preferences and key facts.' @@ -189,6 +202,7 @@ Reference an existing agent by ID: ```yaml filename="Memory with agent ID" memory: agent: + enabled: true id: 'memory-specialist-001' ``` @@ -222,6 +236,7 @@ memory: personalize: true messageWindowSize: 10 agent: + enabled: true provider: 'Custom Memory Endpoint' model: 'gpt-4o-mini' ``` diff --git a/content/docs/features/shareable_links.mdx b/content/docs/features/shareable_links.mdx index afaff9199..98b2870a8 100644 --- a/content/docs/features/shareable_links.mdx +++ b/content/docs/features/shareable_links.mdx @@ -4,7 +4,7 @@ icon: Share2 description: Share your conversations with others using LibreChat's shareable links feature, complete with QR codes, branching messages, and artifacts support. --- -Shareable links let you publish a read-only snapshot of a conversation that others can open through a generated URL or QR code. Recipients see the messages, any branches, and any artifacts you generated, without being able to reply or change anything. +Shareable links let you publish a read-only snapshot of a conversation that others can open through a generated URL or QR code. Recipients see the messages, branches, and artifacts without changing the shared original. Signed-in recipients can continue from the visible branch as a personal copy. ## Key Features @@ -13,6 +13,7 @@ Shareable links let you publish a read-only snapshot of a conversation that othe - **Branching**: Shared links keep every branch of the conversation. - **Artifacts**: React components, HTML previews, and Mermaid diagrams stay interactive. - **File snapshots**: Referenced conversation files can be previewed or downloaded from the shared link without granting recipients access to the owner's live file ACL. +- **Continue as a copy**: Signed-in viewers can copy the visible branch into their own conversation history and continue chatting. - **Recipient preferences**: Viewers can switch language and theme. - **Link management**: One dashboard to review or revoke every link you've created. @@ -70,6 +71,12 @@ When someone opens your link, they see a focused, read-only view of the conversa ![A shared conversation as a recipient sees it](/images/shared-links/shared-view.png) +## Continue a Shared Conversation + +An authenticated viewer can select **Continue this chat** to create a personal conversation from the branch currently shown. LibreChat copies only the direct path to the active message, including eligible snapshotted file references, and opens the new conversation under the viewer's account. + +Continuing never changes the shared snapshot or the owner's conversation. Public viewers must sign in before LibreChat can create their copy. + ## Branching Shared links preserve conversation branches, so recipients can follow the different paths the discussion took. Use the branch navigation arrows to move between them. @@ -157,7 +164,7 @@ For the full environment variable reference, see the [.env Configuration](/docs/ -No. Shared links are read-only. Recipients can view the conversation but cannot add messages or interact with the AI. +The shared snapshot remains read-only. Signed-in recipients can select **Continue this chat** to create a personal copy and interact with the AI there. From 767c2516204abbcb700cea7b57a0963bce14c2f0 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 22 Jul 2026 11:32:55 -0400 Subject: [PATCH 02/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Complete=20v0.8.8-?= =?UTF-8?q?rc1=20feature=20coverage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/config_v1.3.14.mdx | 6 ++ .../authentication/OAuth2-OIDC/index.mdx | 11 +++ .../configuration/authentication/index.mdx | 39 +++++++-- content/docs/configuration/dotenv.mdx | 84 ++++++++++++++++++- content/docs/configuration/langfuse.mdx | 82 +++++++++++++++++- .../object_structure/agents.mdx | 2 + .../object_structure/file_config.mdx | 1 + .../object_structure/interface.mdx | 4 +- .../object_structure/mcp_servers.mdx | 4 +- .../object_structure/mcp_settings.mdx | 2 + content/docs/configuration/metrics.mdx | 50 +++++++++-- .../pre_configured_ai/anthropic.mdx | 3 +- .../pre_configured_ai/bedrock.mdx | 4 +- .../pre_configured_ai/google.mdx | 19 ++--- .../pre_configured_ai/openai.mdx | 6 +- content/docs/features/access_control.mdx | 15 ++++ content/docs/features/agents.mdx | 45 +++++++--- content/docs/features/artifacts.mdx | 43 +++++----- content/docs/features/mcp.mdx | 21 +++-- content/docs/features/skills.mdx | 14 +++- content/docs/remote/docker_linux.mdx | 2 + 21 files changed, 379 insertions(+), 78 deletions(-) diff --git a/content/changelog/config_v1.3.14.mdx b/content/changelog/config_v1.3.14.mdx index b16412aff..f1a594578 100644 --- a/content/changelog/config_v1.3.14.mdx +++ b/content/changelog/config_v1.3.14.mdx @@ -43,6 +43,7 @@ version: '1.3.14' - Supports tenant public and secret keys, an allowed destination key, and `fanout.enabled` - Secret keys written through administrator config APIs are encrypted and returned only as a redacted display value - Added opt-in Compose and Helm fanout deployment settings for central and tenant-scoped trace export + - Added `LANGFUSE_FANOUT_LISTEN_ADDR` to override the gateway's default `:4318` listen address - Added Code Interpreter runtime settings - `CODE_SANDBOX_PREWARM` controls stateful sandbox prewarming @@ -54,6 +55,11 @@ version: '1.3.14' - `REMOTE_FILE_FETCH_TIMEOUT_MS` limits server-side remote file download time - `REMOTE_FILE_FETCH_MAX_BYTES` limits server-side remote file download size +- Added separate authentication token-submission rate limits + - `RESET_PASSWORD_SUBMISSION_MAX` and `RESET_PASSWORD_SUBMISSION_WINDOW` limit password-reset token validation independently from reset-email requests + - `VERIFY_EMAIL_SUBMISSION_MAX` and `VERIFY_EMAIL_SUBMISSION_WINDOW` limit verification-token validation independently from email resends + - Added separate violation-score controls for both submission limiters + - Added Agent conversation control `STEER_MAX_LENGTH` - Caps the length of one mid-run steering message diff --git a/content/docs/configuration/authentication/OAuth2-OIDC/index.mdx b/content/docs/configuration/authentication/OAuth2-OIDC/index.mdx index 95d9d168e..230ab714b 100644 --- a/content/docs/configuration/authentication/OAuth2-OIDC/index.mdx +++ b/content/docs/configuration/authentication/OAuth2-OIDC/index.mdx @@ -28,6 +28,17 @@ This section will cover how to configure OAuth2 and OpenID Connect with LibreCha - [Keycloak](/docs/configuration/authentication/OAuth2-OIDC/keycloak) - [Re-use OpenID Tokens for Login Session](/docs/configuration/authentication/OAuth2-OIDC/token-reuse) +### OpenID JWT User Cache + +High-request-rate deployments can set `AUTH_USER_CACHE_MODE=on` to cache the user document resolved for OpenID JWT authentication for five seconds. This reduces repeated database reads during short request bursts without extending the authentication token lifetime. + +The cache is off by default and requires `USE_REDIS=true` with the `AUTH_USER_DOC` namespace backed by Redis. LibreChat disables the mode and logs a warning when those requirements are not met. Cached documents are sanitized before storage and invalidated when the user is updated. + +```bash filename=".env" +USE_REDIS=true +AUTH_USER_CACHE_MODE=on +``` + ## Troubleshooting OpenID Connect If you encounter issues with OpenID Connect authentication: diff --git a/content/docs/configuration/authentication/index.mdx b/content/docs/configuration/authentication/index.mdx index 29c07407c..db5363447 100644 --- a/content/docs/configuration/authentication/index.mdx +++ b/content/docs/configuration/authentication/index.mdx @@ -12,28 +12,54 @@ Here's an overview of the general configuration. > **Note:** OpenID and SAML do not support the ability to disable only registration. +Setting `ALLOW_EMAIL_LOGIN=false` hides the email login form and rejects local or LDAP credential requests to `/api/auth/login`; OAuth, OpenID Connect, and SAML sign-in are unaffected. `ALLOW_EMAIL_LOGIN_OVERRIDE=true` is intended only for a controlled API integration that still needs credential login while the form is hidden. Every override use logs the request IP, so protect and monitor that route carefully. + Quick Tips: - Even with registration disabled, you can add users directly to the database using [the create-user script](#create-user-script) detailed below. - To delete a user, you can use [the delete-user script](#delete-user-script) also detailed below. - - ## Session Expiry and Refresh Token - Default values: session expiry: 15 minutes, refresh token expiry: 7 days @@ -135,4 +161,3 @@ To delete a user, you can use the delete-user script: ``` Replace `email@domain.com` with the email of the user you want to delete. - diff --git a/content/docs/configuration/dotenv.mdx b/content/docs/configuration/dotenv.mdx index 24e5fdc62..0189e21f8 100644 --- a/content/docs/configuration/dotenv.mdx +++ b/content/docs/configuration/dotenv.mdx @@ -398,6 +398,7 @@ Use the standard Langfuse variables for one central observability project. The o ['LANGFUSE_BASE_URL', 'string', 'Base URL for central tracing and feedback scores.', '# LANGFUSE_BASE_URL=https://cloud.langfuse.com'], ['LANGFUSE_FANOUT_ENABLED', 'boolean', 'Enable routing through the optional fanout gateway.', '# LANGFUSE_FANOUT_ENABLED=false'], ['LANGFUSE_FANOUT_COLLECTOR_URL', 'string', 'Gateway URL used by the LibreChat API.', '# LANGFUSE_FANOUT_COLLECTOR_URL=http://langfuse-fanout-collector:4318'], + ['LANGFUSE_FANOUT_LISTEN_ADDR', 'string', 'Gateway HTTP listen address. Default: :4318.', '# LANGFUSE_FANOUT_LISTEN_ADDR=:4318'], ['LANGFUSE_FANOUT_TENANT_EXPORT_DISABLED', 'boolean', 'Emergency switch that disables tenant trace and score export while retaining central export.', '# LANGFUSE_FANOUT_TENANT_EXPORT_DISABLED=false'], ['LANGFUSE_FANOUT_CENTRAL_BASE_URL', 'string', 'Central Langfuse base URL used by the gateway.', '# LANGFUSE_FANOUT_CENTRAL_BASE_URL=https://cloud.langfuse.com'], ['LANGFUSE_FANOUT_CENTRAL_AUTH_HEADER', 'string', 'Full Basic authorization header for central trace and media export.', '# LANGFUSE_FANOUT_CENTRAL_AUTH_HEADER=Basic '], @@ -584,6 +585,8 @@ LibreChat can publish browser Real User Monitoring (RUM) telemetry to HyperDX-co In `publicToken` mode, the browser sends telemetry directly to `RUM_URL` with `RUM_PUBLIC_TOKEN`. In `proxy` mode, the browser sends telemetry through LibreChat; the backend validates the user session, strips app authentication headers, and forwards telemetry to `RUM_PROXY_TARGET_URL`. Invalid or expired sessions are dropped with a `204` response so browser telemetry failures do not surface normal API authentication errors. Proxy outcomes are counted in `rum_proxy_requests_total` with `endpoint` and `result` labels on the LibreChat API `/metrics` endpoint. +For sampled page loads, LibreChat emits one `page-load-diagnostics` action when First Contentful Paint is observed. It includes navigation timing attribution such as time to first byte, first-byte-to-FCP time, service-worker timing, navigation type, and a normalized route instead of raw conversation IDs. RUM also records early page lifecycle, service-worker, stale-asset recovery, and single-page-app route-change events. Diagnostics are best-effort and never delay startup or trigger recovery behavior; early events are discarded when the page is not sampled. + ### Configuration Path - `librechat.yaml` Specify an alternative location for the LibreChat configuration file. @@ -1244,6 +1247,10 @@ See detailed instructions here: **[OpenWeather](/docs/configuration/tools/openwe ]} /> +With `FILE_UPLOAD_SSE_ENABLED=true`, clients that request `text/event-stream` receive one-second heartbeat events while upload processing is still running, followed by a `data` or `error` event and a final `close` event. Clients that do not request SSE continue to receive the normal JSON response. This is useful when a reverse proxy would otherwise close an idle connection during long OCR, parsing, or RAG work. + +The remote fetch controls apply when LibreChat ingests an HTTP or HTTPS file URL into local, Firebase, Azure, or S3/CloudFront storage. LibreChat checks both a declared `Content-Length` and the bytes actually streamed, so the limit still applies when the remote server omits or misstates its length. These controls are independent of the per-upload limits in [`fileConfig`](/docs/configuration/librechat_yaml/object_structure/file_config). + ## Code Interpreter The Code Interpreter API provides a secure environment for executing code and managing files. See: [Code Interpreter API](/docs/features/code_interpreter) @@ -1569,6 +1576,63 @@ Prevents brute force attacks and spam registrations by limiting login attempts a ]} /> +#### Password reset and email verification rate limiting + +LibreChat applies separate IP-based limits to requesting an email and submitting the token from that email. This prevents repeated token guesses without forcing deployments to use the same limit for email delivery and token validation. + + + #### Score for each violation . +docker push registry.example.com/librechat-langfuse-fanout: +``` + +Create a Kubernetes Secret containing the full central Langfuse Basic auth header. Its value is `Basic ` followed by base64-encoded `:` credentials: + +```sh +kubectl create secret generic langfuse-central \ + --from-literal=LANGFUSE_FANOUT_CENTRAL_AUTH_HEADER='Basic ' +``` + +Enable the fanout deployment in Helm values. This example uses the bundled Redis chart; set `langfuseFanout.redis.uri` instead when using an external Redis service. + +```yaml filename="values.yaml" +redis: + enabled: true + +langfuseFanout: + enabled: true + image: + repository: registry.example.com/librechat-langfuse-fanout + tag: '' + pullPolicy: IfNotPresent + central: + baseUrl: https://cloud.langfuse.com + authHeaderSecret: + name: langfuse-central + key: LANGFUSE_FANOUT_CENTRAL_AUTH_HEADER + metrics: + secret: + name: librechat-metrics + key: METRICS_SECRET + tenant: + destinations: + eu: + baseUrl: https://cloud.langfuse.com + us: + baseUrl: https://us.cloud.langfuse.com + jp: + baseUrl: https://jp.cloud.langfuse.com + upstreamTimeout: 30s + publicUrl: '' + otelCollector: + receiverEndpoint: 127.0.0.1:4319 + redis: + uri: '' + username: '' + passwordSecret: + name: '' + key: REDIS_PASSWORD + keyPrefix: langfuse-fanout + memoryLimitMiB: 256 + memorySpikeLimitMiB: 64 + batchTimeout: 1s + batchSendSize: 128 + metadataCardinalityLimit: 1000 +``` + +The metrics Secret is optional, but `/metrics` returns `401` unless `langfuseFanout.metrics.secret` supplies a bearer token. Create it separately when metrics scraping is required: + +```sh +kubectl create secret generic librechat-metrics \ + --from-literal=METRICS_SECRET='' +``` + +The chart renders one Deployment with a gateway container on port `4318` and an internal OpenTelemetry Collector sidecar on port `4319`; only the gateway is exposed by the Service. It also injects `LANGFUSE_FANOUT_ENABLED` and the internal `LANGFUSE_FANOUT_COLLECTOR_URL` into LibreChat unless those keys are already set in `librechat.configEnv`. + +Redis stores short-lived, one-time media upload plans so create and upload requests can reach different gateway replicas. For an external authenticated Redis service, set `langfuseFanout.redis.uri`, optional `username`, and `passwordSecret`; keep credentials out of the URI because the URI is rendered directly into the Deployment environment. With the bundled Redis chart and authentication enabled, provide a compatible password Secret or an explicitly authenticated external URI. + +Scale fanout manually with `langfuseFanout.replicaCount`; the chart does not create a fanout HPA. Liveness and readiness probes use `/healthz` and can be customized under `langfuseFanout.livenessProbe` and `langfuseFanout.readinessProbe`. + +Additional deployment overrides include `langfuseFanout.service` for the Service type, port, and annotations; `resources`, `podAnnotations`, and `podLabels` for the gateway Pod; and `otelCollector.image` and `otelCollector.resources` for the sidecar. If you change `langfuseFanout.traceCollectorUrl` or `otelCollector.receiverEndpoint`, keep both values pointed at the same internal collector listener. Tenant configuration uses the following shape. Prefer an administrator-facing config interface so `secretKey` is encrypted at write time; `displaySecretKey` is generated for redacted display and should not be supplied directly. diff --git a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx index d3fa0a2fc..3e4abec7b 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx @@ -297,6 +297,8 @@ checkpointer: Use `type: memory` only for a single-process development deployment. A paused run stored in memory cannot resume after a restart or on another replica. +MongoDB checkpoints log a warning when serialized state exceeds 8 MiB and reject a durable pause above 15 MiB, leaving headroom below MongoDB's 16 MiB document limit. Large inlined media or tool outputs are common causes; start a new conversation or reduce its context if a run reports `CHECKPOINT_TOO_LARGE`. + ## skills Controls endpoint-level Skills settings for agents. diff --git a/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx b/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx index 9171c125e..f747207bd 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx @@ -37,6 +37,7 @@ There are 8 main fields under `fileConfig`: - `YourCustomEndpointName` - You can omit values, in which case, the app will use the default values as defined per endpoint type listed below. - LibreChat counts 1 megabyte as follows: `1 x 1024 x 1024` +- Long-running upload response streaming and server-side remote URL fetch limits are configured with the [`FILE_UPLOAD_SSE_ENABLED`, `REMOTE_FILE_FETCH_TIMEOUT_MS`, and `REMOTE_FILE_FETCH_MAX_BYTES` environment variables](/docs/configuration/dotenv#file-uploads). ## Example diff --git a/content/docs/configuration/librechat_yaml/object_structure/interface.mdx b/content/docs/configuration/librechat_yaml/object_structure/interface.mdx index 69951e10e..69ba56ba5 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/interface.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/interface.mdx @@ -298,7 +298,7 @@ interface: ]} /> -When modal acceptance is enabled, LibreChat records both the acceptance state and the time it was accepted. After upgrading an existing deployment, run `npm run migrate:terms-timestamp` to backfill accepted users that do not have a timestamp. The migration uses each user's account creation time as the fallback and asks for confirmation before writing. +When modal acceptance is enabled, LibreChat records both the acceptance state and the time it was accepted. After upgrading an existing deployment, run `npm run migrate:terms-timestamp` to backfill accepted users that do not have a timestamp. The migration asks for confirmation, processes all tenants, uses each user's account creation time as the fallback, and exits non-zero if any batch fails. Running `npm run reset-terms` clears both the acceptance state and its timestamp so users must accept again. ## modelSelect @@ -1098,7 +1098,7 @@ interface: Enables/disables the web search button in the chat interface. More info on [Web Search Configuration](/docs/configuration/librechat_yaml/object_structure/web_search) -**Note:** This setting does not disable the [Agents Web Search Capability](/docs/features/agents#web-search). To disable the Agents Capability, see the [Agents Endpoint configuration](/docs/configuration/librechat_yaml/object_structure/agents) instead. +**Note:** This setting does not disable the [Agents Web Search capability](/docs/features/agents#agent-capabilities). To disable the Agents capability, see the [Agents endpoint configuration](/docs/configuration/librechat_yaml/object_structure/agents#capabilities) instead. > **Deprecated for permission management.** Seeds the `WEB_SEARCH` role permission at startup for the default `USER` role only. Prefer the [Admin Panel](/docs/features/admin_panel). diff --git a/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx b/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx index a5ed75d64..aa552fd7d 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx @@ -552,7 +552,7 @@ See [OpenID Connect Token Reuse](/docs/configuration/authentication/OAuth2-OIDC/ - **Optional Subkeys:** - `grant_types_supported`: Array of Strings - Supported grant types (defaults to `["authorization_code", "refresh_token"]`) - `token_endpoint_auth_methods_supported`: Array of Strings - Supported token endpoint authentication methods (defaults to `["client_secret_basic", "client_secret_post"]`) - - `token_exchange_method`: String - Token exchange request method. Use `default_post` for providers that expect the OAuth client credentials in the POST body. + - `token_exchange_method`: String - Optional token exchange override. Use `default_post` to send client credentials in the form-encoded POST body, or `basic_auth_header` to send them in an HTTP Basic authorization header. When omitted, LibreChat discovers the provider's advertised token endpoint authentication methods and defaults to Basic auth if none are advertised. - `response_types_supported`: Array of Strings - Supported response types (defaults to `["code"]`) - `code_challenge_methods_supported`: Array of Strings - Supported PKCE code challenge methods (defaults to `["S256", "plain"]`) - `skip_code_challenge_check`: Boolean - Skip checking whether the OAuth provider advertises PKCE support. Useful for providers like AWS Cognito that support S256 but don't advertise it in their metadata. (defaults to `false`) @@ -573,6 +573,8 @@ See [OpenID Connect Token Reuse](/docs/configuration/authentication/OAuth2-OIDC/ code_challenge_methods_supported: ['S256', 'plain'] ``` +When `token_exchange_method` and `token_endpoint_auth_methods_supported` are both omitted for a preconfigured client secret, LibreChat allows up to five seconds for protected-resource and authorization-server metadata discovery. It uses advertised capabilities only when the discovered token endpoint exactly matches the configured `token_url`; discovery cannot redirect the configured client credentials to another endpoint. Set `token_exchange_method` explicitly when a provider does not publish usable metadata or needs a forced method. + #### `oauth_headers` - **Type:** Object (Optional) diff --git a/content/docs/configuration/librechat_yaml/object_structure/mcp_settings.mdx b/content/docs/configuration/librechat_yaml/object_structure/mcp_settings.mdx index 54c7c6da7..b7e9f6778 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/mcp_settings.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/mcp_settings.mdx @@ -36,6 +36,8 @@ mcpSettings: ]} /> +## allowedDomains + ### Security Context (SSRF Protection) LibreChat includes SSRF (Server-Side Request Forgery) protection with the following behavior: diff --git a/content/docs/configuration/metrics.mdx b/content/docs/configuration/metrics.mdx index cb688c78b..57e12bed7 100644 --- a/content/docs/configuration/metrics.mdx +++ b/content/docs/configuration/metrics.mdx @@ -1,18 +1,56 @@ --- title: Metrics icon: BarChart3 -description: This document explains how to add a metrics exporter for Prometheus to LibreChat. +description: Monitor LibreChat with its built-in Prometheus metrics and the optional database metrics exporter. --- -### General +## General ![Active users in LibreChat](/images/metrics/librechat-metrics-active-users.png) -You can use Prometheus or any other OpenMetrics compatible monitoring tool to get metrics about active usage of LibreChat. -This includes technical information like the usage of tokens, -but also information about end users like the number of total or active users. +LibreChat provides two Prometheus-compatible metrics surfaces. The API's built-in `/metrics` endpoint reports operational behavior such as Redis activity and browser telemetry proxy outcomes. The optional database exporter reports usage data stored in MongoDB, including token totals and active-user counts. -LibreChat also exposes built-in Prometheus metrics from the API server at `/metrics` when `METRICS_SECRET` is configured. Scrape it with `Authorization: Bearer `. Browser RUM proxy outcomes are reported as `rum_proxy_requests_total{endpoint,result}`, where `endpoint` is `traces`, `logs`, or `unknown`, and `result` can be `success`, `auth_drop`, `auth_error`, `bad_request`, `not_configured`, `collector_4xx`, `collector_5xx`, `collector_error`, or `collector_timeout`. +## Built-in API Metrics + +LibreChat exposes Prometheus metrics from the API server at `/metrics`. Set `METRICS_SECRET` and scrape the endpoint with `Authorization: Bearer `. The endpoint returns `401` when the secret is unset, the header is missing, or the token does not match. + +```yaml filename="prometheus.yml" +scrape_configs: + - job_name: librechat-api + scheme: https + metrics_path: /metrics + authorization: + type: Bearer + credentials: your-metrics-secret + static_configs: + - targets: ['librechat.example.com'] +``` + +### Redis Metrics + +Redis-backed caches and services emit two logical-operation metrics: + +- `redis_operations_total{client,use_case,operation,status}` counts operations. +- `redis_operation_duration_seconds{client,use_case,operation,status}` measures latency. + +`client` is `keyv` or `ioredis`, and `status` is `success` or `error`. Bounded `use_case` labels identify work such as caches, sessions, rate limits, concurrency, ACL principals, resumable stream jobs and pub/sub, MCP registry scans, and leader election. These metrics count LibreChat's logical operations rather than every internal Redis round trip. Connection lifecycle pings and global maintenance are excluded, and clearing a namespace is counted as one logical operation. + +When [backend OpenTelemetry tracing](/docs/configuration/dotenv#opentelemetry-tracing) is enabled, each HTTP span also summarizes its Redis work with: + +- `librechat.redis.calls` +- `librechat.redis.duration_ms` +- `librechat.redis.errors` +- `librechat.redis.max_call_ms` +- `librechat.redis.operations` +- `librechat.redis.use_cases` + +The ten use cases with the highest total duration also receive `calls`, `duration_ms`, `errors`, and `max_call_ms` attributes under `librechat.redis..*`. This request-level summary does not require command-level Redis spans; enable `OTEL_IOREDIS_TRACING_ENABLED` only when individual command spans are needed. + +### Browser RUM Proxy Metrics + +Browser RUM proxy outcomes are reported as `rum_proxy_requests_total{endpoint,result}`. `endpoint` is `traces`, `logs`, or `unknown`; `result` can be `success`, `auth_drop`, `auth_error`, `bad_request`, `not_configured`, `collector_4xx`, `collector_5xx`, `collector_error`, or `collector_timeout`. + +## Database Metrics Exporter The metrics exporter is available at [virtUOS/librechat_exporter](https://github.com/virtUOS/librechat_exporter). It is a separate tool you deploy alongside LibreChat. diff --git a/content/docs/configuration/pre_configured_ai/anthropic.mdx b/content/docs/configuration/pre_configured_ai/anthropic.mdx index b9133d1df..9d980516f 100644 --- a/content/docs/configuration/pre_configured_ai/anthropic.mdx +++ b/content/docs/configuration/pre_configured_ai/anthropic.mdx @@ -14,12 +14,13 @@ ANTHROPIC_API_KEY=user_provided - You can determine which models you would like to have available with `ANTHROPIC_MODELS`. ```bash filename=".env" -ANTHROPIC_MODELS=claude-fable-5,claude-opus-4-8,claude-opus-4-7,claude-sonnet-4-6,claude-opus-4-6,claude-opus-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022 +ANTHROPIC_MODELS=claude-fable-5,claude-opus-4-8,claude-opus-4-7,claude-sonnet-5,claude-sonnet-4-6,claude-opus-4-6,claude-opus-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022 ``` **Notes:** - Claude Fable 5 is included in LibreChat's default Anthropic model catalog. Fable/Mythos-class models use the modern Anthropic profile in LibreChat: 1M context, 128K max output, adaptive thinking, prompt caching, and `thinkingDisplay` support for summarized or omitted reasoning output. +- Claude Sonnet 5 is available through direct Anthropic, Anthropic on Vertex AI, and AWS Bedrock. LibreChat assigns it a 1M-token context window and 128K-token maximum output, uses adaptive thinking with summarized display when thinking is enabled, and sends an explicit disabled setting when a user turns thinking off. - Anthropic endpoint supports all [Shared Endpoint Settings](/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings) via the `librechat.yaml` configuration file, including `streamRate`, `headers`, `titleModel`, `titleMethod`, `titlePrompt`, `titlePromptTemplate`, and `titleEndpoint` - To configure Anthropic or an Anthropic-compatible gateway as a separate custom endpoint, use [`provider: "anthropic"`](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#provider). diff --git a/content/docs/configuration/pre_configured_ai/bedrock.mdx b/content/docs/configuration/pre_configured_ai/bedrock.mdx index 9837b8e9f..f62097640 100644 --- a/content/docs/configuration/pre_configured_ai/bedrock.mdx +++ b/content/docs/configuration/pre_configured_ai/bedrock.mdx @@ -84,13 +84,15 @@ For AWS credential behavior details, see the [AWS SDK for JavaScript credential - You can optionally specify which models you want to make available with `BEDROCK_AWS_MODELS`: ```bash filename=".env" -BEDROCK_AWS_MODELS=anthropic.claude-fable-5,anthropic.claude-opus-4-8,anthropic.claude-opus-4-7,anthropic.claude-sonnet-4-6,meta.llama3-1-8b-instruct-v1:0 +BEDROCK_AWS_MODELS=anthropic.claude-fable-5,anthropic.claude-opus-4-8,anthropic.claude-opus-4-7,anthropic.claude-sonnet-5,anthropic.claude-sonnet-4-6,meta.llama3-1-8b-instruct-v1:0 ``` Note: If omitted, all known, supported model IDs will be included automatically. - Claude Fable/Mythos-class models on Bedrock are inference-profile only. Use a profile ID such as `us.anthropic.claude-fable-5`, and enable Anthropic data sharing in the Bedrock console or Data Retention API before invoking them. +- Claude Sonnet 5 has a 1M-token context window and 128K-token maximum output. LibreChat applies adaptive thinking to foundation, cross-region inference-profile (for example, `us.anthropic.claude-sonnet-5`), and bare application inference-profile IDs. Turning thinking off sends an explicit disabled setting so that choice persists when a conversation is reloaded. + - See all Bedrock model IDs here: - **[https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns)** diff --git a/content/docs/configuration/pre_configured_ai/google.mdx b/content/docs/configuration/pre_configured_ai/google.mdx index b878c2504..2b16c43e7 100644 --- a/content/docs/configuration/pre_configured_ai/google.mdx +++ b/content/docs/configuration/pre_configured_ai/google.mdx @@ -3,7 +3,7 @@ title: 'Google' icon: Google --- -For the Google Endpoint, you can either use the **Generative Language API** (for Gemini models), or the **Vertex AI API** (for Gemini, PaLM2 & Codey models). +For the Google endpoint, you can use either the **Gemini API through Google AI Studio** or the **Vertex AI API**. The Generative Language API uses an API key, which you can get from **Google AI Studio**. @@ -42,21 +42,18 @@ GOOGLE_AUTH_HEADER=true Since fetching the models list isn't yet supported, you should set the models you want to use in the .env file. -For your convenience, these are the latest models as of 5/18/24 that can be used with the Generative Language API: +For example, the following current models can be configured for the Gemini API: ```bash filename=".env" -GOOGLE_MODELS=gemini-1.5-flash-latest,gemini-1.0-pro,gemini-1.0-pro-001,gemini-1.0-pro-latest,gemini-1.0-pro-vision-latest,gemini-1.5-pro-latest,gemini-pro,gemini-pro-vision +GOOGLE_MODELS=gemini-3.6-flash,gemini-3.5-flash,gemini-3.5-flash-lite,gemini-3.1-pro-preview,gemini-3.1-pro-preview-customtools,gemini-3.1-flash-lite-preview,gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.0-flash,gemini-2.0-flash-lite ``` -- A gemini-pro model or `gemini-pro-vision` are required in your list for attaching images. -- Using LibreChat, PaLM2 and Codey models can only be accessed through Vertex AI, not the Generative Language API. - - Only models that support the `generateContent` method can be used natively with LibreChat + the Gen AI API. -- Selecting `gemini-pro-vision` for messages with attachments is not necessary as it will be switched behind the scenes for you. -- Since `gemini-pro-vision` does not accept non-attachment messages, messages without attachments are automatically switched to use `gemini-pro` otherwise Google responds with an error. +- Gemini 3.6 Flash, Gemini 3.5 Flash, and Gemini 3.5 Flash-Lite are supported through both Google AI Studio and Vertex AI. LibreChat assigns each a 1,048,576-token context window. +- LibreChat defaults Gemini 3.6 Flash and Gemini 3.5 Flash to `MEDIUM` thinking, and Gemini 3.5 Flash-Lite to `MINIMAL`. An explicit supported `thinkingLevel` is preserved. +- For these models, LibreChat removes unsupported sampling and penalty parameters (`temperature`, `topP`, `topK`, `presencePenalty`, and `frequencyPenalty`), ignores the older numeric `thinkingBudget`, and uses `thinkingLevel` instead. - With the Google endpoint, you cannot use both Vertex AI and Generative Language API at the same time. You must choose one or the other. -- Some PaLM/Codey models and `gemini-pro-vision` may fail when `maxOutputTokens` is set to a high value. If you encounter this issue, try reducing the value through the conversation parameters. @@ -170,10 +167,10 @@ GOOGLE_CLOUD_LOCATION=global Since fetching the models list isn't yet supported, you should set the models you want to use in the .env file. -For your convenience, these are the latest models as of 5/18/24 that can be used with the Generative Language API: +For Vertex AI, use the Vertex model IDs where they differ from the Gemini API: ```bash filename=".env" -GOOGLE_MODELS=gemini-1.5-flash-preview-0514,gemini-1.5-pro-preview-0514,gemini-1.0-pro-vision-001,gemini-1.0-pro-002,gemini-1.0-pro-001,gemini-pro-vision,gemini-1.0-pro +GOOGLE_MODELS=gemini-3.6-flash,gemini-3.5-flash,gemini-3.5-flash-lite,gemini-3.1-pro-preview,gemini-3.1-pro-preview-customtools,gemini-3.1-flash-lite-preview,gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.0-flash-001,gemini-2.0-flash-lite-001 ``` diff --git a/content/docs/configuration/pre_configured_ai/openai.mdx b/content/docs/configuration/pre_configured_ai/openai.mdx index d165f05fa..1488b6955 100644 --- a/content/docs/configuration/pre_configured_ai/openai.mdx +++ b/content/docs/configuration/pre_configured_ai/openai.mdx @@ -21,12 +21,14 @@ OPENAI_API_KEY=user_provided - When `OPENAI_API_KEY` is set to the actual API key value โ†’ as long as `OPENAI_MODELS` is left commented-out, it will do an API call to find out what models are available, which should include any new ones ```bash filename=".env" -OPENAI_MODELS=gpt-5,gpt-5-codex,gpt-5-mini,gpt-5-nano,o3-pro,o3,o4-mini,gpt-4.1,gpt-4.1-mini,gpt-4.1-nano,o3-mini,o1-pro,o1,gpt-4o,gpt-4o-mini +OPENAI_MODELS=gpt-5.6,gpt-5.6-terra,gpt-5.6-luna,gpt-5.5,gpt-5.5-pro,chat-latest,gpt-5.4,gpt-5.4-pro,gpt-5.4-mini,gpt-5.4-nano,gpt-5.3-codex,gpt-5.2,gpt-5,gpt-5-codex,gpt-5-mini,gpt-5-nano,o3-pro,o3,o4-mini,gpt-4.1,gpt-4.1-mini,gpt-4.1-nano,o3-mini,o1-pro,o1,gpt-4o,gpt-4o-mini ``` **Notes:** -- Internal OpenAI defaults include the current frontier catalog, including `gpt-5.5`, `gpt-5.5-pro`, `chat-latest`, `gpt-5.4`, `gpt-5.4-pro`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.3-codex`, and `gpt-5.2`. Deprecated legacy defaults are no longer included unless you add them explicitly with `OPENAI_MODELS`. +- Internal OpenAI defaults include `gpt-5.6`, `gpt-5.6-terra`, and `gpt-5.6-luna`, followed by the existing GPT-5 catalog. `gpt-5.6` is the Sol tier alias; LibreChat assigns all three GPT-5.6 tiers a 1,050,000-token context window and 128,000-token maximum output. Deprecated legacy defaults are no longer included unless you add them explicitly with `OPENAI_MODELS`. +- GPT-5.6 supports the Responses API-only `reasoning_mode` values `standard` and `pro`, plus `reasoning_context` values `auto`, `current_turn`, and `all_turns`. These can be configured in [model specs](/docs/configuration/librechat_yaml/object_structure/model_specs#reasoning_mode). +- For a GPT-5.6 model with a non-`none` `reasoning_effort`, LibreChat defaults the canonical OpenAI endpoint to the Responses API so function tools remain compatible. An explicit `useResponsesApi: false` keeps Chat Completions. Azure OpenAI, OpenRouter, and custom or reverse-proxy base URLs are not switched automatically. - Selecting a vision model for messages with attachments is not necessary as it will be switched behind the scenes for you. If you didn't outright select a vision model, it will only be used for the vision request and you should still see the non-vision model you had selected after the request is successful - OpenAI Vision models allow for messages without attachments - OpenAI endpoint supports all [Shared Endpoint Settings](/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings) via the `librechat.yaml` configuration file, including `streamRate`, `headers`, `titleModel`, `titleMethod`, `titlePrompt`, `titlePromptTemplate`, and `titleEndpoint` diff --git a/content/docs/features/access_control.mdx b/content/docs/features/access_control.mdx index 0fca8329e..108ef1a5d 100644 --- a/content/docs/features/access_control.mdx +++ b/content/docs/features/access_control.mdx @@ -185,6 +185,21 @@ A group is a named collection of users. LibreChat supports two sources: Groups can appear in any ACL, in `peoplePicker` search, and as a principal target for config overrides or system grants. A single resource shared with a 500-person group is one ACL entry (not 500), and membership changes in Entra propagate automatically on the next login. +### ACL Principal Cache Tuning + +LibreChat caches the group IDs used to resolve a user's ACL principals for five minutes by default. The cache is scoped by tenant and member identity, and group membership changes invalidate affected entries. It does not cache the user's role or the lookup of `idOnTheSource`, so those values continue to be resolved from the current request user or database. + +```bash filename=".env" +# Group-membership cache lifetime; 0 disables the cache +USER_PRINCIPALS_CACHE_TTL_MS=300000 + +# Redis-backed deployments only: deduplicate cold cache builds across replicas +USER_PRINCIPALS_LOCK_TTL_MS=5000 +USER_PRINCIPALS_LOCK_WAIT_MS=5000 +``` + +When the principal cache is Redis-backed, the lock settings prevent several replicas from rebuilding the same cold entry at once. Set `USER_PRINCIPALS_LOCK_TTL_MS=0` to disable only build locking; shared cache storage and cross-process invalidation remain active. Cache and lock failures fall back to the database and do not block permission checks. + ### Roles Any system or custom role can be used as a principal. Sharing an agent with a role (e.g. `SupportEngineers`) gives every user currently holding that role access, without needing to enumerate individuals. Roles can be hidden from the people picker via [`interface.peoplePicker.roles`](/docs/configuration/librechat_yaml/object_structure/interface#peoplepicker) for environments where role-based sharing is an admin-only concern. diff --git a/content/docs/features/agents.mdx b/content/docs/features/agents.mdx index d4805b9be..b76d687ce 100644 --- a/content/docs/features/agents.mdx +++ b/content/docs/features/agents.mdx @@ -24,7 +24,7 @@ The creation form includes: - **Instructions**: System instructions that define your agent's behavior - **Model**: Select from available providers and models -The **Tools** control opens a searchable marketplace for built-in capabilities, MCP servers, Skills, and orchestration tools. Select an item to configure it, then save the agent. +The **Tools** and **Skills** controls open searchable libraries for built-in capabilities, tools, MCP servers, Actions, and Skills. Select an item to configure it, then save the agent. **Existing agents can be selected from the top dropdown of the Side Panel.** @@ -32,6 +32,14 @@ The **Tools** control opens a searchable marketplace for built-in capabilities, ![Agents - Mention](/images/agents/mention.png) +### Tool Library + +The Agent Builder keeps enabled items in separate **Tools** and **Skills** sections. Open **Add tools** to search the complete catalog or filter it by **Official**, **Tools**, **MCP**, or **Actions**. **Made by you** collects MCP servers and Actions you created, while **Favorites** keeps starred items available across agents. Each user can save up to 100 tool-library favorites. + +Select an item to configure it without leaving the builder. The **Create new** menu appears only when the user has permission to create MCP servers or Actions. Removing a file-backed capability such as File Search, File Context, or Code Interpreter opens its file manager when attached files still need to be reviewed. + +Skills use their own picker and can be selected individually or enabled as the complete accessible catalog. See [Skills](/docs/features/skills#agent-scope). + ### Model Configuration The model parameters interface allows fine-tuning of your agent's responses: @@ -41,6 +49,10 @@ The model parameters interface allows fine-tuning of your agent's responses: - Max output tokens - Additional provider-specific settings +### Version History + +Users with edit access can open **Version History** from the Agent Builder to inspect saved configurations in a timeline. Each entry shows when it was saved and summarizes its tools and capabilities. Restoring an earlier entry requires confirmation and replaces the current agent configuration with that saved state. + ## Agent Capabilities > **Note:** All capabilities can be toggled via the `librechat.yaml` configuration file. See [docs/configuration/librechat_yaml/object_structure/agents#capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities) for more information. @@ -99,8 +111,8 @@ For more information, see documentation on [MCP](/docs/features/mcp). 1. Configure MCP servers in your `librechat.yaml` file 2. Restart LibreChat to initialize the connections 3. Create or edit an agent -4. Click the "Add Tools" button in the Agent Builder panel to open the Tools Dialog shown below -5. Select the MCP server(s) you want to add - each server appears as a single entry +4. Open **Add tools** in the Agent Builder and select **MCP** +5. Select the MCP server(s) you want to add; each server appears as a single entry 6. Save your changes to the agent In this example, we've added the **[Spotify MCP server](https://github.com/LibreChat-AI/spotify-mcp)** to an agent. @@ -169,6 +181,8 @@ Background task state is currently process-local. Results can be collected in a The **Ask User** tool lets an agent pause a run to request missing information, present choices, or confirm how to proceed. After the user answers, the same run resumes with the response. Add **Ask User** from the Tools marketplace; administrators can remove the default `ask_user_question` capability to hide it. +One Ask User call accepts a question up to 2,000 characters, optional supporting context up to 4,000 characters, and up to 12 choices. Choice labels are limited to 120 characters, choice values to 500 characters, and the submitted answer to 16,000 characters. + Administrators can also require review before matching tool calls run. Depending on the tool, users can approve, reject, edit arguments, or respond directly. Paused runs are checkpointed so they can resume after the decision, including on another replica when the default MongoDB checkpointer is used. Tool approval is disabled by default; see [`toolApproval` and `checkpointer`](/docs/configuration/librechat_yaml/object_structure/agents#toolapproval). ### Skills @@ -192,14 +206,15 @@ The Artifacts capability enables your agent to generate and display interactive - Configure artifact-specific instructions at the agent level - [More info about Artifacts](/docs/features/artifacts) -When enabled, additional instructions specific to the use of artifacts are added by default. Options include: +When enabled, choose one of three instruction modes: -- **Enable shadcn/ui instructions**: Adds instructions for using shadcn/ui components (a collection of re-usable components built using Radix UI and Tailwind CSS) -- **Custom Prompt Mode**: When enabled, the default artifacts system prompt will not be included, allowing you to provide your own custom instructions +- **Normal**: Adds the standard artifact instructions for React, HTML, SVG, Markdown, and Mermaid. +- **shadcn/ui**: Adds the standard instructions plus guidance for building interfaces with the shadcn/ui component library. +- **Custom**: Keeps artifact rendering enabled but injects no built-in artifact instructions, giving the agent's own instructions full control. Configuring artifacts at the agent level is the preferred approach, as it allows for more granular control compared to the legacy app-wide configuration. -If you enable Custom Prompt Mode, you should include at minimum the basic artifact format in your instructions. +If you select **Custom**, include at minimum the basic artifact format in your instructions. Here's a simple example of the minimum instructions needed: @@ -226,10 +241,10 @@ For the type attribute, use one of: Agents can also be enhanced with various built-in tools: -- **[OpenAI Image Tools](/docs/features/image_gen#1--openai-image-tools-recommended)**: Image generation & editing using **[GPT-Image-1](https://platform.openai.com/docs/models/gpt-image-1)** +- **[OpenAI Image Tools](/docs/features/image_gen#openai-image-tools)**: Image generation & editing using **[GPT-Image-1](https://platform.openai.com/docs/models/gpt-image-1)** - **[Gemini Image Tools](/docs/configuration/tools/gemini_image_gen)**: Image generation and image-context editing using Gemini image models -- **[DALL-E-3](/docs/features/image_gen#3--dalle-legacy)**: Image generation from text descriptions -- **[Stable Diffusion](/docs/features/image_gen#4--stable-diffusion-local)** / **[Flux](/docs/features/image_gen#5--flux)**: Text-to-image generation +- **[DALL-E-3](/docs/features/image_gen#dalle-legacy)**: Image generation from text descriptions +- **[Stable Diffusion](/docs/features/image_gen#stable-diffusion-local)** / **[Flux](/docs/features/image_gen#flux)**: Text-to-image generation - **[Wolfram](/docs/configuration/tools/wolfram)**: Computational and mathematical capabilities - **[OpenWeather](/docs/configuration/tools/openweather)**: Weather data retrieval - **[Google Search](/docs/configuration/tools/google_search)**: Access to web search functionality @@ -270,6 +285,12 @@ With the Actions capability, you can dynamically create tools from [OpenAPI spec If using an OpenAI model supporting it, this will automatically generate function calls with 'strict' mode enabled. - Strict mode supports only a partial subset of json. Read https://platform.openai.com/docs/guides/structured-outputs for details. +### Handoffs + +Handoffs let a primary agent transfer a conversation to a specialist agent with the relevant context. In **Advanced settings**, open the orchestration section and add up to 10 handoff agents. Each configured handoff creates a transfer tool that the model can choose dynamically when the specialist's expertise is needed. + +For each handoff, you can add a description that helps the model choose the right specialist. You can also provide passthrough instructions describing what content the primary agent should generate for the specialist and optionally rename the content parameter from its default, `instructions`. Handoffs are always available in the Agent Builder; unlike Agent Chain and Subagents, they do not require an endpoint capability to be enabled. + ### Agent Chain The Agent Chain capability enables a Mixture-of-Agents (MoA) approach, allowing you to create a sequence of agents that work together: @@ -423,6 +444,10 @@ While an Agent is responding, you can send another message in either of two ways Under **Settings โ†’ Chat**, **While generating, Enter will** chooses the default action. The send-button menu can override that choice for an individual message. +Pending steers appear above the composer until the server inserts them into the run. Once acknowledged, their menu can reclaim the message for editing, convert it into a queued follow-up, or cancel it and restore its text and attachments to the composer. LibreChat avoids overwriting a newer draft; if the composer is no longer available, it preserves the reclaimed message in the queue instead. A failed steer remains available to retry, edit, queue, or remove. + +Queued follow-ups can be sent immediately, converted into a steer while the run is still active, edited, or removed. Removing a queued message restores it to an empty composer when possible. One active run accepts up to 10 pending steers; each steer can include up to 10 files and is limited by [`STEER_MAX_LENGTH`](/docs/configuration/dotenv#agent-conversation-controls). + ### Notes - Instructions, model parameters, attached files, and tools are only exposed to the user if they have editing permissions diff --git a/content/docs/features/artifacts.mdx b/content/docs/features/artifacts.mdx index e3d3b059f..3978c0d7b 100644 --- a/content/docs/features/artifacts.mdx +++ b/content/docs/features/artifacts.mdx @@ -1,30 +1,37 @@ --- title: Artifacts - Generative UI icon: Palette -description: Discover LibreChat's revolutionary Artifacts feature for instant creation of React components, HTML code, and Mermaid diagrams. +description: Configure agents to render interactive React, HTML, SVG, Markdown, and Mermaid artifacts. --- -- **Generative UI:** Create React components, HTML code, and Mermaid diagrams -- **Flexible Integration:** Use any model you have set up -- **Iterative Design:** Rapidly improve and refine generated outputs -- **Agent Integration:** Configure artifacts at the agent level (recommended approach) +Artifacts let LibreChat Agents render generated React components, HTML, SVG, Markdown, and Mermaid content in a dedicated interactive view. Users can continue the conversation to revise the result while keeping the generated content separate from the chat response. -> **Note:** The preferred way to use artifacts is now through the [Agents feature](/docs/features/agents#artifacts), which allows for more granular control by enabling/disabling artifacts at the agent level rather than app-wide. +## Enable Artifacts for an Agent + +1. Create or edit an [Agent](/docs/features/agents). +2. Open **Add tools** and select **Artifacts**. +3. Choose an artifact instruction mode. +4. Save the agent. + +The available modes are: + +- **Normal**: Injects LibreChat's standard instructions for React, HTML, SVG, Markdown, and Mermaid artifacts. +- **shadcn/ui**: Adds shadcn/ui component-library guidance for more polished generated interfaces. +- **Custom**: Keeps artifact rendering enabled but injects no built-in instructions. Put the complete artifact behavior you want in the agent's instructions. + +Agent-level configuration is preferred because each agent can use the mode and instructions appropriate to its purpose. The administrator can hide Artifacts by removing the `artifacts` [agent capability](/docs/configuration/librechat_yaml/object_structure/agents#capabilities).
-## Key Features of LibreChat's Code Artifacts: - -- Instant prototyping of websites and UIs with generative AI -- Effortless creation of dynamic, responsive layouts -- Interactive learning environment for React and HTML -- Complex idea visualization using Mermaid diagrams -- AI-powered intuitive, user-centric design iterations -- Free and open-source alternative to paid AI tools +## What Artifacts Support -Experience the future of UI/UX design and development with LibreChat's generative capabilities. Bring your ideas to life faster than ever before! +- Interactive React components and HTML pages +- SVG images and Mermaid diagrams +- Rendered Markdown documents +- Iterative updates through follow-up messages +- Any model available to the configured agent ## Content-Security-Policy @@ -65,9 +72,3 @@ Self-hosting the bundler introduces some additional overhead: - **Resource Requirements**: Additional server resources will be needed to host the bundler For detailed instructions on setting up and maintaining your self-hosted bundler, refer to the [forked CodeSandbox repository](https://github.com/LibreChat-AI/codesandbox-client) tailored for LibreChat deployment, including the removal of telemetry from Sandpack. - ---- - -AI News 2024: The Original and BEST Open-Source AI Chat Platform, LibreChat Releases Code Artifacts! This Generative UI Tool Can Generate React, HTML & Diagrams Instantly from a Single Prompt in Your Browser with Any LLM, OpenAI, Anthropic, LLAMA, Mistral, DeepSeek Coder & More Thanks to OLLAMA Integration. - -#AINews2024 #OpenSourceAI #GenerativeUI #CodeArtifacts #WebDevelopment #ReactJS #LLM #AIPrototyping #DevTools #OLLAMA #LibreChat diff --git a/content/docs/features/mcp.mdx b/content/docs/features/mcp.mdx index af6e92ddf..dc4ed8180 100644 --- a/content/docs/features/mcp.mdx +++ b/content/docs/features/mcp.mdx @@ -61,9 +61,9 @@ mcpServers: MCP servers integrate seamlessly with LibreChat Agents: 1. Create or edit an agent -2. Click "Add MCP Server Tools" to open the Tools Dialog from the Agent Builder panel -3. Select MCP servers once added, each appears as a single entry -4. Fine-tune your agent's capabilites by enabling/disabling individual tools after adding +2. Open **Add tools** in the Agent Builder and select **MCP** +3. Select an MCP server; each server appears as a single catalog entry +4. Expand the selected server to enable or disable individual tools 5. Save your agent ![MCP Tools in Agent Builder](/images/mcp/mcp_ui_agent.png) @@ -165,6 +165,8 @@ When adding an MCP server through the UI, you can require users to provide their Behind the scenes, LibreChat automatically creates a `customUserVars` entry named `MCP_API_KEY` and configures the appropriate header template (e.g., `Authorization: Bearer {{MCP_API_KEY}}`). Each user provides their own key through the MCP Tool Select Dialog when configuring an agent โ€” the same UI used for [YAML-defined `customUserVars`](#user-provided-credentials). +When an administrator or user API key is configured, LibreChat treats the server as API-key authenticated and skips OAuth auto-detection. An explicit OAuth configuration still takes precedence. If a UI-created API-key server was saved by an older LibreChat version and remains stuck in **OAuth Required**, edit and save the server once so its stored connection metadata is refreshed. + For security, UI-created (DB-sourced) MCP servers can **only** resolve `customUserVars` placeholders (`{{VAR_NAME}}`). Server-side environment variables (`${ENV_VAR}`), user profile fields (`{{LIBRECHAT_USER_*}}`), and OIDC tokens (`{{LIBRECHAT_OPENID_*}}`) are intentionally blocked to prevent unauthorized access to server secrets or other users' data. For full placeholder support, configure the server in `librechat.yaml` instead. @@ -302,7 +304,7 @@ Available placeholders include: - `{{LIBRECHAT_USER_USERNAME}}` - Username - And many more (see [MCP Servers Configuration](/docs/configuration/librechat_yaml/object_structure/mcp_servers#headers) for complete list) -YAML-defined MCP servers can also use `{{LIBRECHAT_OPENID_*}}`, `{{LIBRECHAT_GRAPH_*}}`, and `{{LIBRECHAT_BODY_*}}` placeholders. `{{LIBRECHAT_BODY_*}}` values are request-scoped, so LibreChat creates connections for the active run, reuses them across tool calls in that run, and cleans them up when the request ends. Request-scoped servers are excluded from the persistent tool cache so request-specific headers and URLs are not reused outside the active run. User, OpenID, and Graph placeholders are user-scoped; HTTP transports refresh their resolved headers before each tool call without requiring a reconnect by themselves. +YAML-defined MCP servers can also use `{{LIBRECHAT_OPENID_*}}`, `{{LIBRECHAT_GRAPH_*}}`, and `{{LIBRECHAT_BODY_*}}` placeholders. `{{LIBRECHAT_BODY_*}}` values are request-scoped, so LibreChat creates connections for the active run, reuses them across tool calls in that run, and cleans them up when the request ends. Request-scoped servers are excluded from the persistent tool cache so request-specific headers and URLs are not reused outside the active run. Because their tool list cannot be resolved before a chat request exists, the Agent Builder attaches these servers as a whole and resolves all of their tools at run time. User, OpenID, and Graph placeholders are user-scoped; HTTP transports refresh their resolved headers before each tool call without requiring a reconnect by themselves. ### Server Instructions @@ -400,6 +402,9 @@ LibreChat MCP servers support OAuth 2.0 with: - **Authorization Code Flow with PKCE**: Recommended for maximum security - **Client Discovery**: Automatic client registration when supported by the OAuth provider - **Refresh Tokens**: Automatic token renewal when available +- **Token endpoint discovery**: Preconfigured clients can discover whether the provider expects client credentials in the POST body or an HTTP Basic authorization header + +In the MCP Builder, **Token Exchange Method** offers **Auto**, **Default (POST request)**, and **Basic authorization header**. Auto leaves the method unset so LibreChat can use trusted provider metadata, falling back to Basic authentication when the provider does not advertise a method. #### Configuration Examples @@ -428,9 +433,9 @@ When you first configure an OAuth-enabled MCP server: 1. **Initial Connection**: LibreChat attempts to connect to the MCP server 2. **Authentication Required**: If no valid token exists, you'll see an OAuth authentication indicator in the chat dropdown for that server -3. **Button Interface**: Click the authentication indicator button to open the MCPConfigDialog and begin the OAuth flow -4. **Config Dialog**: Click the Authenticate button in the MCPConfigDialog to open the OAuth authentication page in your browser -5. **Browser Redirect**: LibreChat opens the OAuth provider in your browser +3. **Button Interface**: Click the authentication indicator to open the MCP configuration dialog and begin the OAuth flow +4. **Continue or use another device**: Continue in the current browser, copy the authorization link, or reveal a QR code to open it on another device +5. **Browser Redirect**: Complete authentication with the OAuth provider 6. **Return Handling**: LibreChat automatically processes the OAuth callback once you've authenticated 7. **Token Storage**: LibreChat securely stores the tokens for future use 8. **Connection Established**: Once you've authenticated, the MCP server will be connected and you can use it in your chat @@ -512,8 +517,6 @@ Example of automatic token refresh: 3. **Monitor token expiration**: Check logs for authentication issues 4. **Plan for re-authentication**: Some providers don't support refresh tokens -**Note**: UI-based OAuth configuration is coming soon, which will streamline the authentication process directly from the LibreChat interface. - ## Server Transports MCP servers can be configured to use different transport mechanisms: diff --git a/content/docs/features/skills.mdx b/content/docs/features/skills.mdx index 2a67c3872..0626cbac9 100644 --- a/content/docs/features/skills.mdx +++ b/content/docs/features/skills.mdx @@ -31,6 +31,8 @@ endpoints: - 'actions' - 'context' - 'skills' + - 'memory' + - 'ask_user_question' - 'tools' - 'chain' - 'ocr' @@ -146,6 +148,12 @@ Use product terminology consistently. 'Temporarily unions these tools into the agent effective tool set when the skill is manually or always applied.', 'allowed-tools: ["execute_code"]', ], + [ + 'compatibility', + 'String', + 'Optional compatibility notes, such as required tools, services, or runtime assumptions. LibreChat preserves this metadata but does not enforce it.', + 'compatibility: Requires the GitHub MCP server.', + ], ]} /> @@ -164,11 +172,13 @@ Manual invocation is explicit user intent. It can use skills that are hidden fro Agents must have Skills enabled before they can use the catalog. - If `skills_enabled` is false or unset on a persisted agent, skills are inactive for that agent. -- If `skills_enabled` is true and no skill allowlist is set, the agent can use the full active catalog visible to the user. +- If `skills_enabled` is true and no skill allowlist is set, the agent can use the full active catalog visible to the user, including skills added later. - If `skills_enabled` is true and `skills` contains specific skill IDs, the agent is narrowed to that list. This lets admins expose the Skills feature globally while keeping each agent's usable skill set focused. +In the Agent Builder, turn on **Use all skills** to use the full catalog. Turning it off restores the skill selection that was active before the switch was enabled. + ## Active and Shared Skills Users can toggle skills active or inactive. Owned skills default to active. Shared skills use the admin-configured default until the user overrides them. @@ -187,7 +197,7 @@ Uploaded skill bundles can include files alongside `SKILL.md`, such as: - `scripts/...` - `assets/...` -The backend stores those files with the skill. The agent can resolve skill files when the skill is active and in scope. +The backend stores those files with the skill. The agent can resolve skill files when the skill is active and in scope. Nested files keep their relative paths and are addressed through the model-facing `skills/{skillName}/...` namespace. When Code Interpreter is enabled, the same files are mounted at `/mnt/data/skills/{skillName}/...` so shell and code operations can use them directly. Keep `description` specific. It is the strongest signal for model-invoked skills. A short or vague diff --git a/content/docs/remote/docker_linux.mdx b/content/docs/remote/docker_linux.mdx index 75cf76e47..f02bca7e6 100644 --- a/content/docs/remote/docker_linux.mdx +++ b/content/docs/remote/docker_linux.mdx @@ -306,6 +306,8 @@ Run the following for an automated update npm run update:deployed ``` +After pulling the current images, the update script runs `sudo docker image prune -f` to remove unused dangling images left by prior versions. This can reclaim substantial disk space, including dangling images unrelated to LibreChat; tagged images, containers, and volumes are not removed. + **Stopping the docker container** ```bash From f0c4fbda07307b338643628bb89aa2c57d6ad5ec Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 22 Jul 2026 12:22:49 -0400 Subject: [PATCH 03/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Clarify=20experime?= =?UTF-8?q?ntal=20stateful=20sessions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/config_v1.3.14.mdx | 2 +- content/changelog/v0.8.8-rc1.mdx | 4 +++- .../librechat_yaml/object_structure/agents.mdx | 2 +- content/docs/features/agents.mdx | 6 +++++- content/docs/features/code_interpreter.mdx | 8 ++++++-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/content/changelog/config_v1.3.14.mdx b/content/changelog/config_v1.3.14.mdx index f1a594578..6cd6df3ad 100644 --- a/content/changelog/config_v1.3.14.mdx +++ b/content/changelog/config_v1.3.14.mdx @@ -6,7 +6,7 @@ version: '1.3.14' - Updated Agents endpoint capabilities - Added `memory` and `ask_user_question` to the default capability list - - Added opt-in `stateful_code_sessions` for reusable Code Interpreter workspaces + - Added highly experimental, opt-in `stateful_code_sessions` for reusable Code Interpreter workspaces; behavior and configuration may change substantially during experimentation - Added opt-in `run_in_background` for eligible background MCP tool calls - Added `endpoints.agents.toolApproval` diff --git a/content/changelog/v0.8.8-rc1.mdx b/content/changelog/v0.8.8-rc1.mdx index 0975d0d92..06d8f2b4f 100644 --- a/content/changelog/v0.8.8-rc1.mdx +++ b/content/changelog/v0.8.8-rc1.mdx @@ -12,7 +12,7 @@ version: '0.8.8-rc1' - Steer Agent runs in progress or queue the next message - Agents can pause to ask questions or request tool approval, then resume - Redesigned Agent Builder with a unified Tools marketplace and background tool calls -- Stateful Code Interpreter sessions with reusable conversation workspaces +- Experimental stateful Code Interpreter sessions with reusable conversation workspaces - Agent-managed memory with optional per-agent isolation - Continue shared conversations as personal copies - Opt-in Langfuse fanout for central and tenant tracing @@ -130,6 +130,8 @@ version: '0.8.8-rc1' - ๐Ÿค fix: Withhold MCP OAuth Headers From Untrusted Preconfigured Discovery by [@danny-avila](https://github.com/danny-avila) in [#14379](https://github.com/danny-avila/LibreChat/pull/14379) - ๐Ÿ”— fix: Preserve resource owner access when sharing (key share diff by stable id) by [@jomspk](https://github.com/jomspk) in [#14317](https://github.com/danny-avila/LibreChat/pull/14317) - ๐Ÿช† fix: Preserve Nested Subagent Delegation by [@danny-avila](https://github.com/danny-avila) in [#14392](https://github.com/danny-avila/LibreChat/pull/14392) +- โœ‹ fix: Enable Submit on First Tool-Approval Decision by [@danny-avila](https://github.com/danny-avila) in [#14393](https://github.com/danny-avila/LibreChat/pull/14393) +- ๐ŸŽž๏ธ fix: Surface Clear Error for Unprocessable Gemini YouTube Videos by [@danny-avila](https://github.com/danny-avila) in [#14396](https://github.com/danny-avila/LibreChat/pull/14396) ### ๐Ÿ”ง Refactoring and Performance diff --git a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx index 3e4abec7b..08b47471c 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx @@ -439,7 +439,7 @@ The `capabilities` field allows you to enable or disable specific functionalitie - **deferred_tools**: Allows agents to discover deferred MCP tools at runtime instead of loading every tool into context upfront. - **programmatic_tools**: Enables Programmatic Tool Calling for MCP tools marked Programmatic in the Agent Builder. Requires `execute_code` and a Code Interpreter deployment with the Tool Call Server component. This capability is opt-in and is not enabled by default. - **execute_code**: Allows the agent to execute code. -- **stateful_code_sessions**: Lets opted-in agents reuse one Code Interpreter workspace per conversation. Requires `execute_code`, a compatible Code Interpreter deployment, and the per-agent Advanced setting. This experimental capability is not enabled by default. +- **stateful_code_sessions**: Lets opted-in agents reuse one Code Interpreter workspace per conversation. Requires `execute_code`, a compatible Code Interpreter deployment, and the per-agent Advanced setting. This capability is highly experimental, is not enabled by default, and may change substantially during experimentation; do not treat its current behavior or configuration as a stable production contract. - **file_search**: Enables the agent to search and interact with files. When enabled, citation behavior is controlled by `maxCitations`, `maxCitationsPerFile`, and `minRelevanceScore` settings. - **web_search**: Enables web search functionality for agents, allowing them to search and retrieve information from the internet. - **artifacts**: Enables the agent to generate interactive artifacts (React components, HTML, Mermaid diagrams). diff --git a/content/docs/features/agents.mdx b/content/docs/features/agents.mdx index b76d687ce..a55c0e8e4 100644 --- a/content/docs/features/agents.mdx +++ b/content/docs/features/agents.mdx @@ -73,7 +73,11 @@ When enabled, the Code Interpreter capability allows your agent to: Stateful code sessions let an agent reuse one sandbox workspace per conversation. Files, installed packages, and working state usually carry over between code executions, which is useful for iterative analysis and multi-step file work. -This feature is experimental and opt-in. An administrator must add `stateful_code_sessions` to the [agent capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities), Code Interpreter must be enabled on the agent, and **Stateful code sessions** must be turned on under the agent's Advanced settings. A workspace may occasionally reset, so save important outputs under `/mnt/data`. + + Stateful Code Sessions are in an early experimentation phase. Their behavior, configuration, persistence characteristics, and underlying integration may change substantially. Do not treat the current implementation as a stable production contract. + + +This feature is opt-in. An administrator must add `stateful_code_sessions` to the [agent capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities), Code Interpreter must be enabled on the agent, and **Stateful code sessions** must be turned on under the agent's Advanced settings. The workspace may reset at any time. Save important outputs under `/mnt/data`, and do not otherwise rely on session state as durable storage. ### File Search diff --git a/content/docs/features/code_interpreter.mdx b/content/docs/features/code_interpreter.mdx index 7ecf09deb..bbde2113f 100644 --- a/content/docs/features/code_interpreter.mdx +++ b/content/docs/features/code_interpreter.mdx @@ -56,7 +56,11 @@ The sandbox still does not receive general network access. Tool calls are broker Stateful code sessions let a LibreChat Agent reuse one Code Interpreter sandbox workspace per conversation. Files, installed packages, and working state usually carry over between executions, making iterative analysis and multi-step file generation more efficient. -This feature is experimental and opt-in. Enable `execute_code` and `stateful_code_sessions` in the [Agents endpoint capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities), enable Code Interpreter on the agent, then turn on **Stateful code sessions** in its Advanced settings. The workspace may occasionally reset, so important outputs should be saved under `/mnt/data`. + + Stateful Code Sessions are in an early experimentation phase. Their behavior, configuration, persistence characteristics, and underlying integration may change substantially. Do not treat the current implementation as a stable production contract. + + +This feature is opt-in. Enable `execute_code` and `stateful_code_sessions` in the [Agents endpoint capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities), enable Code Interpreter on the agent, then turn on **Stateful code sessions** in its Advanced settings. The workspace may reset at any time. Save important outputs under `/mnt/data`, and do not otherwise rely on session state as durable storage. ## Using the API @@ -70,7 +74,7 @@ The API has first-class support in LibreChat through these main methods: 3. **[Programmatic Tool Calling](/docs/features/agents#programmatic-tool-calling)**: Enable the `programmatic_tools` capability and mark selected MCP tools as Programmatic so agents can orchestrate those tools from sandboxed code. -4. **[Stateful Code Sessions](/docs/features/agents#stateful-code-sessions)**: Reuse a persistent per-conversation workspace across an agent's code executions. +4. **[Stateful Code Sessions](/docs/features/agents#stateful-code-sessions)**: Experimentally reuse a per-conversation workspace across an agent's code executions. ![Code Interpreter in LibreChat](/images/agents/run_code.png) From ce5186780cde569cc3e88930723b351d5ffc622a Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 22 Jul 2026 12:35:11 -0400 Subject: [PATCH 04/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Refresh=20v0.8.8-r?= =?UTF-8?q?c1=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/v0.8.8-rc1.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/changelog/v0.8.8-rc1.mdx b/content/changelog/v0.8.8-rc1.mdx index 06d8f2b4f..9d20c05ab 100644 --- a/content/changelog/v0.8.8-rc1.mdx +++ b/content/changelog/v0.8.8-rc1.mdx @@ -191,6 +191,8 @@ version: '0.8.8-rc1' - ๐Ÿ“ฆ chore: Update `@librechat/agents` to v3.2.66 & `npm audit fix` by [@danny-avila](https://github.com/danny-avila) in [#14361](https://github.com/danny-avila/LibreChat/pull/14361) - ๐Ÿงพ ci: Skip Workflows for Markdown-Only Changes by [@danny-avila](https://github.com/danny-avila) in [#14378](https://github.com/danny-avila/LibreChat/pull/14378) - ๐Ÿ“ฆ chore: Update `@librechat/agents` to v3.2.68 by [@danny-avila](https://github.com/danny-avila) in [#14380](https://github.com/danny-avila/LibreChat/pull/14380) +- ๐Ÿšฆ ci: Gate Playwright Runs to Maintainers by [@danny-avila](https://github.com/danny-avila) in [#14385](https://github.com/danny-avila/LibreChat/pull/14385) +- ๐ŸŽญ ci: Scope Playwright Runs to Relevant Changes by [@danny-avila](https://github.com/danny-avila) in [#14388](https://github.com/danny-avila/LibreChat/pull/14388) ### ๐ŸŒ Internationalization From 5b03cf86043cff78eda6b7aaf75e63d446b8bc62 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Thu, 23 Jul 2026 09:18:44 -0400 Subject: [PATCH 05/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Document=20backgro?= =?UTF-8?q?und=20Code=20Interpreter=20execution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/config_v1.3.14.mdx | 2 +- content/changelog/v0.8.8-rc1.mdx | 5 ++++- .../librechat_yaml/object_structure/agents.mdx | 9 ++++++--- .../librechat_yaml/object_structure/model_specs.mdx | 3 ++- content/docs/features/agents.mdx | 11 +++++++++-- content/docs/features/code_interpreter.mdx | 12 +++++++++++- 6 files changed, 33 insertions(+), 9 deletions(-) diff --git a/content/changelog/config_v1.3.14.mdx b/content/changelog/config_v1.3.14.mdx index 6cd6df3ad..8a77b6da7 100644 --- a/content/changelog/config_v1.3.14.mdx +++ b/content/changelog/config_v1.3.14.mdx @@ -7,7 +7,7 @@ version: '1.3.14' - Updated Agents endpoint capabilities - Added `memory` and `ask_user_question` to the default capability list - Added highly experimental, opt-in `stateful_code_sessions` for reusable Code Interpreter workspaces; behavior and configuration may change substantially during experimentation - - Added opt-in `run_in_background` for eligible background MCP tool calls + - Added opt-in `run_in_background` for eligible background MCP and Code Interpreter tool calls - Added `endpoints.agents.toolApproval` - Enables human approval for matching Agent tool calls diff --git a/content/changelog/v0.8.8-rc1.mdx b/content/changelog/v0.8.8-rc1.mdx index 9d20c05ab..8442f188b 100644 --- a/content/changelog/v0.8.8-rc1.mdx +++ b/content/changelog/v0.8.8-rc1.mdx @@ -11,7 +11,7 @@ version: '0.8.8-rc1' - Steer Agent runs in progress or queue the next message - Agents can pause to ask questions or request tool approval, then resume -- Redesigned Agent Builder with a unified Tools marketplace and background tool calls +- Redesigned Agent Builder with a unified Tools marketplace and background MCP and Code Interpreter tools - Experimental stateful Code Interpreter sessions with reusable conversation workspaces - Agent-managed memory with optional per-agent isolation - Continue shared conversations as personal copies @@ -56,6 +56,7 @@ version: '0.8.8-rc1' - โœ‹ feat: Add Reclaim-Gated Controls to In-Flight Steers by [@danny-avila](https://github.com/danny-avila) in [#14321](https://github.com/danny-avila/LibreChat/pull/14321) - ๐Ÿซง feat: Float In-Flight Steers Over the Thread with Collapsible Content by [@danny-avila](https://github.com/danny-avila) in [#14365](https://github.com/danny-avila/LibreChat/pull/14365) - โšก feat: Add Gemini 3.6 Flash and Gemini 3.5 Flash-Lite Support by [@danny-avila](https://github.com/danny-avila) in [#14369](https://github.com/danny-avila/LibreChat/pull/14369) +- ๐Ÿงต feat: Native Background Execution for Code Interpreter Tools by [@danny-avila](https://github.com/danny-avila) in [#14386](https://github.com/danny-avila/LibreChat/pull/14386) ### ๐Ÿ› Fixes @@ -132,6 +133,8 @@ version: '0.8.8-rc1' - ๐Ÿช† fix: Preserve Nested Subagent Delegation by [@danny-avila](https://github.com/danny-avila) in [#14392](https://github.com/danny-avila/LibreChat/pull/14392) - โœ‹ fix: Enable Submit on First Tool-Approval Decision by [@danny-avila](https://github.com/danny-avila) in [#14393](https://github.com/danny-avila/LibreChat/pull/14393) - ๐ŸŽž๏ธ fix: Surface Clear Error for Unprocessable Gemini YouTube Videos by [@danny-avila](https://github.com/danny-avila) in [#14396](https://github.com/danny-avila/LibreChat/pull/14396) +- ๐Ÿ“Œ fix: Pin Scroll-to-Bottom Rib in Message Nav by [@danny-avila](https://github.com/danny-avila) in [#14397](https://github.com/danny-avila/LibreChat/pull/14397) +- ๐Ÿซ™ fix: Preserve Loaded Message Content When Resume Snapshot Is Empty by [@danny-avila](https://github.com/danny-avila) in [#14399](https://github.com/danny-avila/LibreChat/pull/14399) ### ๐Ÿ”ง Refactoring and Performance diff --git a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx index 08b47471c..19b47b264 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx @@ -172,7 +172,7 @@ allowedProviders: **Default:** `["deferred_tools", "execute_code", "file_search", "web_search", "artifacts", "subagents", "actions", "context", "skills", "memory", "ask_user_question", "tools", "chain", "ocr"]` -`programmatic_tools`, `stateful_code_sessions`, and `run_in_background` are opt-in and must be added explicitly. Programmatic tools and stateful sessions also require `execute_code` and a compatible Code Interpreter deployment. +`programmatic_tools`, `stateful_code_sessions`, and `run_in_background` are opt-in and must be added explicitly. Programmatic tools and stateful sessions also require `execute_code` and a compatible Code Interpreter deployment. Background code execution requires `run_in_background`, `execute_code`, and Code Interpreter. **Example:** @@ -197,7 +197,7 @@ capabilities: - 'ocr' # Optional: reuse one Code Interpreter workspace per conversation. # - 'stateful_code_sessions' - # Optional: allow selected eligible MCP tools to run as background tasks. + # Optional: allow selected eligible MCP and Code Interpreter tools to run as background tasks. # - 'run_in_background' ``` @@ -452,7 +452,7 @@ The `capabilities` field allows you to enable or disable specific functionalitie - **tools**: Grants the agent access to various tools. - **chain**: Enables Beta feature for agent chaining, also known as Mixture-of-Agents (MoA) workflows. - **ocr**: Optionally enhances "Upload as Text" in chat, and "File Context" for agents, allowing files to be uploaded and processed with OCR. **Requires an OCR service to be configured.** -- **run_in_background**: Lets eligible tools marked Background return immediately while the agent continues and polls for completion. This capability is not enabled by default. +- **run_in_background**: Lets eligible MCP and Code Interpreter tools marked Background return immediately while the agent continues and polls for completion. The setting permits background execution; the model decides per call whether to use it. Background code also requires `execute_code` and a configured Code Interpreter deployment. This capability is not enabled by default. By specifying the capabilities, you can control the features available to users when interacting with agents. @@ -473,6 +473,8 @@ endpoints: # Optional: enables Programmatic Tool Calling for MCP tools marked Programmatic in the Agent Builder. # - 'programmatic_tools' - 'execute_code' + # Optional: allows selected MCP and Code Interpreter tools to run in the background. + # - 'run_in_background' - 'file_search' - 'skills' - 'subagents' @@ -490,6 +492,7 @@ In this example: - Only sources with 60%+ relevance are included - LibreChat Agents have access to code execution, file search (with citations), Skills, Subagents, actions, artifacts, file context, ocr services if configured, and web search capabilities - Programmatic Tool Calling remains disabled unless you add the `programmatic_tools` capability alongside `execute_code` +- Background tool calls remain disabled unless you add the `run_in_background` capability and mark eligible tools as Background ## remoteApi diff --git a/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx b/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx index 09015c82c..630e79a02 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/model_specs.mdx @@ -737,13 +737,14 @@ modelSpecs: ]} /> -Requires the opt-in endpoint-level `run_in_background` capability. LibreChat marks the spec's eligible tools as background-capable; the model can start one, continue working, and poll with `check_background_task`. Background task state is process-local and does not survive a server restart or move across replicas. +Requires the opt-in endpoint-level `run_in_background` capability. LibreChat marks the spec's eligible MCP tools as background-capable; when `executeCode: true`, Code Interpreter and shell calls are eligible too. The model can start an eligible tool, continue working, and poll with `check_background_task`. Completed code output and generated files are attached to the original code call. Background task state is process-local and does not survive a server restart or move across replicas. ```yaml filename="modelSpecs / runInBackground" modelSpecs: list: - name: 'operations-assistant' mcpServers: ['operations'] + executeCode: true runInBackground: true preset: endpoint: 'openAI' diff --git a/content/docs/features/agents.mdx b/content/docs/features/agents.mdx index a55c0e8e4..06c88ef32 100644 --- a/content/docs/features/agents.mdx +++ b/content/docs/features/agents.mdx @@ -175,9 +175,16 @@ This is useful for multi-step tool workflows such as querying several resources, ### Background Tool Calls -Background tool calls let an agent start a long-running MCP tool, keep working, and poll for the result later. The initial call returns immediately with a task reference; the agent retrieves the finished result through `check_background_task`. +Background tool calls let an agent start a long-running eligible MCP or Code Interpreter tool, keep working, and poll for the result later. The initial call returns immediately with a task reference; the agent retrieves status and results through `check_background_task`. -To use this feature, an administrator must add the opt-in `run_in_background` [agent capability](/docs/configuration/librechat_yaml/object_structure/agents#capabilities). In the Agent Builder, open an MCP server and mark individual tools, or the full server, as **Background**. Only eligible tools explicitly marked this way can run in the background. +To use this feature, an administrator must add the opt-in `run_in_background` [agent capability](/docs/configuration/librechat_yaml/object_structure/agents#capabilities). Then configure the eligible tools in the Agent Builder: + +- **Code Interpreter:** Enable Code Interpreter on the agent, open its settings in the Tools marketplace, and turn on **Background execution**. This makes code execution and shell commands eligible for background dispatch. +- **MCP:** Open an MCP server and mark individual tools, or the full server, as **Background**. + +These settings allow background execution but do not force it. The model decides per call whether to run an eligible tool in the background. + +In LibreChat chat, when background code finishes, its stdout and generated files appear on the original code call rather than the later poll. Generated files are also persisted for subsequent turns. Background task state is currently process-local. Results can be collected in a later turn on the same server process, but they do not survive a restart and are not shared across replicas. diff --git a/content/docs/features/code_interpreter.mdx b/content/docs/features/code_interpreter.mdx index bbde2113f..c690c1c9b 100644 --- a/content/docs/features/code_interpreter.mdx +++ b/content/docs/features/code_interpreter.mdx @@ -52,6 +52,14 @@ Programmatic Tool Calling lets LibreChat Agents route selected MCP tools through The sandbox still does not receive general network access. Tool calls are brokered through the Code Interpreter Tool Call Server and LibreChat's registered tool map, so only tools available to the agent can be called. +### Background Code Execution + +Background execution lets an Agent dispatch long-running code or shell work, continue the conversation, and retrieve the result later through `check_background_task`. In LibreChat chat, when the work finishes, stdout and generated files appear on the original code call. Generated files are persisted for subsequent turns even if the Agent has not polled the task yet. + +This feature is opt-in. Add `run_in_background` alongside `execute_code` in the [Agents endpoint capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities), enable Code Interpreter on the agent, then open its settings in the Tools marketplace and turn on **Background execution**. This makes code calls eligible for background dispatch; the model still decides per call whether to use it. + +Background task state is process-local and does not survive an app restart or move between replicas. Background dispatch also does not extend the Code Interpreter service's execution limit; the deployment's normal server-side timeout still applies. + ### Stateful Code Sessions Stateful code sessions let a LibreChat Agent reuse one Code Interpreter sandbox workspace per conversation. Files, installed packages, and working state usually carry over between executions, making iterative analysis and multi-step file generation more efficient. @@ -74,7 +82,9 @@ The API has first-class support in LibreChat through these main methods: 3. **[Programmatic Tool Calling](/docs/features/agents#programmatic-tool-calling)**: Enable the `programmatic_tools` capability and mark selected MCP tools as Programmatic so agents can orchestrate those tools from sandboxed code. -4. **[Stateful Code Sessions](/docs/features/agents#stateful-code-sessions)**: Experimentally reuse a per-conversation workspace across an agent's code executions. +4. **[Background Tool Calls](/docs/features/agents#background-tool-calls)**: Let an agent dispatch eligible code in the background and continue while it runs. + +5. **[Stateful Code Sessions](/docs/features/agents#stateful-code-sessions)**: Experimentally reuse a per-conversation workspace across an agent's code executions. ![Code Interpreter in LibreChat](/images/agents/run_code.png) From ac00e3134baafd2b22f8d24bccb3759ce571ba33 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Thu, 23 Jul 2026 16:36:48 -0400 Subject: [PATCH 06/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Refresh=20v0.8.8-r?= =?UTF-8?q?c1=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/v0.8.8-rc1.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/changelog/v0.8.8-rc1.mdx b/content/changelog/v0.8.8-rc1.mdx index 8442f188b..81dea3a5f 100644 --- a/content/changelog/v0.8.8-rc1.mdx +++ b/content/changelog/v0.8.8-rc1.mdx @@ -135,6 +135,8 @@ version: '0.8.8-rc1' - ๐ŸŽž๏ธ fix: Surface Clear Error for Unprocessable Gemini YouTube Videos by [@danny-avila](https://github.com/danny-avila) in [#14396](https://github.com/danny-avila/LibreChat/pull/14396) - ๐Ÿ“Œ fix: Pin Scroll-to-Bottom Rib in Message Nav by [@danny-avila](https://github.com/danny-avila) in [#14397](https://github.com/danny-avila/LibreChat/pull/14397) - ๐Ÿซ™ fix: Preserve Loaded Message Content When Resume Snapshot Is Empty by [@danny-avila](https://github.com/danny-avila) in [#14399](https://github.com/danny-avila/LibreChat/pull/14399) +- ๐ŸŽฏ fix: Correct Off-by-One Rail Scrub After Pinning the Terminus by [@danny-avila](https://github.com/danny-avila) in [#14409](https://github.com/danny-avila/LibreChat/pull/14409) +- โ™พ๏ธ fix: Preserve Resumable Stream Ordering Across Turns by [@danny-avila](https://github.com/danny-avila) in [#14411](https://github.com/danny-avila/LibreChat/pull/14411) ### ๐Ÿ”ง Refactoring and Performance @@ -205,6 +207,7 @@ version: '0.8.8-rc1' - ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14266](https://github.com/danny-avila/LibreChat/pull/14266) - ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14307](https://github.com/danny-avila/LibreChat/pull/14307) - ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14376](https://github.com/danny-avila/LibreChat/pull/14376) +- ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14406](https://github.com/danny-avila/LibreChat/pull/14406) ## New Contributors From 4ed4ab99308a364cbc0569f4d39764d57ad771df Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Mon, 27 Jul 2026 09:08:44 -0400 Subject: [PATCH 07/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Document=20late=20?= =?UTF-8?q?v0.8.8-rc1=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/v0.8.8-rc1.mdx | 11 ++++- content/docs/configuration/dotenv.mdx | 8 ++-- .../object_structure/anthropic_vertex.mdx | 46 +++++++++++-------- content/docs/configuration/metrics.mdx | 11 +++++ .../pre_configured_ai/anthropic.mdx | 16 ++++--- .../pre_configured_ai/bedrock.mdx | 11 +++-- content/docs/features/ocr.mdx | 3 +- content/docs/features/skills.mdx | 2 +- 8 files changed, 70 insertions(+), 38 deletions(-) diff --git a/content/changelog/v0.8.8-rc1.mdx b/content/changelog/v0.8.8-rc1.mdx index 81dea3a5f..c4b1e045d 100644 --- a/content/changelog/v0.8.8-rc1.mdx +++ b/content/changelog/v0.8.8-rc1.mdx @@ -1,5 +1,5 @@ --- -date: 2026-07-22 +date: 2026-07-27 title: ๐Ÿš€ LibreChat v0.8.8-rc1 description: The v0.8.8-rc1 release of LibreChat version: '0.8.8-rc1' @@ -16,7 +16,7 @@ version: '0.8.8-rc1' - Agent-managed memory with optional per-agent isolation - Continue shared conversations as personal copies - Opt-in Langfuse fanout for central and tenant tracing -- Provider updates: GPT-5.6, Claude Sonnet 5, Gemini 3.6 Flash, and Gemini 3.5 Flash-Lite +- Provider updates: GPT-5.6, Claude Opus 5 and Sonnet 5, Gemini 3.6 Flash, and Gemini 3.5 Flash-Lite --- @@ -57,6 +57,7 @@ version: '0.8.8-rc1' - ๐Ÿซง feat: Float In-Flight Steers Over the Thread with Collapsible Content by [@danny-avila](https://github.com/danny-avila) in [#14365](https://github.com/danny-avila/LibreChat/pull/14365) - โšก feat: Add Gemini 3.6 Flash and Gemini 3.5 Flash-Lite Support by [@danny-avila](https://github.com/danny-avila) in [#14369](https://github.com/danny-avila/LibreChat/pull/14369) - ๐Ÿงต feat: Native Background Execution for Code Interpreter Tools by [@danny-avila](https://github.com/danny-avila) in [#14386](https://github.com/danny-avila/LibreChat/pull/14386) +- โœณ๏ธ feat: Claude Opus 5 Support by [@danny-avila](https://github.com/danny-avila) in [#14422](https://github.com/danny-avila/LibreChat/pull/14422) ### ๐Ÿ› Fixes @@ -137,6 +138,8 @@ version: '0.8.8-rc1' - ๐Ÿซ™ fix: Preserve Loaded Message Content When Resume Snapshot Is Empty by [@danny-avila](https://github.com/danny-avila) in [#14399](https://github.com/danny-avila/LibreChat/pull/14399) - ๐ŸŽฏ fix: Correct Off-by-One Rail Scrub After Pinning the Terminus by [@danny-avila](https://github.com/danny-avila) in [#14409](https://github.com/danny-avila/LibreChat/pull/14409) - โ™พ๏ธ fix: Preserve Resumable Stream Ordering Across Turns by [@danny-avila](https://github.com/danny-avila) in [#14411](https://github.com/danny-avila/LibreChat/pull/14411) +- ๐Ÿงฉ fix: Harden Agent Skill Lifecycles End to End by [@danny-avila](https://github.com/danny-avila) in [#14429](https://github.com/danny-avila/LibreChat/pull/14429) +- ๐Ÿ“ง fix: Restore `invite-user` CLI by [@unsnow-iac](https://github.com/unsnow-iac) in [#14436](https://github.com/danny-avila/LibreChat/pull/14436) ### ๐Ÿ”ง Refactoring and Performance @@ -172,10 +175,13 @@ version: '0.8.8-rc1' - ๐ŸŽ›๏ธ perf: Narrow Composer Subscriptions to Streaming State by [@danny-avila](https://github.com/danny-avila) in [#14333](https://github.com/danny-avila/LibreChat/pull/14333) - ๐Ÿงฌ perf: Memoize Message Spine and Isolate Scroll-Button State by [@danny-avila](https://github.com/danny-avila) in [#14330](https://github.com/danny-avila/LibreChat/pull/14330) - ๐ŸชŸ perf: Virtualize Search Results and Stop the Per-Query Remount by [@danny-avila](https://github.com/danny-avila) in [#14352](https://github.com/danny-avila/LibreChat/pull/14352) +- โšก perf: Reduce Agent Chat Startup Latency by [@danny-avila](https://github.com/danny-avila) in [#14423](https://github.com/danny-avila/LibreChat/pull/14423) ### ๐Ÿงช Tests - ๐Ÿ“ test: Guard Web Search Description Length by [@danny-avila](https://github.com/danny-avila) in [#14044](https://github.com/danny-avila/LibreChat/pull/14044) +- ๐Ÿ›‚ test: Cover Tool Approval Workflows End to End by [@danny-avila](https://github.com/danny-avila) in [#14427](https://github.com/danny-avila/LibreChat/pull/14427) +- ๐Ÿงญ test: Cover Agent Handoffs End to End by [@danny-avila](https://github.com/danny-avila) in [#14428](https://github.com/danny-avila/LibreChat/pull/14428) ### ๐Ÿ“ฆ Dependencies, Chores & CI @@ -225,5 +231,6 @@ version: '0.8.8-rc1' - [@jjhidalgar-celonis](https://github.com/jjhidalgar-celonis) made their first contribution in [#14254](https://github.com/danny-avila/LibreChat/pull/14254) - [@Aho-Bakaa](https://github.com/Aho-Bakaa) made their first contribution in [#14262](https://github.com/danny-avila/LibreChat/pull/14262) - [@joshbla](https://github.com/joshbla) made their first contribution in [#13930](https://github.com/danny-avila/LibreChat/pull/13930) +- [@unsnow-iac](https://github.com/unsnow-iac) made their first contribution in [#14436](https://github.com/danny-avila/LibreChat/pull/14436) **Full Changelog**: [v0.8.7...v0.8.8-rc1](https://github.com/danny-avila/LibreChat/compare/v0.8.7...v0.8.8-rc1) diff --git a/content/docs/configuration/dotenv.mdx b/content/docs/configuration/dotenv.mdx index 0189e21f8..070b8fe4c 100644 --- a/content/docs/configuration/dotenv.mdx +++ b/content/docs/configuration/dotenv.mdx @@ -819,7 +819,7 @@ see: [Anthropic Endpoint](/docs/configuration/pre_configured_ai/anthropic) 'ANTHROPIC_MODELS', 'string', 'Comma-separated list of Anthropic models to use.', - '# ANTHROPIC_MODELS=claude-fable-5,claude-opus-4-8,claude-opus-4-7,claude-sonnet-4-6,claude-opus-4-6,claude-opus-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022', + '# ANTHROPIC_MODELS=claude-fable-5,claude-opus-5,claude-opus-4-8,claude-opus-4-7,claude-sonnet-5,claude-sonnet-4-6,claude-opus-4-6,claude-opus-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022', ], [ 'ANTHROPIC_REVERSE_PROXY', @@ -860,8 +860,8 @@ You can also use Anthropic Claude models through Google Cloud Vertex AI. For det [ 'ANTHROPIC_VERTEX_REGION', 'string', - 'The Google Cloud region for Vertex AI. Default: us-east5.', - 'ANTHROPIC_VERTEX_REGION=us-east5', + 'The Google Cloud location for Vertex AI. Default: us-east5. Use global, us, or eu for Opus 4.7+, Opus 5, Sonnet 5, and Fable/Mythos 5.', + 'ANTHROPIC_VERTEX_REGION=global', ], ]} /> @@ -914,7 +914,7 @@ See: [AWS Bedrock Setup](/docs/configuration/pre_configured_ai/bedrock) 'BEDROCK_AWS_MODELS', 'string', 'Comma-separated list of Bedrock model IDs. If omitted, all known supported models are included.', - '# BEDROCK_AWS_MODELS=anthropic.claude-fable-5,anthropic.claude-opus-4-8,anthropic.claude-opus-4-7,anthropic.claude-sonnet-4-6,meta.llama3-1-8b-instruct-v1:0', + '# BEDROCK_AWS_MODELS=global.anthropic.claude-fable-5,global.anthropic.claude-opus-5,global.anthropic.claude-opus-4-8,global.anthropic.claude-opus-4-7,global.anthropic.claude-sonnet-5,global.anthropic.claude-sonnet-4-6,meta.llama3-1-8b-instruct-v1:0', ], ]} /> diff --git a/content/docs/configuration/librechat_yaml/object_structure/anthropic_vertex.mdx b/content/docs/configuration/librechat_yaml/object_structure/anthropic_vertex.mdx index 334565bc0..82241c9b1 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/anthropic_vertex.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/anthropic_vertex.mdx @@ -32,16 +32,16 @@ endpoints: titleModel: "claude-3.5-haiku" # Use the visible model name (key from models config) vertex: - region: "us-east5" + region: "global" # serviceKeyFile: "/path/to/service-account.json" # Optional, defaults to api/data/auth.json # projectId: "${VERTEX_PROJECT_ID}" # Optional, auto-detected from service key # Model mapping: visible name -> Vertex AI deployment name models: - claude-opus-4.5: - deploymentName: claude-opus-4-5@20251101 - claude-sonnet-4: - deploymentName: claude-sonnet-4-20250514 + claude-opus-5: + deploymentName: claude-opus-5 + claude-sonnet-5: + deploymentName: claude-sonnet-5 claude-3.7-sonnet: deploymentName: claude-3-7-sonnet-20250219 claude-3.5-sonnet: @@ -70,14 +70,17 @@ The `vertex` object contains all Vertex AI-specific configuration options. **Default:** `us-east5` **Available Regions:** -- `global` (recommended for most use cases) + +- `global` +- `us` +- `eu` - `us-east5` - `us-central1` - `europe-west1` - `europe-west4` - `asia-southeast1` -> **Tip:** The `global` region is recommended as it provides automatic routing to the nearest available region. Use specific regions only if you have data residency requirements. +> **Important:** Claude Opus 4.7 and newer, Opus 5, Sonnet 5, and Fable/Mythos 5 require `global`, `us`, or `eu`. Specific regions such as `us-east5` serve Claude Sonnet 4.6 and earlier and return a model-not-found response for newer models. Use `global` for the broadest availability and no regional pricing premium, or `us`/`eu` when you need multi-region data residency. **Example:** ```yaml filename="endpoints / anthropic / vertex / region" @@ -122,6 +125,8 @@ serviceKeyFile: "/etc/secrets/gcp-service-account.json" The `models` field defines the available Claude models and maps user-friendly names to Vertex AI deployment IDs. This works similarly to [Azure OpenAI model mapping](/docs/configuration/librechat_yaml/object_structure/azure_openai#group-object-structure). +When `models` is omitted, LibreChat uses its built-in Vertex catalog and removes models incompatible with the configured `region`. An explicit `models` list or map is never filtered, so every deployment ID must be available in the selected location. + ### Format Options You can configure models in three ways: @@ -132,6 +137,8 @@ Use the actual Vertex AI model IDs directly. These will be shown as-is in the UI ```yaml filename="Simple array format" models: + - "claude-opus-5" + - "claude-sonnet-5" - "claude-sonnet-4-20250514" - "claude-3-7-sonnet-20250219" - "claude-3-5-haiku@20241022" @@ -143,10 +150,10 @@ Map user-friendly names to Vertex AI deployment names: ```yaml filename="Object format with custom names" models: - claude-opus-4.5: # Visible in UI - deploymentName: claude-opus-4-5@20251101 # Actual Vertex AI model ID - claude-sonnet-4: - deploymentName: claude-sonnet-4-20250514 + claude-opus-5: # Visible in UI + deploymentName: claude-opus-5 # Actual Vertex AI model ID + claude-sonnet-5: + deploymentName: claude-sonnet-5 claude-3.5-haiku: deploymentName: claude-3-5-haiku@20241022 ``` @@ -195,7 +202,7 @@ ANTHROPIC_VERTEX_REGION=global GOOGLE_SERVICE_KEY_FILE=/path/to/service-account.json ``` -> **Note:** When using environment variables, model mapping is not available. All known Claude models will be included automatically. +> **Note:** When using environment variables, model mapping is not available and LibreChat includes its standard Anthropic model catalog. Set `ANTHROPIC_VERTEX_REGION` to `global`, `us`, or `eu` before selecting a modern model that is unavailable from a specific region. --- @@ -209,14 +216,15 @@ Minimal configuration using defaults (Vertex AI is enabled by the presence of th endpoints: anthropic: vertex: - region: us-east5 + region: global ``` This uses: -- Region: `us-east5` + +- Region: `global` - Service key: `api/data/auth.json` (or `GOOGLE_SERVICE_KEY_FILE` env var) - Project ID: Auto-detected from service key -- Models: All known Claude models +- Models: LibreChat's built-in Vertex catalog for the selected location ### Production Setup with Model Mapping @@ -235,9 +243,9 @@ endpoints: models: opus: - deploymentName: claude-opus-4-5@20251101 + deploymentName: claude-opus-5 sonnet: - deploymentName: claude-sonnet-4-20250514 + deploymentName: claude-sonnet-5 haiku: deploymentName: claude-3-5-haiku@20241022 ``` @@ -265,6 +273,7 @@ You can only configure one region per deployment. For multi-region needs, consid **"Model not found"** - Check that the model ID in `deploymentName` is correct - Verify the model is available in your selected region +- Use `global`, `us`, or `eu` for Opus 4.7+, Opus 5, Sonnet 5, and Fable/Mythos 5 - Ensure the model is enabled in your Vertex AI Model Garden ### Region Issues @@ -276,9 +285,8 @@ You can only configure one region per deployment. For multi-region needs, consid **"Model not available in region"** - Not all Claude models are available in all regions -- Try switching to `global` region for automatic routing to an available region +- Switch to `global`, `us`, or `eu` for models newer than Sonnet 4.6 - Check the [Vertex AI Model Garden](https://console.cloud.google.com/vertex-ai/model-garden) to see which models are available in your region -- Consider using a different region that has broader model availability (e.g., `us-east5`) **Latency issues** - If you're experiencing high latency, try using a region geographically closer to your users diff --git a/content/docs/configuration/metrics.mdx b/content/docs/configuration/metrics.mdx index 57e12bed7..716b09943 100644 --- a/content/docs/configuration/metrics.mdx +++ b/content/docs/configuration/metrics.mdx @@ -26,6 +26,17 @@ scrape_configs: - targets: ['librechat.example.com'] ``` +### Agent Startup Metrics + +Initial Agent chat requests emit two startup metrics: + +- `agent_startup_milestone_duration_seconds{milestone}` measures cumulative latency from request ingress to each startup milestone. +- `agent_startups_total{result}` counts startup attempts by terminal result. + +Milestones cover request admission, job creation and acknowledgement, conversation and history loading, client and run initialization, stream startup, and the first queued response or content event. Results distinguish content queued, completion without a content delta, deduplication, rejection, pause, replacement, abort, and error. + +When [backend OpenTelemetry tracing](/docs/configuration/dotenv#opentelemetry-tracing) is enabled, the `librechat.agent.startup` span reports the same milestones as events. It includes total startup duration, milestone count, terminal result, and the generation stream ID when one is assigned. + ### Redis Metrics Redis-backed caches and services emit two logical-operation metrics: diff --git a/content/docs/configuration/pre_configured_ai/anthropic.mdx b/content/docs/configuration/pre_configured_ai/anthropic.mdx index 9d980516f..e81f73472 100644 --- a/content/docs/configuration/pre_configured_ai/anthropic.mdx +++ b/content/docs/configuration/pre_configured_ai/anthropic.mdx @@ -14,12 +14,13 @@ ANTHROPIC_API_KEY=user_provided - You can determine which models you would like to have available with `ANTHROPIC_MODELS`. ```bash filename=".env" -ANTHROPIC_MODELS=claude-fable-5,claude-opus-4-8,claude-opus-4-7,claude-sonnet-5,claude-sonnet-4-6,claude-opus-4-6,claude-opus-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022 +ANTHROPIC_MODELS=claude-fable-5,claude-opus-5,claude-opus-4-8,claude-opus-4-7,claude-sonnet-5,claude-sonnet-4-6,claude-opus-4-6,claude-opus-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022 ``` **Notes:** - Claude Fable 5 is included in LibreChat's default Anthropic model catalog. Fable/Mythos-class models use the modern Anthropic profile in LibreChat: 1M context, 128K max output, adaptive thinking, prompt caching, and `thinkingDisplay` support for summarized or omitted reasoning output. +- Claude Opus 5 is available through direct Anthropic, Anthropic on Vertex AI, and AWS Bedrock. It has a 1M-token context window and 128K-token maximum output. Adaptive thinking is enabled unless explicitly disabled; when disabled, LibreChat limits `xhigh` or `max` effort to `high` to keep requests valid. - Claude Sonnet 5 is available through direct Anthropic, Anthropic on Vertex AI, and AWS Bedrock. LibreChat assigns it a 1M-token context window and 128K-token maximum output, uses adaptive thinking with summarized display when thinking is enabled, and sends an explicit disabled setting when a user turns thinking off. - Anthropic endpoint supports all [Shared Endpoint Settings](/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings) via the `librechat.yaml` configuration file, including `streamRate`, `headers`, `titleModel`, `titleMethod`, `titlePrompt`, `titlePromptTemplate`, and `titleEndpoint` - To configure Anthropic or an Anthropic-compatible gateway as a separate custom endpoint, use [`provider: "anthropic"`](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#provider). @@ -43,7 +44,8 @@ Set the following environment variables to enable Anthropic via Vertex AI: ANTHROPIC_USE_VERTEX=true # Vertex AI region (optional, defaults to 'us-east5') -# Available regions: global, us-east5, us-central1, europe-west1, europe-west4, asia-southeast1 +# Modern models such as Opus 5 require global, us, or eu. +# Specific regions serve Sonnet 4.6 and earlier. ANTHROPIC_VERTEX_REGION=global # Path to Google service account key file (optional) @@ -68,12 +70,12 @@ For model name mapping and advanced settings (similar to Azure OpenAI configurat endpoints: anthropic: vertex: - region: us-east5 + region: global models: - claude-opus-4.5: - deploymentName: claude-opus-4-5@20251101 - claude-sonnet-4: - deploymentName: claude-sonnet-4-20250514 + claude-opus-5: + deploymentName: claude-opus-5 + claude-sonnet-5: + deploymentName: claude-sonnet-5 claude-3.5-haiku: deploymentName: claude-3-5-haiku@20241022 ``` diff --git a/content/docs/configuration/pre_configured_ai/bedrock.mdx b/content/docs/configuration/pre_configured_ai/bedrock.mdx index f62097640..04ad5a0b5 100644 --- a/content/docs/configuration/pre_configured_ai/bedrock.mdx +++ b/content/docs/configuration/pre_configured_ai/bedrock.mdx @@ -84,12 +84,14 @@ For AWS credential behavior details, see the [AWS SDK for JavaScript credential - You can optionally specify which models you want to make available with `BEDROCK_AWS_MODELS`: ```bash filename=".env" -BEDROCK_AWS_MODELS=anthropic.claude-fable-5,anthropic.claude-opus-4-8,anthropic.claude-opus-4-7,anthropic.claude-sonnet-5,anthropic.claude-sonnet-4-6,meta.llama3-1-8b-instruct-v1:0 +BEDROCK_AWS_MODELS=global.anthropic.claude-fable-5,global.anthropic.claude-opus-5,global.anthropic.claude-opus-4-8,global.anthropic.claude-opus-4-7,global.anthropic.claude-sonnet-5,global.anthropic.claude-sonnet-4-6,meta.llama3-1-8b-instruct-v1:0 ``` -Note: If omitted, all known, supported model IDs will be included automatically. +If omitted, LibreChat includes its known supported models automatically. Claude 4 and newer defaults use Bedrock cross-region inference profile IDs because their bare `anthropic.` foundation-model IDs do not support on-demand Converse requests. LibreChat uses `global.` profiles where available and `us.` for Claude Opus 4.1. Use `BEDROCK_AWS_MODELS` to select a different profile available to your account. -- Claude Fable/Mythos-class models on Bedrock are inference-profile only. Use a profile ID such as `us.anthropic.claude-fable-5`, and enable Anthropic data sharing in the Bedrock console or Data Retention API before invoking them. +- Claude Fable/Mythos-class models on Bedrock are inference-profile only. Use a profile ID such as `global.anthropic.claude-fable-5`, and enable Anthropic data sharing in the Bedrock console or Data Retention API before invoking them. + +- Claude Opus 5 has a 1M-token context window and 128K-token maximum output. Adaptive thinking is enabled unless explicitly disabled. When thinking is disabled, LibreChat limits `xhigh` or `max` effort to `high` so Bedrock accepts the request. - Claude Sonnet 5 has a 1M-token context window and 128K-token maximum output. LibreChat applies adaptive thinking to foundation, cross-region inference-profile (for example, `us.anthropic.claude-sonnet-5`), and bare application inference-profile IDs. Turning thinking off sends an explicit disabled setting so that choice persists when a conversation is reloaded. @@ -156,7 +158,8 @@ Bedrock supports uploading documents directly to the provider via the `Upload to **Limitations:** -- Maximum file size per document: **4.5 MB** +- The default maximum file size is **4.5 MB**. +- When `fileConfig` does not set a smaller limit, Claude 4+ PDFs and Amazon Nova PDFs or DOCX files can be up to **32 MB**. - File names are automatically sanitized to conform to Bedrock's naming requirements (alphanumeric, spaces, hyphens, parentheses, square brackets; max 200 characters) For more information on file upload options, see the [OCR for Documents](/docs/features/ocr#5-upload-files-to-provider-direct) documentation. diff --git a/content/docs/features/ocr.mdx b/content/docs/features/ocr.mdx index 82b9f8818..5c3f7a0a8 100644 --- a/content/docs/features/ocr.mdx +++ b/content/docs/features/ocr.mdx @@ -187,7 +187,8 @@ Note: Standard OpenAI endpoints support PDF uploads in both Chat Completions and **PDF, CSV, DOC, DOCX, XLS, XLSX, HTML, TXT, and Markdown (.md)** Constraints: -- Maximum file size per document: **4.5 MB** +- The default maximum file size is **4.5 MB** +- When `fileConfig` does not set a smaller limit, Claude 4+ PDFs and Amazon Nova PDFs or DOCX files can be up to **32 MB** - File names are sanitized to conform to Bedrock's naming requirements (alphanumeric, spaces, hyphens, parentheses, square brackets; max 200 characters) For more details on Bedrock configuration, see the [AWS Bedrock setup guide](/docs/configuration/pre_configured_ai/bedrock). diff --git a/content/docs/features/skills.mdx b/content/docs/features/skills.mdx index 0626cbac9..73d48dba3 100644 --- a/content/docs/features/skills.mdx +++ b/content/docs/features/skills.mdx @@ -181,7 +181,7 @@ In the Agent Builder, turn on **Use all skills** to use the full catalog. Turnin ## Active and Shared Skills -Users can toggle skills active or inactive. Owned skills default to active. Shared skills use the admin-configured default until the user overrides them. +Users can toggle skills active or inactive. Owned and deployment skills default to active. Shared skills use the admin-configured default until the user overrides them. Inactive skills are excluded from: From 9fdc9ed38bf1ade9fec2cc73fbd9ea5572d33c78 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Sat, 1 Aug 2026 08:16:53 -0400 Subject: [PATCH 08/21] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Cover=20latest=20v?= =?UTF-8?q?0.8.8-rc1=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/changelog/config_v1.3.14.mdx | 39 +++++++-- content/changelog/v0.8.8-rc1.mdx | 57 ++++++++++++- content/docs/configuration/dotenv.mdx | 79 +++++++++++++++++-- content/docs/configuration/langfuse.mdx | 57 +++++++++---- .../object_structure/agents.mdx | 30 +++++-- .../object_structure/config.mdx | 17 ++-- .../object_structure/custom_endpoint.mdx | 2 + .../object_structure/mcp_servers.mdx | 8 ++ .../object_structure/model_specs.mdx | 47 +++++++++-- .../shared_endpoint_settings.mdx | 66 +++++++++++++++- content/docs/configuration/redis.mdx | 23 ++++++ content/docs/features/access_control.mdx | 7 +- content/docs/features/admin_panel.mdx | 12 +++ content/docs/features/agents.mdx | 26 ++++-- content/docs/features/code_interpreter.mdx | 2 +- content/docs/features/mcp.mdx | 2 + content/docs/user_guides/mongodb.mdx | 22 +++++- 17 files changed, 441 insertions(+), 55 deletions(-) diff --git a/content/changelog/config_v1.3.14.mdx b/content/changelog/config_v1.3.14.mdx index 8a77b6da7..44cc8dee1 100644 --- a/content/changelog/config_v1.3.14.mdx +++ b/content/changelog/config_v1.3.14.mdx @@ -1,5 +1,5 @@ --- -date: 2026-07-22 +date: 2026-08-01 title: โš™๏ธ Config v1.3.14 version: '1.3.14' --- @@ -7,7 +7,14 @@ version: '1.3.14' - Updated Agents endpoint capabilities - Added `memory` and `ask_user_question` to the default capability list - Added highly experimental, opt-in `stateful_code_sessions` for reusable Code Interpreter workspaces; behavior and configuration may change substantially during experimentation - - Added opt-in `run_in_background` for eligible background MCP and Code Interpreter tool calls + - Added opt-in `run_in_background`; Code Interpreter tools are background-eligible by default while MCP tools remain per-tool opt-ins + - Added opt-in `tool_intents` for live model-written labels on native and selected MCP tool calls + +- Added Agent activity-group settings + - `activityLabel` enables generated one-line headers for contiguous reasoning and tool-call blocks + - `activityModel`, `activityEndpoint`, and `activityPrompt` select and configure the header model call + - `activityMaxPerRun` and `activityCharLimit` bound additional calls and prompt input + - Fields can be set under `endpoints.all`, `endpoints.agents`, or the backing provider/custom endpoint and resolve independently by precedence - Added `endpoints.agents.toolApproval` - Enables human approval for matching Agent tool calls @@ -31,7 +38,8 @@ version: '1.3.14' - `showInMenu` can hide a spec from the selector while retaining trusted explicit `spec` access - `memory` equips an ephemeral Agent with memory tools - `askUserQuestion` enables durable question-and-resume flows - - `runInBackground` marks eligible model-spec tools as background-capable + - `runInBackground` now accepts a boolean or resolved tool-ID list; `false` or `[]` opts out of background-native code tools + - `describeIntent` accepts a boolean or resolved tool-ID list for live tool intent labels - Added OpenAI reasoning controls - `reasoning_mode` supports `standard` and `pro` @@ -40,10 +48,23 @@ version: '1.3.14' - GPT-5.6 reasoning requests default to the Responses API unless `useResponsesApi: false` is set explicitly - Added top-level `langfuse` tenant configuration - - Supports tenant public and secret keys, an allowed destination key, and `fanout.enabled` - - Secret keys written through administrator config APIs are encrypted and returned only as a redacted display value + - Stores enabled state, public key, encrypted secret key, verified project ID, masked `secretKeyPreview`, and an approved destination key + - Added an admin-only **Settings โ†’ Langfuse** connection flow with server-side credential verification + - Complete environment credentials take precedence in single-tenant deployments; fanout availability remains deployment-controlled + - Removed the legacy `displaySecretKey` and nested `fanout.enabled` fields - Added opt-in Compose and Helm fanout deployment settings for central and tenant-scoped trace export - Added `LANGFUSE_FANOUT_LISTEN_ADDR` to override the gateway's default `:4318` listen address + - Added `LANGFUSE_PROJECT_ID`, `LANGFUSE_TRACING_ENABLED`, and deterministic `LANGFUSE_SAMPLE_RATE` + +- Expanded admin config secret handling + - Registered OCR, speech, web-search, Assistants, Azure Assistants, and Langfuse keys are encrypted and redacted on admin writes and reads + - `endpoints.custom[].apiKey` literals are encrypted; environment references and `user_provided` remain passthrough values + - Registered secret fields expose server-generated `Preview` companions + +- Added Node.js HTTP server timeout settings + - `HTTP_KEEP_ALIVE_TIMEOUT_MS` and `HTTP_KEEP_ALIVE_TIMEOUT_BUFFER_MS` + - `HTTP_HEADERS_TIMEOUT_MS` and `HTTP_REQUEST_TIMEOUT_MS` + - Values are non-negative milliseconds; `0` disables the corresponding timeout - Added Code Interpreter runtime settings - `CODE_SANDBOX_PREWARM` controls stateful sandbox prewarming @@ -54,6 +75,7 @@ version: '1.3.14' - `FILE_UPLOAD_SSE_ENABLED` keeps long-running uploads alive with SSE heartbeats - `REMOTE_FILE_FETCH_TIMEOUT_MS` limits server-side remote file download time - `REMOTE_FILE_FETCH_MAX_BYTES` limits server-side remote file download size + - `FILE_USAGE_USER_MAX` and `FILE_USAGE_USER_WINDOW` limit queued-attachment TTL renewal requests separately from upload limits - Added separate authentication token-submission rate limits - `RESET_PASSWORD_SUBMISSION_MAX` and `RESET_PASSWORD_SUBMISSION_WINDOW` limit password-reset token validation independently from reset-email requests @@ -63,6 +85,13 @@ version: '1.3.14' - Added Agent conversation control `STEER_MAX_LENGTH` - Caps the length of one mid-run steering message +- Added `GENERATION_PROTOCOL_VERSION` + - Supports the rolling-upgrade-safe cutover to interrupt, recovery, and durable queue protocol v2 on Redis-backed deployments + +- Added section-scoped administrator configuration access + - Read responses are filtered to sections the administrator can access + - Managing a configuration section also grants read access to that section + - Added authentication and permission cache settings - `ALLOW_EMAIL_LOGIN_OVERRIDE` permits audited direct API email login while the regular email login UI is disabled - `AUTH_USER_CACHE_MODE=on` opts into a short Redis-backed authenticated-user cache diff --git a/content/changelog/v0.8.8-rc1.mdx b/content/changelog/v0.8.8-rc1.mdx index c4b1e045d..8aa8138c0 100644 --- a/content/changelog/v0.8.8-rc1.mdx +++ b/content/changelog/v0.8.8-rc1.mdx @@ -1,5 +1,5 @@ --- -date: 2026-07-27 +date: 2026-08-01 title: ๐Ÿš€ LibreChat v0.8.8-rc1 description: The v0.8.8-rc1 release of LibreChat version: '0.8.8-rc1' @@ -9,13 +9,14 @@ version: '0.8.8-rc1' ### ๐Ÿž๏ธ Highlights -- Steer Agent runs in progress or queue the next message +- Interrupt or steer Agent runs in progress, or queue the next message - Agents can pause to ask questions or request tool approval, then resume - Redesigned Agent Builder with a unified Tools marketplace and background MCP and Code Interpreter tools +- Activity groups and live tool intent labels for easier-to-scan Agent runs - Experimental stateful Code Interpreter sessions with reusable conversation workspaces - Agent-managed memory with optional per-agent isolation - Continue shared conversations as personal copies -- Opt-in Langfuse fanout for central and tenant tracing +- In-app Langfuse connections with optional tenant fanout - Provider updates: GPT-5.6, Claude Opus 5 and Sonnet 5, Gemini 3.6 Flash, and Gemini 3.5 Flash-Lite --- @@ -58,6 +59,19 @@ version: '0.8.8-rc1' - โšก feat: Add Gemini 3.6 Flash and Gemini 3.5 Flash-Lite Support by [@danny-avila](https://github.com/danny-avila) in [#14369](https://github.com/danny-avila/LibreChat/pull/14369) - ๐Ÿงต feat: Native Background Execution for Code Interpreter Tools by [@danny-avila](https://github.com/danny-avila) in [#14386](https://github.com/danny-avila/LibreChat/pull/14386) - โœณ๏ธ feat: Claude Opus 5 Support by [@danny-avila](https://github.com/danny-avila) in [#14422](https://github.com/danny-avila/LibreChat/pull/14422) +- โฑ๏ธ feat: Configurable HTTP Server Timeouts by [@danny-avila](https://github.com/danny-avila) in [#14481](https://github.com/danny-avila/LibreChat/pull/14481) +- ๐Ÿ•ถ feat: Generalize Admin Config Secret Redaction by [@dustinhealy](https://github.com/dustinhealy) in [#14509](https://github.com/danny-avila/LibreChat/pull/14509) +- ๐Ÿท๏ธ feat: Activity Groups With Fast-Model Headers by [@danny-avila](https://github.com/danny-avila) in [#14391](https://github.com/danny-avila/LibreChat/pull/14391) +- ๐Ÿ—๏ธ feat: Custom Endpoint API Key Encryption via Array Secret Registry by [@danny-avila](https://github.com/danny-avila) in [#14510](https://github.com/danny-avila/LibreChat/pull/14510) +- ๐ŸŽฏ feat: Tool Intent Label Capability (tool_intents) by [@danny-avila](https://github.com/danny-avila) in [#14499](https://github.com/danny-avila/LibreChat/pull/14499) +- ๐Ÿชข feat: Langfuse Fanout Connection Setting by [@danny-avila](https://github.com/danny-avila) in [#14108](https://github.com/danny-avila/LibreChat/pull/14108) +- ๐Ÿ›‘ feat: Preemptive Steer - Backend Interrupt & Steer by [@danny-avila](https://github.com/danny-avila) in [#14518](https://github.com/danny-avila/LibreChat/pull/14518) +- ๐ŸŽฏ feat: Per-Tool Intent Labels for Model Specs by [@danny-avila](https://github.com/danny-avila) in [#14526](https://github.com/danny-avila/LibreChat/pull/14526) +- โšก feat: Interrupt & Steer, Client by [@danny-avila](https://github.com/danny-avila) in [#14528](https://github.com/danny-avila/LibreChat/pull/14528) +- ๐Ÿงต feat: Background-Native Code Execution Tools by [@danny-avila](https://github.com/danny-avila) in [#14532](https://github.com/danny-avila/LibreChat/pull/14532) +- ๐ŸŽฏ feat: Render Tool Intent as the Live Tool-Call Label by [@danny-avila](https://github.com/danny-avila) in [#14536](https://github.com/danny-avila/LibreChat/pull/14536) +- ๐ŸŽฏ feat: Per-Tool Intent Label Toggles in the Agent Builder by [@danny-avila](https://github.com/danny-avila) in [#14550](https://github.com/danny-avila/LibreChat/pull/14550) +- โšก feat: Reliable Interrupt & Steer Escalation and Recovery by [@danny-avila](https://github.com/danny-avila) in [#14558](https://github.com/danny-avila/LibreChat/pull/14558) ### ๐Ÿ› Fixes @@ -140,6 +154,26 @@ version: '0.8.8-rc1' - โ™พ๏ธ fix: Preserve Resumable Stream Ordering Across Turns by [@danny-avila](https://github.com/danny-avila) in [#14411](https://github.com/danny-avila/LibreChat/pull/14411) - ๐Ÿงฉ fix: Harden Agent Skill Lifecycles End to End by [@danny-avila](https://github.com/danny-avila) in [#14429](https://github.com/danny-avila/LibreChat/pull/14429) - ๐Ÿ“ง fix: Restore `invite-user` CLI by [@unsnow-iac](https://github.com/unsnow-iac) in [#14436](https://github.com/danny-avila/LibreChat/pull/14436) +- ๐Ÿ”— fix: Resolve MCP Tool-Key Boundary Against Configured Server Names by [@danny-avila](https://github.com/danny-avila) in [#14448](https://github.com/danny-avila/LibreChat/pull/14448) +- ๐Ÿƒ fix: Strip $-Prefixed Schema Keywords Before Persisting MCP Tool Params by [@danny-avila](https://github.com/danny-avila) in [#14464](https://github.com/danny-avila/LibreChat/pull/14464) +- ๐Ÿ”— fix: Render Shared Links Containing Steers by [@danny-avila](https://github.com/danny-avila) in [#14480](https://github.com/danny-avila/LibreChat/pull/14480) +- ๐Ÿ”’ fix: Bound `/files/usage` TTL Hold Instead of Clearing It by [@danny-avila](https://github.com/danny-avila) in [#14470](https://github.com/danny-avila/LibreChat/pull/14470) +- ๐Ÿค fix: Filter Admin Config Reads by Section-Scoped Read Capability by [@dustinhealy](https://github.com/dustinhealy) in [#14472](https://github.com/danny-avila/LibreChat/pull/14472) +- ๐Ÿƒ fix: Amazon DocumentDB Compatibility for Pipeline-Form Updates by [@danny-avila](https://github.com/danny-avila) in [#14495](https://github.com/danny-avila/LibreChat/pull/14495) +- ๐Ÿ›ก๏ธ fix: validate message feedback payloads by [@upman](https://github.com/upman) in [#14500](https://github.com/danny-avila/LibreChat/pull/14500) +- ๐Ÿงฉ fix: Apply Every Entry of Multi-Part Stream Deltas by [@danny-avila](https://github.com/danny-avila) in [#14502](https://github.com/danny-avila/LibreChat/pull/14502) +- ๐Ÿท๏ธ fix: Re-attribute Agent Content After In-Thread Steers by [@danny-avila](https://github.com/danny-avila) in [#14497](https://github.com/danny-avila/LibreChat/pull/14497) +- ๐ŸŽฏ fix: Keep Run Steps and Labels in One Index Space After a Resume Sync by [@danny-avila](https://github.com/danny-avila) in [#14516](https://github.com/danny-avila/LibreChat/pull/14516) +- ๐Ÿชถ fix: Yield Soft Default Model Spec to Agent Picks in Picker-Only Deployments by [@danny-avila](https://github.com/danny-avila) in [#14515](https://github.com/danny-avila/LibreChat/pull/14515) +- ๐ŸชŸ fix: Surface MCP Initialization Errors by [@danny-avila](https://github.com/danny-avila) in [#14529](https://github.com/danny-avila/LibreChat/pull/14529) +- ๐Ÿชƒ fix: Resolve User Vars Before the First Post-OAuth Reconnect by [@schumajs](https://github.com/schumajs) in [#14538](https://github.com/danny-avila/LibreChat/pull/14538) +- ๐Ÿ”’ fix: Remove Owner Email from Agent `owner_contact` Fallback by [@danny-avila](https://github.com/danny-avila) in [#14541](https://github.com/danny-avila/LibreChat/pull/14541) +- ๐Ÿ“„ fix: Filter Non-PDF Documents on the Anthropic Encode Path by [@danny-avila](https://github.com/danny-avila) in [#14535](https://github.com/danny-avila/LibreChat/pull/14535) +- ๐ŸŽฏ fix: Exact Ask-Question Attribution via Interrupt tool_call_id by [@danny-avila](https://github.com/danny-avila) in [#14539](https://github.com/danny-avila/LibreChat/pull/14539) +- ๐Ÿงน fix: Clean Up MCP OAuth State Mappings on Uninstall + Reject Superseded Callbacks by [@danny-avila](https://github.com/danny-avila) in [#14549](https://github.com/danny-avila/LibreChat/pull/14549) +- ๐Ÿง  fix: Preserve Deferred Tool Schemas Across HITL Resume by [@danny-avila](https://github.com/danny-avila) in [#14552](https://github.com/danny-avila/LibreChat/pull/14552) +- ๐Ÿฆ— fix: Ignore Sequenced Redis Events Without SSE Subscribers by [@danny-avila](https://github.com/danny-avila) in [#14557](https://github.com/danny-avila/LibreChat/pull/14557) +- ๐Ÿ”— fix: Normalize MCP Tool Keys at Every Producer, Resolve Raw Names via Aliases by [@danny-avila](https://github.com/danny-avila) in [#14553](https://github.com/danny-avila/LibreChat/pull/14553) ### ๐Ÿ”ง Refactoring and Performance @@ -176,12 +210,16 @@ version: '0.8.8-rc1' - ๐Ÿงฌ perf: Memoize Message Spine and Isolate Scroll-Button State by [@danny-avila](https://github.com/danny-avila) in [#14330](https://github.com/danny-avila/LibreChat/pull/14330) - ๐ŸชŸ perf: Virtualize Search Results and Stop the Per-Query Remount by [@danny-avila](https://github.com/danny-avila) in [#14352](https://github.com/danny-avila/LibreChat/pull/14352) - โšก perf: Reduce Agent Chat Startup Latency by [@danny-avila](https://github.com/danny-avila) in [#14423](https://github.com/danny-avila/LibreChat/pull/14423) +- ๐Ÿ’ฌ refactor: Raise `ask_user_question` Option Label Cap to 280 Chars by [@danny-avila](https://github.com/danny-avila) in [#14491](https://github.com/danny-avila/LibreChat/pull/14491) ### ๐Ÿงช Tests - ๐Ÿ“ test: Guard Web Search Description Length by [@danny-avila](https://github.com/danny-avila) in [#14044](https://github.com/danny-avila/LibreChat/pull/14044) - ๐Ÿ›‚ test: Cover Tool Approval Workflows End to End by [@danny-avila](https://github.com/danny-avila) in [#14427](https://github.com/danny-avila/LibreChat/pull/14427) - ๐Ÿงญ test: Cover Agent Handoffs End to End by [@danny-avila](https://github.com/danny-avila) in [#14428](https://github.com/danny-avila/LibreChat/pull/14428) +- ๐Ÿงช test: Reasoning-Stream Render Perf Benchmark via react-scan by [@danny-avila](https://github.com/danny-avila) in [#14494](https://github.com/danny-avila/LibreChat/pull/14494) +- ๐ŸŽ›๏ธ test: Guard Multi-Steer Injection Across Tool Boundaries by [@danny-avila](https://github.com/danny-avila) in [#14498](https://github.com/danny-avila/LibreChat/pull/14498) +- ๐Ÿงช test: Run mock E2E against Redis in shards by [@danny-avila](https://github.com/danny-avila) in [#14551](https://github.com/danny-avila/LibreChat/pull/14551) ### ๐Ÿ“ฆ Dependencies, Chores & CI @@ -204,6 +242,17 @@ version: '0.8.8-rc1' - ๐Ÿ“ฆ chore: Update `@librechat/agents` to v3.2.68 by [@danny-avila](https://github.com/danny-avila) in [#14380](https://github.com/danny-avila/LibreChat/pull/14380) - ๐Ÿšฆ ci: Gate Playwright Runs to Maintainers by [@danny-avila](https://github.com/danny-avila) in [#14385](https://github.com/danny-avila/LibreChat/pull/14385) - ๐ŸŽญ ci: Scope Playwright Runs to Relevant Changes by [@danny-avila](https://github.com/danny-avila) in [#14388](https://github.com/danny-avila/LibreChat/pull/14388) +- ๐Ÿƒ chore: Bump Mongoose to 8.24.1 to Patch Prototype Pollution by [@danny-avila](https://github.com/danny-avila) in [#14461](https://github.com/danny-avila/LibreChat/pull/14461) +- ๐Ÿ—บ๏ธ chore: Bump PostCSS to 8.5.18 to Patch Source Map Traversal by [@danny-avila](https://github.com/danny-avila) in [#14463](https://github.com/danny-avila/LibreChat/pull/14463) +- ๐Ÿ“ฆ chore: bump `@librechat/agents` to v3.3.4 by [@danny-avila](https://github.com/danny-avila) in [#14482](https://github.com/danny-avila/LibreChat/pull/14482) +- ๐Ÿ‚ chore: Prune Deprecated Packages From the Dependency Tree by [@danny-avila](https://github.com/danny-avila) in [#14483](https://github.com/danny-avila/LibreChat/pull/14483) +- ๐ŸŒฏ chore: Retire Rollup-Era devDependencies After tsdown Migration by [@danny-avila](https://github.com/danny-avila) in [#14496](https://github.com/danny-avila/LibreChat/pull/14496) +- ๐Ÿ“ฆ chore: Bump @librechat/agents to v3.3.5 by [@danny-avila](https://github.com/danny-avila) in [#14506](https://github.com/danny-avila/LibreChat/pull/14506) +- ๐Ÿ“ฆ chore: bump `@librechat/agents` to v3.3.8 by [@danny-avila](https://github.com/danny-avila) in [#14525](https://github.com/danny-avila/LibreChat/pull/14525) +- ๐Ÿงช chore: Add the Activity-Label Prose Eval Harness by [@danny-avila](https://github.com/danny-avila) in [#14527](https://github.com/danny-avila/LibreChat/pull/14527) +- ๐ŸŸฆ chore: Convert Activity-Label Eval Harness to TypeScript by [@danny-avila](https://github.com/danny-avila) in [#14530](https://github.com/danny-avila/LibreChat/pull/14530) +- ๐Ÿ“ฆ chore: bump `@librechat/agents` to v3.3.9 by [@danny-avila](https://github.com/danny-avila) in [#14548](https://github.com/danny-avila/LibreChat/pull/14548) +- ๐Ÿ“ฆ chore: bump `@librechat/agents` to v3.3.11 by [@danny-avila](https://github.com/danny-avila) in [#14562](https://github.com/danny-avila/LibreChat/pull/14562) ### ๐ŸŒ Internationalization @@ -214,6 +263,7 @@ version: '0.8.8-rc1' - ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14307](https://github.com/danny-avila/LibreChat/pull/14307) - ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14376](https://github.com/danny-avila/LibreChat/pull/14376) - ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14406](https://github.com/danny-avila/LibreChat/pull/14406) +- ๐ŸŒ i18n: Update translation.json with latest translations by [@danny-avila](https://github.com/danny-avila) in [#14460](https://github.com/danny-avila/LibreChat/pull/14460) ## New Contributors @@ -232,5 +282,6 @@ version: '0.8.8-rc1' - [@Aho-Bakaa](https://github.com/Aho-Bakaa) made their first contribution in [#14262](https://github.com/danny-avila/LibreChat/pull/14262) - [@joshbla](https://github.com/joshbla) made their first contribution in [#13930](https://github.com/danny-avila/LibreChat/pull/13930) - [@unsnow-iac](https://github.com/unsnow-iac) made their first contribution in [#14436](https://github.com/danny-avila/LibreChat/pull/14436) +- [@schumajs](https://github.com/schumajs) made their first contribution in [#14538](https://github.com/danny-avila/LibreChat/pull/14538) **Full Changelog**: [v0.8.7...v0.8.8-rc1](https://github.com/danny-avila/LibreChat/compare/v0.8.7...v0.8.8-rc1) diff --git a/content/docs/configuration/dotenv.mdx b/content/docs/configuration/dotenv.mdx index 070b8fe4c..28c3f0c5d 100644 --- a/content/docs/configuration/dotenv.mdx +++ b/content/docs/configuration/dotenv.mdx @@ -41,6 +41,41 @@ For more info see: ]} /> +### HTTP Server Timeouts + +These optional values configure the Node.js HTTP server. Leave them unset to retain Node's defaults. A value of `0` disables that timeout. + + + +Values must be non-negative safe integers; invalid values are ignored. When both header and request timeouts are enabled, LibreChat clamps the header timeout to the request timeout if it is higher. Node checks header and request expiry on a 30-second connection sweep, so values below `30000` are not enforced at exact millisecond precision. Bun currently accepts these settings but does not enforce them; LibreChat logs a warning when the API server runs under Bun. + ### Trust proxy Use the address that is at most n number of hops away from the Express application. @@ -231,14 +266,11 @@ If you are using an online database, the URI format is `mongodb+srv:// ]} /> -Alternatively you can use `documentDb` that emulates `mongoDb` but it: - -- does not support `retryWrites` - use `retryWrites=false` -- requires TLS connection, hence use parameters `tls=true` to enable TLS and `tlsCAFile=/path-to-ca/bundle.pem` to point to the AWS provided CA bundle file +Amazon DocumentDB 5.0+ instance-based clusters are a supported target. DocumentDB requires `retryWrites=false` and TLS with the AWS CA bundle; elastic clusters are unsupported because they do not provide unique indexes. A typical URI has this form: -The URI for `documentDb` will look like: +`mongodb://username:password@cluster:27017/librechat?tls=true&tlsCAFile=/path-to-ca/global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false` -- `mongodb+srv://username:password@domain/dbname?retryWrites=false&tls=true&tlsCAFile=/path-to-ca/bundle.pem` +DocumentDB 4.0 can run with reduced partial-unique-index enforcement. See [Amazon DocumentDB Compatibility](/docs/user_guides/mongodb#amazon-documentdb-compatibility) for the supported target and caveats. See also: @@ -389,13 +421,16 @@ Note: `DEBUG_CONSOLE` is not recommended, as the outputs can be quite verbose, a ### Langfuse Tracing and Tenant Fanout -Use the standard Langfuse variables for one central observability project. The optional fanout deployment can additionally route tenant traces, media, and feedback scores to tenant-specific Langfuse projects. See [Langfuse Tracing](/docs/configuration/langfuse) for setup and architecture. +Use the standard Langfuse variables for one central observability project. The optional fanout deployment can additionally route tenant traces, media, and feedback scores to tenant-specific Langfuse projects. See [Langfuse Tracing](/docs/configuration/langfuse) for setup, in-app connection management, and architecture. +In a single-tenant deployment without complete `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY` environment credentials, an authorized administrator can configure one encrypted connection under **Settings โ†’ Langfuse**. Complete environment credentials take precedence and hide that setting. Fanout deployments use the same setting for the tenant connection when fanout and tenant export are enabled. + ### OpenTelemetry Tracing LibreChat can emit backend OpenTelemetry traces for general API, HTTP, MongoDB, Mongoose, Redis, and outbound request visibility. Redis command-level spans are opt-in so default traces stay high-level. Use Langfuse for GenAI-specific prompt/model observability. @@ -1812,6 +1849,27 @@ LibreChat applies separate IP-based limits to requesting an email and submitting ]} /> +##### Queued Attachment TTL Limiter: + +The `/files/usage` endpoint renews a bounded TTL hold for attachments waiting in queued Agent messages. It has a separate per-user limiter so metadata renewals do not consume the upload quota. + + + #### Import conversation rate limiting Limits how often users can import conversations to prevent abuse. @@ -3268,6 +3326,12 @@ For detailed configuration and examples, see: **[Redis Configuration Guide](/doc 'Enable Redis for resumable LLM streams. Defaults to USE_REDIS value if not set. Set to false to use in-memory storage for streams.', '# USE_REDIS_STREAMS=true', ], + [ + 'GENERATION_PROTOCOL_VERSION', + 'integer', + 'Generation stream protocol (1 or 2). Redis-backed deployments default to rolling-upgrade-safe v1 until explicitly cut over; in-memory streams default to v2.', + '# GENERATION_PROTOCOL_VERSION=2', + ], [ 'REDIS_URI', 'string', @@ -3370,6 +3434,7 @@ For detailed configuration and examples, see: **[Redis Configuration Guide](/doc Notes: - When `USE_REDIS=true`, you must provide `REDIS_URI` or the application will throw an error. +- For Redis-backed generation streams, first deploy the v2-capable release to every replica with `GENERATION_PROTOCOL_VERSION` unset (or `1`). After old active generations drain, set it to `2` in a second rollout. Do not roll back to a pre-v2 image while v2 generations remain active. See [Generation Protocol Rollout](/docs/configuration/redis#generation-protocol-rollout). - For Redis Cluster mode, provide multiple URIs: `redis://node1:7001,redis://node2:7002,redis://node3:7003` (cluster mode is auto-detected). - For single-endpoint managed Redis services that shard keys internally, keep `USE_REDIS_CLUSTER=false` and set `REDIS_CLUSTER_SAFE_DELETE=true` if cache clears fail with `CROSSSLOT` errors. - Use `rediss://` protocol for TLS connections and set `REDIS_CA` if your CA is not publicly trusted. diff --git a/content/docs/configuration/langfuse.mdx b/content/docs/configuration/langfuse.mdx index d188eac45..5202498ee 100644 --- a/content/docs/configuration/langfuse.mdx +++ b/content/docs/configuration/langfuse.mdx @@ -16,7 +16,24 @@ Before you begin, ensure you have: ## Setup -Add the following Langfuse-related environment variables to your `.env` file in your LibreChat installation directory: +Choose either an in-app connection or environment-managed credentials for a single-tenant deployment. Complete environment credentials take precedence. + +### In-App Connection + +An authorized administrator can open **Settings โ†’ Langfuse**, choose an approved destination, enter the project's public and secret keys, and select **Save & enable**. LibreChat verifies both keys before saving, records the verified project ID, encrypts the secret key at rest, and returns only a masked preview on later reads. A saved connection can be enabled, disabled, retested, or replaced without exposing its secret. + +The setting requires both `access:admin` and `manage:configs:langfuse` (or the corresponding broad/admin permissions). It is available when tracing is enabled and: + +- A single-tenant deployment does not have both `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY`. +- A fanout deployment has an enabled collector and tenant export is not disabled by the emergency switch. + +Do not place a plaintext `langfuse.secretKey` directly in `librechat.yaml`; the runtime accepts the encrypted value produced by an authorized config write. Use the Settings page for the normal connection workflow. + +The saved connection belongs to the base configuration. Role, group, and user configuration overrides cannot replace or remove the `langfuse` section. + +### Environment-Managed Connection + +Add the following values to your `.env` file when deployment operators should own the central connection: @@ -37,6 +72,8 @@ Add the following Langfuse-related environment variables to your `.env` file in # Langfuse Configuration LANGFUSE_PUBLIC_KEY=pk-lf-*** LANGFUSE_SECRET_KEY=sk-lf-*** +# LANGFUSE_PROJECT_ID=project-id +# LANGFUSE_SAMPLE_RATE=1 # ๐Ÿ‡ช๐Ÿ‡บ EU Data Region LANGFUSE_BASE_URL=https://cloud.langfuse.com @@ -50,6 +87,8 @@ LANGFUSE_BASE_URL=https://cloud.langfuse.com `http://localhost:3000` for local development). +When both environment keys are present, LibreChat uses them for the central project and hides **Settings โ†’ Langfuse**. `LANGFUSE_TRACING_ENABLED=false` or `LANGFUSE_SAMPLE_RATE=0` disables both traces and feedback scores. Fractional sampling makes one deterministic decision per trace; sampled-out traces do not receive later feedback scores. + ## Tenant Fanout (Optional) Langfuse fanout lets a multi-tenant LibreChat deployment export each eligible trace and its media to both a central Langfuse project and a tenant-specific project. The feature is opt-in and adds a gateway plus an internal OpenTelemetry collector; normal single-project tracing above is unchanged when fanout is not deployed. @@ -57,7 +96,7 @@ Langfuse fanout lets a multi-tenant LibreChat deployment export each eligible tr Fanout uses two configuration layers: - Deployment environment variables define the central project, gateway, and allowed tenant destinations at startup. -- Tenant app configuration supplies that tenant's public key, encrypted secret key, and one allowed destination. Keys can be changed at runtime without restarting the gateway. +- **Settings โ†’ Langfuse** supplies the tenant's enabled state, public key, encrypted secret key, verified project ID, and one allowed destination. Keys can be changed at runtime without restarting the gateway. The included Compose override supports the `eu`, `us`, and `jp` Langfuse Cloud destinations: @@ -160,19 +199,9 @@ Scale fanout manually with `langfuseFanout.replicaCount`; the chart does not cre Additional deployment overrides include `langfuseFanout.service` for the Service type, port, and annotations; `resources`, `podAnnotations`, and `podLabels` for the gateway Pod; and `otelCollector.image` and `otelCollector.resources` for the sidecar. If you change `langfuseFanout.traceCollectorUrl` or `otelCollector.receiverEndpoint`, keep both values pointed at the same internal collector listener. -Tenant configuration uses the following shape. Prefer an administrator-facing config interface so `secretKey` is encrypted at write time; `displaySecretKey` is generated for redacted display and should not be supplied directly. - -```yaml filename="Tenant app configuration" -langfuse: - enabled: true - publicKey: 'pk-lf-tenant' - secretKey: 'sk-lf-tenant' - destination: 'us' - fanout: - enabled: true -``` +The stored top-level `langfuse` object contains `enabled`, `publicKey`, encrypted `secretKey`, verified `projectId`, server-generated `secretKeyPreview`, and `destination`. Treat it as API-managed configuration: do not submit preview fields or encrypted payloads back as secrets. The earlier `displaySecretKey` and nested `fanout.enabled` fields are no longer used. -Tenant export occurs only when fanout is enabled, both tenant keys are present, and `destination` matches an allowed startup destination. Other traces can still flow to the central project. Set `LANGFUSE_FANOUT_TENANT_EXPORT_DISABLED=true` as an emergency switch to stop tenant trace and feedback-score export while retaining central export. +Tenant export occurs only when fanout and the collector URL are enabled, the saved connection is enabled with valid keys, and `destination` matches an allowed startup destination. Other traces can still flow to the central project. Set `LANGFUSE_FANOUT_TENANT_EXPORT_DISABLED=true` as an emergency switch to stop tenant trace and feedback-score export while retaining central export; this also hides the in-app connection setting until tenant export is restored. Trace and media traffic goes through the fanout gateway. Feedback scores are sent directly from LibreChat: central scores use `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, and `LANGFUSE_BASE_URL`, while tenant scores use tenant app configuration. diff --git a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx index 19b47b264..0d7bd56ed 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/agents.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/agents.mdx @@ -14,13 +14,15 @@ endpoints: maxRecursionLimit: 100 disableBuilder: false # (optional) Agent Capabilities available to all users. Omit the ones you wish to exclude. Defaults to list below. - # Opt-in capabilities: "programmatic_tools", "stateful_code_sessions", and "run_in_background". + # Opt-in capabilities: "programmatic_tools", "stateful_code_sessions", "run_in_background", and "tool_intents". # capabilities: ["deferred_tools", "execute_code", "file_search", "web_search", "artifacts", "subagents", "actions", "context", "skills", "memory", "ask_user_question", "tools", "chain", "ocr"] # (optional) File citation configuration for file_search capability maxCitations: 30 # Maximum total citations in responses (1-50) maxCitationsPerFile: 7 # Maximum citations from each file (1-10) minRelevanceScore: 0.45 # Minimum relevance score threshold (0.0-1.0) titleTiming: immediate + activityLabel: true + activityModel: gpt-4.1-nano skills: maxCatalogSkills: 20 toolApproval: @@ -111,6 +113,18 @@ For more information about agent steps, see [Max Agent Steps](/docs/features/age titleTiming: immediate ``` +## activityLabel + +Set `activityLabel: true` to group each block of Agent reasoning and tool calls under a generated one-line header. Use `activityModel`, `activityEndpoint`, `activityPrompt`, `activityMaxPerRun`, and `activityCharLimit` to control the additional model call and its cost. See [Agent Activity Groups](/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings#agent-activity-groups) for the full field reference and precedence rules. + +```yaml filename="endpoints / agents / activity groups" +activityLabel: true +activityEndpoint: openAI +activityModel: gpt-4.1-nano +activityMaxPerRun: 20 +activityCharLimit: 600 +``` + ## disableBuilder -`displaySecretKey` is generated for redacted administrator display and should not be configured directly. See [Langfuse Configuration](/docs/configuration/langfuse#tenant-fanout-optional) for deployment variables, Compose and Helm setup, secret handling, and routing behavior. +Manage this object through **Settings โ†’ Langfuse** or an authorized administrator configuration client. The Settings flow verifies the connection and derives `projectId`; authorized administrator writes encrypt `secretKey`, generate `secretKeyPreview`, and redact the secret from reads. Plaintext `secretKey` values placed directly in `librechat.yaml` are not accepted by the runtime connection path. The legacy `displaySecretKey` and `fanout.enabled` fields are no longer part of the schema. + +`langfuse` is a base-configuration-only section. Role, group, and user configuration overrides cannot replace or tombstone it. + +See [Langfuse Configuration](/docs/configuration/langfuse) for availability rules, environment-managed credentials, and optional fanout deployment. ## skillSync diff --git a/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx b/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx index 3680d6aba..fcfcff7e3 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx @@ -106,6 +106,8 @@ or apiKey: 'user_provided' ``` +When a custom endpoint is written through the administrator configuration API, LibreChat encrypts a literal `apiKey` at rest and returns only an `apiKeyPreview`. `${ENV_VAR}` references and `user_provided` remain readable passthrough values. For endpoints defined directly in `librechat.yaml`, prefer an environment reference as shown above. + ## baseURL **Key:** diff --git a/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx b/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx index aa552fd7d..61dc4dcc4 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx @@ -91,6 +91,14 @@ mcpServers: ]} /> + + Model-facing tool keys preserve letters, numbers, `_`, `.`, and `-`; other characters in a server + name are replaced with `_`. LibreChat maps those normalized keys back to the configured name and + heals older saved Agent tool references. Avoid two names that normalize to the same value, such as + `Sales Force` and `Sales:Force`: their tool keys are ambiguous, so LibreChat warns and excludes the + shadowed server's tools rather than risk routing a call to the wrong server. + + ### Subkeys -Requires the opt-in endpoint-level `run_in_background` capability. LibreChat marks the spec's eligible MCP tools as background-capable; when `executeCode: true`, Code Interpreter and shell calls are eligible too. The model can start an eligible tool, continue working, and poll with `check_background_task`. Completed code output and generated files are attached to the original code call. Background task state is process-local and does not survive a server restart or move across replicas. +Requires the opt-in endpoint-level `run_in_background` capability. With that capability and `executeCode: true`, Code Interpreter execution and shell calls are background-eligible by default. Set `runInBackground: false` or `[]` to opt them out, `true` to enable every eligible tool attached to the spec, or an array of resolved tool IDs to enable only those tools. Selecting `execute_code` or `bash_tool` selects both native code tools; a list that omits them opts them out. Unsupported or misspelled selections are logged. + +The model can start an eligible tool, continue working, and poll with `check_background_task`. Completed code output and generated files are attached to the original code call. Background task state is process-local and does not survive a server restart or move across replicas. ```yaml filename="modelSpecs / runInBackground" modelSpecs: @@ -745,7 +747,42 @@ modelSpecs: - name: 'operations-assistant' mcpServers: ['operations'] executeCode: true - runInBackground: true + runInBackground: + - 'execute_code' + - 'slow_report_mcp_operations' + preset: + endpoint: 'openAI' + model: 'gpt-4o-mini' +``` + +--- + +### describeIntent + + + +Requires the opt-in endpoint-level `tool_intents` capability. Native tools such as web search, file authoring, memory, and supported Code Interpreter tools use intent labels by default while the capability is enabled. Set `describeIntent: true` to enable every eligible tool, or provide resolved tool IDs to enable only those tools and disable labels for everything else. An empty array disables all intent labels for the spec. Omitting the field or setting it to `false` adds no broader selection, so native defaults still apply. + +Intent labels are included in tool schemas and therefore add schema tokens to model requests. LibreChat logs selections that are misspelled, unavailable to the spec, or ineligible. + +```yaml filename="modelSpecs / describeIntent" +modelSpecs: + list: + - name: 'research-assistant' + webSearch: true + mcpServers: ['research'] + describeIntent: + - 'web_search' + - 'search_mcp_research' preset: endpoint: 'openAI' model: 'gpt-4o-mini' diff --git a/content/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings.mdx b/content/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings.mdx index c9b722f30..4c1409fd4 100644 --- a/content/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings.mdx +++ b/content/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings.mdx @@ -56,6 +56,13 @@ endpoints: azureAssistants: streamRate: 30 + agents: + activityLabel: true + activityEndpoint: 'openAI' + activityModel: 'gpt-4.1-nano' + activityMaxPerRun: 20 + activityCharLimit: 600 + # Global configuration using 'all' - this applies shared settings across endpoints. # Most defined values override endpoint defaults; headers are merged and endpoint values win on collisions. all: @@ -72,7 +79,7 @@ endpoints: {convo} ``` -> **Important:** When using the `all` configuration, most shared properties you define apply across endpoints. In the example above, the `all` configuration would apply `titleConvo`, `titleModel`, and `titlePrompt` to all endpoints, while individual `streamRate` settings would be preserved since it's not defined in `all`. `headers` are merged separately: values from `endpoints.all.headers` apply globally, and endpoint-level headers win on key collisions. +> **Important:** When using the `all` configuration, most shared properties you define apply across endpoints. In the example above, the `all` configuration would apply `titleConvo`, `titleModel`, and `titlePrompt` to all endpoints, while individual `streamRate` settings would be preserved since it's not defined in `all`. `headers` are merged separately: values from `endpoints.all.headers` apply globally, and endpoint-level headers win on key collisions. Activity settings resolve field by field in the same order, so an unrelated `all` setting does not hide an endpoint's activity configuration. ## streamRate @@ -300,6 +307,63 @@ endpoints: # Will use anthropic's configuration for title generation ``` +## Agent Activity Groups + +Activity groups make long Agent runs easier to scan by collapsing each contiguous block of reasoning and tool calls under a generated one-line header. Header generation runs outside the main model-response path, but it is still a model call and its usage is recorded and billed. + + + +```yaml filename="endpoints / agents / activity groups" +endpoints: + agents: + activityLabel: true + activityEndpoint: 'openAI' + activityModel: 'gpt-4.1-nano' + activityMaxPerRun: 20 + activityCharLimit: 600 +``` + +You can also set these fields under `endpoints.all` or a backing provider/custom endpoint. Values resolve independently, with the first defined value winning in this order: `endpoints.all`, the public `agents` endpoint, then the backing provider or custom endpoint. If `activityEndpoint` is unknown, LibreChat logs a warning and uses the Agent's provider instead. + ## maxToolResultChars **Key:** diff --git a/content/docs/configuration/redis.mdx b/content/docs/configuration/redis.mdx index 9da6678ca..f4a97ce96 100644 --- a/content/docs/configuration/redis.mdx +++ b/content/docs/configuration/redis.mdx @@ -15,6 +15,7 @@ This guide covers how to configure Redis for caching and session storage in Libr - [Performance Tuning](#performance-tuning) - [Configuration Examples](#configuration-examples) - [Resumable Streams](#resumable-streams) +- [Generation Protocol Rollout](#generation-protocol-rollout) ## Basic Setup @@ -323,6 +324,28 @@ REDIS_URI=redis://127.0.0.1:6379 # USE_REDIS_STREAMS=true # Enabled by default when USE_REDIS=true ``` +### Generation Protocol Rollout + +The v2 generation protocol adds the durable queue, interrupt, pause/resume, and recovery guarantees used by current Agent runs. Redis-backed deployments intentionally remain on protocol v1 when `GENERATION_PROTOCOL_VERSION` is unset so replicas running different LibreChat versions can coexist during a rolling upgrade. + +Use a two-stage rollout: + +1. Deploy the v2-capable LibreChat image to **every** replica with `GENERATION_PROTOCOL_VERSION` unset or set to `1`. +2. Wait for active generations owned by the previous image to finish or drain. +3. Set `GENERATION_PROTOCOL_VERSION=2` and roll out the same image again. + +```bash filename=".env" +USE_REDIS=true +USE_REDIS_STREAMS=true +GENERATION_PROTOCOL_VERSION=2 +``` + + + Do not enable protocol v2 until every replica supports it. After v2 generations begin, do not roll back to a pre-v2 LibreChat image until those generations have drained; older replicas cannot safely operate on their Redis state. + + +In-memory generation streams do not share state across replicas and use protocol v2 by default, so they do not require this cutover. + ### Key Benefits (for Horizontal Scaling) - **Cross-instance continuity**: Users can start a generation on one server and resume on another diff --git a/content/docs/features/access_control.mdx b/content/docs/features/access_control.mdx index 108ef1a5d..80e151fa0 100644 --- a/content/docs/features/access_control.mdx +++ b/content/docs/features/access_control.mdx @@ -159,14 +159,17 @@ The canonical capabilities include: | `read:users` / `manage:users` | View / modify user accounts | | `read:groups` / `manage:groups` | View / modify groups | | `read:roles` / `manage:roles` | View / modify custom roles | -| `read:configs` / `manage:configs` | View / modify system configuration | +| `read:configs` / `manage:configs` | View / modify all system configuration | +| `read:configs:
` / `manage:configs:
` | View / modify one top-level configuration section | | `assign:configs:{user\|group\|role}` | Assign config-override profiles to principals | | `read:usage` | View platform usage and telemetry | | `read:agents` / `manage:agents` | View / moderate every agent on the instance | | `read:prompts` / `manage:prompts` | View / moderate every prompt | | `manage:mcpservers` | Manage MCP servers globally | -Manage capabilities imply their corresponding read capability (e.g. holding `manage:users` automatically grants `read:users`). A `SystemRoles.ADMIN` user implicitly holds all capabilities; grants let you **delegate** a subset of admin powers to non-admin principals without making them full admins. +Manage capabilities imply their corresponding read capability (e.g. holding `manage:users` automatically grants `read:users`). This also applies to configuration sections: `manage:configs:endpoints` satisfies `read:configs:endpoints`. Users with only section-scoped config access receive admin configuration responses filtered to the sections they can read; users with no config-read grant receive `403`. + +A `SystemRoles.ADMIN` user implicitly holds all capabilities; grants let you **delegate** a subset of admin powers to non-admin principals without making them full admins. Access to the admin UI itself still requires `access:admin`. System grants are issued and revoked via the admin panel. diff --git a/content/docs/features/admin_panel.mdx b/content/docs/features/admin_panel.mdx index 9784d068d..d797120d4 100644 --- a/content/docs/features/admin_panel.mdx +++ b/content/docs/features/admin_panel.mdx @@ -211,6 +211,18 @@ This is the surface behind LibreChat's [DB-backed per-principal configuration ov - Let a "FinanceAdmins" role manage MCP servers while regular users can only use them - Scope stricter `interface` permissions to external-contractor groups +### Section-Scoped Delegation + +Configuration grants can be broad (`read:configs`, `manage:configs`) or limited to one top-level section (`read:configs:
`, `manage:configs:
`). A section-scoped reader receives a filtered configuration response containing only authorized sections instead of being denied the entire request. Section-level manage grants imply read access to the same section; broad manage access implies broad read access. + +Examples include `read:configs:interface`, `manage:configs:endpoints`, and `manage:configs:langfuse`. Delegated users still need `access:admin` to enter the admin surface. Operations that affect the base profile as a whole can continue to require broad configuration management even when field-level changes are section-scoped. + +### Stored Secrets + +When registered secret fields are written through the admin configuration API, LibreChat encrypts literal values at rest and returns only server-generated masked previews. This currently covers Langfuse, OCR, speech, web-search, Assistants, Azure Assistants, and each `endpoints.custom[].apiKey`. Omitting a secret during a later edit preserves the stored value. + +Supported environment references remain readable references for fields that allow them. Custom endpoint API keys also preserve `${ENV_VAR}` and `user_provided` values instead of encrypting them. Secret handling is registry-based: arbitrary values in generic maps such as custom headers or MCP configuration are not automatically encrypted, so continue to use environment references or the feature's dedicated credential mechanism there. + ## Related - [Access Control](/docs/features/access_control): the permission model the admin panel is built on diff --git a/content/docs/features/agents.mdx b/content/docs/features/agents.mdx index 06c88ef32..7b30a389c 100644 --- a/content/docs/features/agents.mdx +++ b/content/docs/features/agents.mdx @@ -159,6 +159,18 @@ This is especially useful when an agent has access to many MCP servers with doze **Note:** The `deferred_tools` capability is enabled by default. It can be toggled via the [`librechat.yaml` agents configuration](/docs/configuration/librechat_yaml/object_structure/agents#capabilities). +### Activity Groups + +Activity groups collapse each contiguous block of Agent reasoning and tool calls under a generated one-line header, making long runs easier to scan. Administrators enable them with `activityLabel` and can use a faster model, another configured endpoint, a custom prompt, and per-run limits. Header generation is a separate model call whose tokens and cost are recorded. See [Agent Activity Groups](/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings#agent-activity-groups). + +### Tool Intent Labels + +Tool intent labels replace generic live tool statuses with a short description written by the model for that specific call. Administrators must add the opt-in `tool_intents` [agent capability](/docs/configuration/librechat_yaml/object_structure/agents#capabilities). Native tools use labels automatically; in the Agent Builder, expand an MCP server and turn on **Intent label** for individual tools or the full server. + +For model specs, [`describeIntent`](/docs/configuration/librechat_yaml/object_structure/model_specs#describeintent) can enable every eligible tool or select resolved tool IDs. Intent fields add to the tool schema sent to the model, so selective enablement can reduce schema-token overhead. + +Intent labels do not apply to programmatic-only MCP tools because calls made inside sandbox code do not render individual tool cards. + ### Programmatic Tool Calling Programmatic Tool Calling (PTC) lets agents execute selected MCP tools from inside the [Code Interpreter](/docs/features/code_interpreter) sandbox instead of calling each tool directly from the model. The model receives a Code Interpreter-backed orchestration tool, writes sandboxed code that calls generated tool functions, and can use loops, conditionals, retries, and result processing before returning an answer. @@ -179,7 +191,7 @@ Background tool calls let an agent start a long-running eligible MCP or Code Int To use this feature, an administrator must add the opt-in `run_in_background` [agent capability](/docs/configuration/librechat_yaml/object_structure/agents#capabilities). Then configure the eligible tools in the Agent Builder: -- **Code Interpreter:** Enable Code Interpreter on the agent, open its settings in the Tools marketplace, and turn on **Background execution**. This makes code execution and shell commands eligible for background dispatch. +- **Code Interpreter:** Enable Code Interpreter on the agent. Code execution and shell commands become background-eligible by default; turn off **Background execution** in its tool settings to opt out. - **MCP:** Open an MCP server and mark individual tools, or the full server, as **Background**. These settings allow background execution but do not force it. The model decides per call whether to run an eligible tool in the background. @@ -192,7 +204,7 @@ Background task state is currently process-local. Results can be collected in a The **Ask User** tool lets an agent pause a run to request missing information, present choices, or confirm how to proceed. After the user answers, the same run resumes with the response. Add **Ask User** from the Tools marketplace; administrators can remove the default `ask_user_question` capability to hide it. -One Ask User call accepts a question up to 2,000 characters, optional supporting context up to 4,000 characters, and up to 12 choices. Choice labels are limited to 120 characters, choice values to 500 characters, and the submitted answer to 16,000 characters. +One Ask User call accepts a question up to 2,000 characters, optional supporting context up to 4,000 characters, and up to 12 choices. Choice labels are limited to 280 characters, choice values to 500 characters, and the submitted answer to 16,000 characters. Administrators can also require review before matching tool calls run. Depending on the tool, users can approve, reject, edit arguments, or respond directly. Paused runs are checkpointed so they can resume after the decision, including on another replica when the default MongoDB checkpointer is used. Tool approval is disabled by default; see [`toolApproval` and `checkpointer`](/docs/configuration/librechat_yaml/object_structure/agents#toolapproval). @@ -411,7 +423,7 @@ The original author and administrators always retain full control regardless of 3. Search for users, groups, or roles in the people picker and assign each a role 4. Optionally toggle **Public** to make the agent visible to everyone on the instance (requires the `SHARE_PUBLIC` feature permission) -Agent cards and landing views show the configured support contact. When no support contact is set, LibreChat falls back to the first resolvable owner so users still know whom to contact. +Agent cards and landing views show the configured support contact. When none is set, LibreChat can fall back to the first resolvable owner's display name, but does not expose the owner's email address unless it was configured explicitly as the support contact. For full details on principals, permission bits, and how ACLs compose with role-based feature permissions, see [Access Control](/docs/features/access_control). @@ -453,11 +465,15 @@ While an Agent is responding, you can send another message in either of two ways - **Steer** inserts the message into the current run at its next tool or agent step, so the agent can adjust its work before finishing. - **Queue** holds the message and sends it as a normal follow-up turn after the current response completes. -Under **Settings โ†’ Chat**, **While generating, Enter will** chooses the default action. The send-button menu can override that choice for an individual message. +**Interrupt & steer** stops generation at the next provider-safe boundary, keeps the partial response, inserts the message, and resumes the same assistant response. Use the dedicated composer control, choose it from the send-button menu, or press `Command/Ctrl + Shift + .`. The action falls back to ordinary steering when the deployment cannot interrupt the active provider stream. + +Under **Settings โ†’ Chat**, **While generating, Enter will** chooses the default action. The send-button menu can override that choice for an individual message, and **Steering interrupts generation** controls whether ordinary steering also requests an interrupt. Pending steers appear above the composer until the server inserts them into the run. Once acknowledged, their menu can reclaim the message for editing, convert it into a queued follow-up, or cancel it and restore its text and attachments to the composer. LibreChat avoids overwriting a newer draft; if the composer is no longer available, it preserves the reclaimed message in the queue instead. A failed steer remains available to retry, edit, queue, or remove. -Queued follow-ups can be sent immediately, converted into a steer while the run is still active, edited, or removed. Removing a queued message restores it to an empty composer when possible. One active run accepts up to 10 pending steers; each steer can include up to 10 files and is limited by [`STEER_MAX_LENGTH`](/docs/configuration/dotenv#agent-conversation-controls). +Queued follow-ups can be sent immediately, converted into a steer while the run is still active, escalated to **Interrupt & steer now**, edited, or removed. In-flight steers offer the same escalation when they are still waiting for a tool boundary. Removing a queued message restores it to an empty composer when possible. One active run accepts up to 10 pending steers; each steer can include up to 10 files and is limited by [`STEER_MAX_LENGTH`](/docs/configuration/dotenv#agent-conversation-controls). + +Redis-backed multi-replica deployments must complete the [generation protocol v2 rollout](/docs/configuration/redis#generation-protocol-rollout) before relying on interrupt and recovery behavior across replicas. ### Notes diff --git a/content/docs/features/code_interpreter.mdx b/content/docs/features/code_interpreter.mdx index c690c1c9b..14446a65e 100644 --- a/content/docs/features/code_interpreter.mdx +++ b/content/docs/features/code_interpreter.mdx @@ -56,7 +56,7 @@ The sandbox still does not receive general network access. Tool calls are broker Background execution lets an Agent dispatch long-running code or shell work, continue the conversation, and retrieve the result later through `check_background_task`. In LibreChat chat, when the work finishes, stdout and generated files appear on the original code call. Generated files are persisted for subsequent turns even if the Agent has not polled the task yet. -This feature is opt-in. Add `run_in_background` alongside `execute_code` in the [Agents endpoint capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities), enable Code Interpreter on the agent, then open its settings in the Tools marketplace and turn on **Background execution**. This makes code calls eligible for background dispatch; the model still decides per call whether to use it. +This feature is opt-in at the deployment level. Add `run_in_background` alongside `execute_code` in the [Agents endpoint capabilities](/docs/configuration/librechat_yaml/object_structure/agents#capabilities), then enable Code Interpreter on the agent. Code execution and shell calls become background-eligible automatically; turn off **Background execution** in the Code Interpreter tool settings when an agent should opt out. The model still decides per call whether to dispatch eligible work in the background. Background task state is process-local and does not survive an app restart or move between replicas. Background dispatch also does not extend the Code Interpreter service's execution limit; the deployment's normal server-side timeout still applies. diff --git a/content/docs/features/mcp.mdx b/content/docs/features/mcp.mdx index dc4ed8180..729cb227f 100644 --- a/content/docs/features/mcp.mdx +++ b/content/docs/features/mcp.mdx @@ -256,6 +256,8 @@ You can initialize or re-initialize MCP servers directly from the interface: