Commit graph

2438 commits

Author SHA1 Message Date
Kay Belardinelli
2e8d969e35
🔇 a11y: Silence Unnecessary Icons for Screen Readers (#5726)
* a11y: silence miscellaneous icons that should not be read by screen reader (#5723, #5724)

* 📝 chore: Update bug report template with additional guidance and version information

* 📝 chore: Update bug report template to guide users on using Discussions for general inquiries and setup help

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2025-02-09 10:53:43 -05:00
Ruben Talstra
1519afd4b9
🧹 chore: Enhance Issue Templates with Emoji Labels (#5754)
* updated the labels in the templates.

* fixed spacing in label in the templates.
2025-02-09 14:41:57 +01:00
Stefan Siegel
d786bf263c
📱 feat: improve mobile viewport behavior with interactive-widget meta (#5675)
fixed mobile viewport behavior when keyboard appears: content now resizes properly instead of scrolling, keeping the top area visible
2025-02-08 00:15:49 +01:00
Danny Avila
8b2ffa141e
🔍 a11y: MultiSearch Clear Input (#5718)
* add accessibility features to model search

* chore: linting

* fix: Improve accessibility by adding aria-label to MultiSearch input

* refactor: MultiSearch component as button

* refactor: Update MultiSearch component styles for improved theming

* refactor: Update MultiSearch component styles for improved visual consistency

---------

Co-authored-by: Derek Jackson <derek_jackson@harvard.edu>
Co-authored-by: derek jackson <63861027+derekjackson-das@users.noreply.github.com>
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
2025-02-07 09:38:18 -05:00
5026
18339ec7bb
🌍 i18n: "Balance" Localization For ZhTraditional (#5682) 2025-02-06 20:16:22 -05:00
Marco Beretta
70e410f38b
💬 fix: Temporary Chat PR's broken components and improved UI (#5705)
* 💬 fix: Temporary Chat PR's broken components and improved UI

* 💬 fix: bring back hover effect on AudioRecorder button

* style: adjust position of Mention component popover

* refactor: PromptsCommand typing and style position

* refactor: virtualize mention UI

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2025-02-06 20:15:38 -05:00
Danny Avila
63afb317c6
🚀 fix: Resolve Google Client Issues, CDN Screenshots, Update Models (#5703)
* 🤖 refactor: streamline model selection logic for title model in GoogleClient

* refactor: add options for empty object schemas in convertJsonSchemaToZod

* refactor: add utility function to check for empty object schemas in convertJsonSchemaToZod

* fix: Google MCP Tool errors, and remove Object Unescaping as Google fixed this

* fix: google safetySettings

* feat: add safety settings exclusion via GOOGLE_EXCLUDE_SAFETY_SETTINGS environment variable

* fix: rename environment variable for console JSON string length

* fix: disable portal for dropdown in ExportModal component

* fix: screenshot functionality to use image placeholder for remote images

* feat: add visionMode property to BaseClient and initialize in GoogleClient to fix resendFiles issue

* fix: enhance formatMessages to include image URLs in message content for Vertex AI

* fix: safety settings for titleChatCompletion

* fix: remove deprecated model assignment in GoogleClient and streamline title model retrieval

* fix: remove unused image preloading logic in ScreenshotContext

* chore: update default google models to latest models shared by vertex ai and gen ai

* refactor: enhance Google error messaging

* fix: update token values and model limits for Gemini models

* ci: fix model matching

* chore: bump version of librechat-data-provider to 0.7.699
2025-02-06 18:13:18 -05:00
Andrés Restrepo
33e60c379b
📜 feat: Configure JSON Log Truncation Size (#5215) 2025-02-06 13:36:25 -05:00
Ruben Talstra
ae7814a2b3
🔧 fix: Wrong import useGetStartupConfig (#5692)
* fixed build failed error

* chore: import order

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2025-02-06 13:30:15 -05:00
Yuichi Oneda
8c404ae056
💬 feat: Temporary Chats (#5493)
* feat: add expiredAt property to Conversation and Message models

Added `expiredAt` property to both Conversation and Message schemas.
Configured `expireAfterSeconds` index in MongoDB to automatically delete documents after a specified period.

* feat(data-provider): add isTemporary and expiredAt properties to support temporary chats

Added `isTemporary` property to TPayload and TSubmission for API calls for temporary chat.
Additionally, added `expiredAt` property to `tConversationSchema` to determine if a chat is temporary.

* feat: implement isTemporary state management

Add Recoil state for tracking temporary conversations, update event handlers to respect temporary chat status

* feat: add configuration to interfaceconfig to hide the temporary chat switch

* feat: add Temporary Chat UI with switch and modify related behaviors

- Added a Temporary Chat switch button at the end of dropdown lists in each model.
- Updated the form background color to black when Temporary Chat is enabled.
- Modified Navigation to exclude Temporary Chats from the chat list.

* fix: exclude Temporary Chats from search results

Updated the getConvosQueried query to ensure that Temporary Chats are not included in the search results.

* fix: hide bookmark button for Temporary Chats

Updated the UI to ensure that the bookmark button is not displayed when a chat is as Temporary Chat.

* chore: update isTemporary state management in ChatRoute

* chore: fix to pass the tests
2025-02-06 11:11:47 -05:00
Marco Beretta
5f9543f6fc
🛠️ fix: enhance UI/UX and address a11y issues in SetKeyDialog (#5672)
*  refactor: Improve UI consistency and accessibility in SetKeyDialog components

* 🎨 style: Add cursor pointer to Slider component for better UX

* 🐛 chore: Remove unnecessary console log from SetKeyDialog component
2025-02-05 16:35:07 -05:00
Marco Beretta
73fe0835cf
🎨 style: Prompt UI Refresh & A11Y Improvements (#5614)
* 🚀 feat: Add animated search input and improve filtering UI

* 🏄 refactor: Clean up category options and optimize event handlers in ChatGroupItem

* 🚀 refactor: 'Rename Prompt' option and enhance prompt filtering UI
Changed the useUpdatePromptGroup mutation in prompts.ts to replace the JSON.parse(JSON.stringify(...)) clones with structuredClone. This avoids errors when data contains non‑JSON values and improves data cloning reliability

* 🔧 refactor: Update Sharing Prompts UI; fix: Show info message only after updating switch status

* 🔧 refactor: Simplify condition checks and replace button with custom Button component in SharePrompt

* 🔧 refactor: Update DashGroupItem styles and improve accessibility with updated aria-label

* 🔧 refactor: Adjust layout styles in GroupSidePanel and enhance loading skeletons in List component

* 🔧 refactor: Improve layout and styling of AdvancedSwitch component; adjust DashBreadcrumb margin for better alignment

* 🔧 refactor: Add new surface colors for destructive actions and update localization strings for confirmation prompts

* 🔧 refactor: Update PromptForm and PromptName components for improved layout and styling; replace button with custom Button component

* 🔧 refactor: Enhance styling and layout of DashGroupItem, FilterPrompts, and Label components for improved user experience

* 🔧 refactor: Update DeleteBookmarkButton and Label components for improved layout and text handling

* 🔧 refactor: Simplify CategorySelector usage and update destructive surface colors for a11y

* 🔧 refactor: Update styling and layout of PromptName, SharePrompt, and DashGroupItem components; enhance Dropdown functionality with custom renderValue

* 🔧 refactor: Improve layout and styling of various components; update button sizes and localization strings for better accessibility and user experience

* 🔧 refactor: Add useCurrentPromptData hook and enhance RightPanel component; update CategorySelector for improved functionality and accessibility

* 🔧 refactor: Update input components and styling for Command and Description; enhance layout and accessibility in PromptVariables and PromptForm

* 🔧 refactor: Remove useCurrentPromptData hook and clean up related components; enhance PromptVersions layout

* 🔧 refactor: Enhance accessibility by adding aria-labels to buttons and inputs; improve localization for filter prompts

* 🔧 refactor: Enhance accessibility by adding aria-labels to various components; improve layout and styling in PromptForm and CategorySelector

* 🔧 refactor: Enhance accessibility by adding aria-labels to buttons and components; improve dialog roles and descriptions in SharePrompt and PromptForm

* 🔧 refactor: Improve accessibility by adding aria-labels and roles; enhance layout and styling in ChatGroupItem, ListCard, and ManagePrompts components

* 🔧 refactor: Update UI components for improved styling and accessibility; replace button elements with custom Button component and enhance layout in VariableForm, PromptDetails, and PromptVariables

* 🔧 refactor: Improve null checks for group and instanceProjectId in SharePrompt component; enhance readability and maintainability

* style: Enhance AnimatedSearchInput component with TypeScript types; improve conditional rendering for search states and accessibility

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2025-02-05 11:37:17 -05:00
heptapod
a44f5b4b6e
🌍 i18n: Fix "Balance" Localization For De (#5656) 2025-02-05 10:28:12 -05:00
RedwindA
40d9b1d2a2
🌍 i18n: Fix "Balance" Localization For Zh&ZhTraditional (#5632)
* Update translation of `balance` in Zh.ts

* Update translation of `balance` in ZhTraditional.ts
2025-02-05 15:58:23 +01:00
Danny Avila
6c33dc2eb3
🤖 refactor: Prevent Vertex AI from Setting Parameter Defaults (#5653)
* refactor: remove google defaults

* refactor: improve GoogleClient stream handling and metadata usage

* chore: update @librechat/agents to version 2.0.1

* fix: return client instance in GoogleClient configuration
2025-02-04 21:45:43 -05:00
Danny Avila
0312d4f4f4
🔧 refactor: Revamp Model and Tool Filtering Logic (#5637)
* 🔧 fix: Update regex to correctly match OpenAI model identifiers

* 🔧 fix: Enhance tool filtering logic in ToolService to handle inclusion and exclusion criteria for basic tools and toolkits

* feat: support o3-mini Azure streaming

* chore: Update model filtering logic to exclude audio and realtime models

* ci: linting error
2025-02-03 16:08:34 -05:00
Ruben Talstra
7c8a930061
feat: added Github Enterprise SSO login (#5621)
* https://github.com/danny-avila/LibreChat/issues/2812

* refactored the code to simplify it.

* removed unneeded code

* removed unneeded code
2025-02-03 15:30:02 -05:00
Ruben Talstra
93f5713c74
🛜 ci: OpenID Strategy Test Async Handling (#5613) 2025-02-03 10:57:49 -05:00
Igor
20aa0be85d
🌍 i18n: Add Missing "Balance" Localization For All Languages (#5594)
* Update AccountSettings.tsx

---------

Co-authored-by: Danny Avila <danacordially@gmail.com>
2025-02-03 10:56:44 -05:00
Sam Lewis
d7dc58dd23
🔧 fix: Fetch PWA Manifest with credentials over CORS (#5156)
When behind authentication (for eg: Cloudflare Access), browsers
won't send credentials when fetching the manifest file by default.

To fix, this change adds `crossorigin="use-credentials"` to the
manifest link tag by enabling the `useCredentials` option in
VitePWA.
2025-02-03 10:54:10 -05:00
Danny Avila
45dd2b262f
🛂 feat: OpenID Logout Redirect to end_session_endpoint (#5626)
* WIP: end session endpoint

* refactor: move useGetBannerQuery outside of package

* refactor: add queriesEnabled and move useGetEndpointsConfigQuery to data-provider (local)

* refactor: move useGetEndpointsQuery import to data-provider

* refactor: relocate useGetEndpointsQuery import to improve module organization

* refactor: move `useGetStartupConfig` from package to `~/data-provider`

* refactor: move useGetUserBalance to data-provider and update imports

* refactor: update query enabled conditions to include config check

* refactor: remove unused useConfigOverride import from useAppStartup

* refactor: integrate queriesEnabled state into file and search queries and move useGetSearchEnabledQuery to data-provider (local)

* refactor: move useGetUserQuery to data-provider and update imports

* refactor: enhance loginUser mutation with success and error handling as pass in options to hook

* refactor: update enabled condition in queries to handle undefined config

* refactor: enhance authentication mutations with queriesEnabled state management

* refactor: improve conditional rendering for error messages and feature flags in Login component

* refactor: remove unused queriesEnabled state from AuthContextProvider

* refactor: implement queriesEnabled state management in LoginLayout with timeout handling

* refactor: add conditional check for end session endpoint in OpenID strategy

* ci: fix tests after changes

* refactor: remove endSessionEndpoint from user schema and update logoutController to use OpenID issuer's end_session_endpoint

* refactor: update logoutController to use end_session_endpoint from issuer metadata
2025-02-03 10:53:04 -05:00
Danny Avila
d93f5c9061
☁️ feat: Additional AI Gateway Provider Support; fix: Reasoning Effort for Presets/Agents (#5600)
* 🐛 fix: Prevent processing of non-artifact nodes in artifact plugin

* refactor: remove deprecated fields, add `reasoning_effort`

* refactor: move `reasoning_effort` to the second column in OpenAI settings

* feat: add support for additional AI Gateway provider in extractBaseURL function

* refactor: move `reasoning_effort` field to conversationPreset and remove from agentOptions
2025-02-02 09:04:10 -05:00
Danny Avila
352565c9a6
🎥 feat: YouTube Tool (#5582)
* adding youtube tool

* refactor: use short `url` param instead of `videoUrl`

* refactor: move API key retrieval to a separate credentials module

* refactor: remove unnecessary `isEdited` message property

* refactor: remove unnecessary `isEdited` message property pt. 2

* refactor: YouTube Tool with new `tool()` generator, handle tools already created by new `tool` generator

* fix: only reset request data for multi-convo messages

* refactor: enhance YouTube tool by adding transcript parsing and returning structured JSON responses

* refactor: update transcript parsing to handle raw response and clean up text output

* feat: support toolkits and refactor YouTube tool as a toolkit for better LLM usage

* refactor: remove unused OpenAPI specs and streamline tools transformation in loadAsyncEndpoints

* refactor: implement manifestToolMap for better tool management and streamline authentication handling

* feat: support toolkits for assistants

* refactor: rename loadedTools to toolDefinitions for clarity in PluginController and assistant controllers

* feat: complete support of toolkits for assistants

---------

Co-authored-by: Danilo Pejakovic <danilo.pejakovic@leoninestudios.com>
2025-01-31 19:11:04 -05:00
Danny Avila
33f6093775
🤖 feat: o3-mini (#5581)
* 🤖 feat: `o3-mini`

* chore: re-order vision models list to prioritize gpt-4o as a vision model over o1
2025-01-31 16:49:01 -05:00
Danny Avila
fdf0b41d08
🐛 fix: Handle content generation errors in GoogleClient (#5575) 2025-01-31 11:22:15 -05:00
Danny Avila
6920e23fb2
🤖 fix: Azure Agents after Upstream Breaking Change (#5571)
* 🤖 fix: Azure Agents after Upstream Breaking Change

* chore: bump @langchain/core & @librechat/agents

* fix: correct formatting in assistant actions update logic and use correctly filtered actions variable

* fix: linting errors
2025-01-31 09:50:49 -05:00
Ruben Talstra
e1a6268904
🍎 feat: Apple auth (#5473)
* implemented Apple Auth login.

Closes: #3438

TODO:
- write config Doc

* removed some comments

* removed comment

* Add unit tests for Apple login strategy

Introduce comprehensive tests for the Apple login strategy, covering new user creation, existing user updates, and error handling scenarios during the authentication flow. Mocks implemented for external dependencies to ensure isolated testing.

* Remove unnecessary blank line in socialLogins.js
2025-01-31 09:49:09 -05:00
Marco Beretta
1c459ed3af
🖱️ feat: Switch Scroll Button setting (#5332) 2025-01-31 07:52:52 -05:00
owengo
8a0c7d92bd
👷 feat: Allow Admin to Edit Agent/Assistant Actions (#4591)
* feat: allows admin to see and edits all actions

* feat: allows admin to see and edits all actions

* rollback: admins can edit all actions, no configuration

* fix: admins don't override the user of existing actions and they preserve the user of the assistant when creating a new action

---------

Co-authored-by: Olivier Schiavo <olivier.schiavo@wengo.com>
2025-01-31 07:45:02 -05:00
JM Addington
9373f77bb7
feat: Add Scripts for listing users and resetting passwords (#5438)
*  feat: Add user management scripts for listing users and resetting passwords

* chore: update package.json

---------

Co-authored-by: Danny Avila <danacordially@gmail.com>
2025-01-31 07:40:06 -05:00
Fuegovic
6f0ded058f
📝 docs: Update librechat.example.yaml (#5544)
Enable modelSelect and Presets by default
2025-01-31 07:35:18 -05:00
Danny Avila
19fa4d9f54
🧹 chore: Remove Deprecated BingAI Code & Address Mobile Focus (#5565)
* chore: remove all bing code

* chore: remove bing code and auto-focus effects

* chore: add back escapeRegExp helper function for regex special character handling

* chore: remove deprecated fields from settings and conversation schema

* fix: ensure default endpoint is set correctly in conversation setup

* feat: add disableFocus option to newConversation for improved search behavior
2025-01-30 17:22:29 -05:00
James Lamine
1226f56d0c
🔧 fix: Add missing finish_reason to stream chunks (#5563) 2025-01-30 15:24:43 -05:00
James Lamine
85c6a706c3
🔧 fix: handle known OpenAI errors with empty intermediate reply (#5562) 2025-01-30 15:20:34 -05:00
Danny Avila
587d46a20b
🚀 feat: o1 Tool Calling & reasoning_effort (#5553)
* fix: Update @librechat/agents to version 1.9.98

* feat: o1 tool calling

* fix: Improve error logging in RouteErrorBoundary

* refactor: Move extractContent function to utils and clean up Artifact component

* refactor: optimize reasoning UI post-streaming and deprecate plugins rendering

* feat: reasoning_effort support

* fix: update request content type handling in openapiToFunction to remove default 'application/x-www-form-urlencoded'

* chore: bump v0.7.696 data-provider
2025-01-30 12:36:35 -05:00
Danny Avila
591a019766
🏄‍♂️ refactor: Optimize Reasoning UI & Token Streaming (#5546)
*  feat: Implement Show Thinking feature; refactor: testing thinking render optimizations

*  feat: Refactor Thinking component styles and enhance Markdown rendering

* chore: add back removed code, revert type changes

* chore: Add back resetCounter effect to Markdown component for improved code block indexing

* chore: bump @librechat/agents and google langchain packages

* WIP: reasoning type updates

* WIP: first pass, reasoning content blocks

* chore: revert code

* chore: bump @librechat/agents

* refactor: optimize reasoning tag handling

* style: ul indent padding

* feat: add Reasoning component to handle reasoning display

* feat: first pass, content reasoning part styling

* refactor: add content placeholder for endpoints using new stream handler

* refactor: only cache messages when requesting stream audio

* fix: circular dep.

* fix: add default param

* refactor: tts, only request after message stream, fix chrome autoplay

* style: update label for submitting state and add localization for 'Thinking...'

* fix: improve global audio pause logic and reset active run ID

* fix: handle artifact edge cases

* fix: remove unnecessary console log from artifact update test

* feat: add support for continued message handling with new streaming method

---------

Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
2025-01-29 19:46:58 -05:00
James Lamine
d60a149ad9
🗨️ fix: Loading Shared Saved Prompts (#5515) 2025-01-28 10:35:17 -05:00
Evren Tan
ad4cfba710
🌱 feat(.env.example): add o1 models (#5106)
* feat(.env.example): add o1-mini and o1-preview to .env.example

* feat(.env.example): add o1 to .env.example

---------

Co-authored-by: Evren Tan <evren.tan@pointr.tech>
2025-01-28 15:56:05 +01:00
Danny Avila
4110209494
♻️ fix: Prevent Instructions from Removal when nearing Max Context (#5516)
* refactor: getMessagesWithinTokenLimit to accept params object

* refactor: always include instructions in payload if provided

* ci: remove obsolete test

* refactor: update logoutUser to accept request object and handle session destruction

* test: enhance getMessagesWithinTokenLimit tests for instruction handling
2025-01-27 20:37:38 -05:00
Danny Avila
528ee62eb1
🤖 fix: GoogleClient Context Handling & GenAI Parameters (#5503)
* fix: remove legacy code for GoogleClient and fix model parameters for GenAI

* refactor: streamline client init logic

* refactor: remove legacy vertex clients, WIP remote vertex token count

* refactor: enhance GoogleClient with improved type definitions and streamline token count method

* refactor: remove unused methods and consolidate methods

* refactor: remove examples

* refactor: improve input handling logic in DynamicInput component

* refactor: enhance GoogleClient with token usage tracking and context handling improvements

* refactor: update GoogleClient to support 'learnlm' model and streamline model checks

* refactor: remove unused text model handling in GoogleClient

* refactor: record token usage for GoogleClient titles and handle edge cases

* chore: remove unused undici, addresses verbose version warning
2025-01-27 12:21:33 -05:00
oonishi3
47b72e8159
🉐 fix: incorrect handling for composing CJK texts in Safari (#5496) 2025-01-27 11:22:38 -05:00
Ruben Talstra
5f8fade7eb
🔧 chore: bump ``vite`` to patch CVE-2025-24010 (#5495)
Replaced an outdated Vite entry and corrected inconsistencies in dependencies.

Severity: moderate
Websites were able to send any requests to the development server and read the response in vite - https://github.com/advisories/GHSA-vg6x-rcgg-rjx6
2025-01-27 11:20:08 -05:00
Marco Beretta
e7de9c1576
🛡️ refactor: enhance email verification process (#5485) 2025-01-26 20:57:03 -05:00
Danny Avila
12a9a07eb0
🐛 fix: Update deletePromptController to include user role in query (#5488) 2025-01-26 19:03:12 -05:00
Danny Avila
8b31f255f5
🪙 fix: Deepseek Pricing 2025-01-25 10:13:46 -05:00
Danny Avila
60c846b679
🪙 fix: Deepseek Pricing & Titling (#5459) 2025-01-25 10:10:53 -05:00
Danny Avila
af430e46f4
feat: Add Google Parameters, Ollama/Openrouter Reasoning, & UI Optimizations (#5456)
* feat: Google Model Parameters

* fix: dynamic input number value, previously coerced by zod schema

* refactor: support openrouter reasoning tokens and XML for thinking directive to conform to ollama

* fix: virtualize combobox to prevent performance drop on re-renders of long model/agent/assistant lists

* refactor: simplify Fork component by removing unnecessary chat context index

* fix: prevent rendering of Thinking component when children are null

* refactor: update Markdown component to replace <think> tags and simplify remarkPlugins configuration

* refactor: reorder remarkPlugins to improve plugin configuration in Markdown component
2025-01-24 18:15:47 -05:00
Danny Avila
7818ae5c60
🐳 feat: Deepseek Reasoning UI (#5440) 2025-01-24 10:52:08 -05:00
Marco Beretta
b8b7f40e98
🌄 feat: Add RouteErrorBoundary for Improved Client Error handling (#5396)
* feat: Add RouteErrorBoundary for improved error handling and integrate react-error-boundary package

* feat: update error message

* fix: correct typo in containerClassName prop in Landing component
2025-01-24 08:34:44 -05:00
Danny Avila
ed57bb4711
🚀 feat: Artifact Editing & Downloads (#5428)
* refactor: expand container

* chore: bump @codesandbox/sandpack-react to latest

* WIP: first pass, show editor

* feat: implement ArtifactCodeEditor and ArtifactTabs components for enhanced artifact management

* refactor: fileKey

* refactor: auto scrolling code editor and add messageId to artifact

* feat: first pass, editing artifact

* feat: first pass, robust artifact replacement

* fix: robust artifact replacement & re-render when expected

* feat: Download Artifacts

* refactor: improve artifact editing UX

* fix: layout shift of new download button

* fix: enhance missing output checks and logging in StreamRunManager
2025-01-23 18:19:04 -05:00