* fix: filter dropdown now closable with escape, doesn't close whole modal
* refactor: simplify escapekeydown handler logic for tooltips and dropdown menus
* refactor: more specific conditions for preventDefault
* 🔧 refactor: Update MCP connection handling to improve performance and testing
* refactor: Replace getAll() with getLoaded() in MCP.js to prevent unnecessary connection creation for user-context servers.
* test: Adjust MCP.spec.js to mock getLoaded() instead of getAll() for consistency with the new implementation.
* feat: Enhance MCPServersInitializer to reset initialization flag for better handling of process restarts and stale data.
* test: Add integration tests to verify re-initialization behavior and ensure stale data is cleared when necessary.
* 🔧 refactor: Enhance cached endpoints config handling for GPT plugins
* refactor: Update MCPServersInitializer tests to use new server management methods
* refactor: Replace direct Redis server manipulation with registry.addServer and registry.getServerConfig for better abstraction and consistency.
* test: Adjust integration tests to verify server initialization and stale data handling using the updated methods.
* 🔧 refactor: Increase retry limits and delay for MCP server creation
* Updated MAX_CREATE_RETRIES from 3 to 5 to allow for more attempts during server creation.
* Increased RETRY_BASE_DELAY_MS from 10 to 25 milliseconds to provide a longer wait time between retries, improving stability in server initialization.
* refactor: Update MCPServersInitializer tests to utilize new registry methods
* refactor: Replace direct access to sharedAppServers with registry.getServerConfig for improved abstraction.
* test: Adjust tests to verify server initialization and stale data handling using the updated registry methods, ensuring consistency and clarity in the test structure.
* fix: cast translation keys for ESLint
* fix: sort by header withi keyboard nav now retains focus on press
* fix: focus retained on key press for sorts in archived chat table
* fix: cast translation keys for ESLint
* style: AgentCard and AgentGrid UI with improved layout and accessibility
- Updated AgentCard component to improve layout, including flexbox adjustments for better responsiveness and spacing.
- Added aria-label for agent description to enhance accessibility.
- Introduced a new translation key for agent description in the localization file.
- Modified AgentGrid to include horizontal margins for better alignment on various screen sizes.
* style: Update AgentCard description line clamp for improved readability
- Increased the line clamp for agent descriptions in the AgentCard component from 3 to 5 lines, enhancing the display of longer descriptions while maintaining a clean layout.
* feat: Integrate Agent Detail Dialog in AgentCard Component
- Enhanced the AgentCard component to include an OGDialog for displaying detailed agent information.
- Introduced AgentDetailContent to manage the content of the dialog, allowing users to view agent details and initiate chats directly from the card.
- Updated AgentGrid to utilize the new onSelect prop for agent selection, improving the interaction flow.
- Removed deprecated code related to agent detail handling in the Marketplace component for cleaner implementation.
* ci: Enhance AgentCard and Accessibility Tests with Improved Mocks and Keyboard Interaction
- Updated AgentCard tests to utilize the new onSelect prop for better interaction handling.
- Introduced comprehensive mocks for hooks and components to streamline testing and avoid testing internal implementations.
- Improved accessibility tests by ensuring keyboard interactions are properly handled and do not throw errors.
- Enhanced the overall structure of tests to support better readability and maintainability.
* refactor: Implement clearModelForNonEphemeralAgent utility for improved agent handling
- Introduced clearModelForNonEphemeralAgent function to manage model state for non-ephemeral agents across various components.
- Updated ModelSelectorContext to initialize model based on agent type.
- Enhanced useNavigateToConvo, useQueryParams, and useSelectMention hooks to clear model for non-ephemeral agents.
- Refactored buildDefaultConvo and endpoints utility to ensure proper handling of agent_id and model state.
- Improved overall conversation logic and state management for better performance and reliability.
* refactor: Enhance useNewConvo hook to improve agent conversation handling
- Added logic to skip access checks for existing agent conversations, utilizing localStorage to restore conversations after refresh.
- Improved handling of default endpoints for agents based on user access and existing conversation state, ensuring more reliable conversation initialization.
* refactor: Update ChatRoute and useAuthRedirect to include user roles
- Enhanced ChatRoute to utilize user roles for improved conversation state management.
- Modified useAuthRedirect to return user roles alongside authentication status, ensuring roles are available for conditional logic in ChatRoute.
- Adjusted conversation initialization logic to depend on the loaded roles, enhancing the reliability of the conversation setup.
* refactor: Update BaseClient to handle non-ephemeral agents in conversation logic
- Added a check for non-ephemeral agents in BaseClient, modifying the exceptions set to include 'model' when applicable.
- Enhanced conversation handling to improve flexibility based on agent type.
* test: Add mock for clearModelForNonEphemeralAgent in useQueryParams tests
- Introduced a mock for clearModelForNonEphemeralAgent to enhance testing of query parameters related to non-ephemeral agents.
- This addition supports improved test coverage and ensures proper handling of model state in relevant scenarios.
* refactor: Simplify mocks in useQueryParams tests for improved clarity
- Updated the mocking strategy for utilities in useQueryParams tests to use actual implementations where possible, while still suppressing test output for the logger.
- Enhanced the mock for tQueryParamsSchema to minimize complexity and avoid unnecessary validation during tests, improving test reliability and maintainability.
* refactor: Enhance agent identification logic in BaseClient for improved clarity
* chore: Import Constants in families.ts for enhanced functionality
* refactor: Update Frontend logger function to enhance logging conditions
- Modified the logger function to check for logger enablement and development environment more robustly.
- Adjusted the condition to ensure logging occurs only when the logger is enabled or when the environment variable for logger is not set in development mode.
* fix: Add key prop to MeasuredRow components in Conversations for improved rendering
- Updated MeasuredRow components to include a key prop for better performance and to prevent rendering issues during list updates.
- Ensured consistent handling of item types within the Conversations component.
* refactor: Enhance ScrollToBottom component with forwardRef for improved functionality
- Updated ScrollToBottom component to use forwardRef, allowing it to accept a ref for better integration with parent components.
- Modified MessagesView to utilize the new ref for the ScrollToBottom button, improving scrolling behavior and performance.
* refactor: Enhance EndpointItem and renderEndpoints for improved model render keys
- Updated EndpointItem to accept an endpointIndex prop for better indexing of endpoints.
- Modified renderEndpoints to pass the endpointIndex to EndpointItem, improving the rendering of endpoint models.
- Adjusted renderEndpointModels to utilize the endpointIndex for unique key generation, enhancing performance and preventing rendering issues.
* refactor: Update BaseClient to handle non-ephemeral agents in conversation logic
- Added a check for non-ephemeral agents in BaseClient, modifying the exceptions set to include 'model' when applicable.
- Enhanced conversation handling to improve flexibility based on agent type.
* refactor: Optimize FavoritesList component for agent handling and loading states
- Updated FavoritesList to improve agent ID management by introducing combinedAgentsMap for better handling of missing agents.
- Refactored loading state logic to ensure accurate representation of agent loading status.
- Enhanced the use of useQueries for fetching missing agent data, streamlining the overall data retrieval process.
- Improved memoization of agent IDs and loading conditions for better performance and reliability.
* Revert "refactor: Update BaseClient to handle non-ephemeral agents in conversation logic"
This reverts commit 6738acbe04.
* refactor: Reuse conversation switching logic from useSelectMention hook for Favorite Items
- Added onSelectEndpoint prop to FavoriteItem for improved endpoint selection handling.
- Refactored conversation initiation logic to utilize the new prop instead of direct navigation.
- Updated FavoritesList to pass onSelectEndpoint to FavoriteItem, streamlining the interaction flow.
- Replaced EndpointIcon with MinimalIcon for a cleaner UI representation of favorite models.
* refactor: Enhance FavoriteItem and FavoritesList for improved accessibility and interaction
- Added onRemoveFocus prop to FavoriteItem for better focus management after item removal.
- Refactored event handling in FavoriteItem to support keyboard interactions for accessibility.
- Updated FavoritesList to utilize the new onRemoveFocus prop, ensuring focus shifts appropriately after removing favorites.
- Enhanced aria-labels and roles for better screen reader support and user experience.
* refactor: Enhance EndpointModelItem for improved accessibility and interaction
- Added useRef and useState hooks to manage active state and focus behavior.
- Implemented MutationObserver to track changes in the data-active-item attribute for better accessibility.
- Refactored favorite button handling to improve interaction and accessibility.
- Updated button tabIndex based on active state to enhance keyboard navigation.
* chore: Update Radix UI dependencies in package-lock and package.json files
- Upgraded @radix-ui/react-alert-dialog and @radix-ui/react-dialog to version 1.1.15 across client and packages/client.
- Updated related dependencies for improved compatibility and performance.
- Removed outdated debug module references from package-lock.json.
* refactor: Improve accessibility and interaction in conversation options
- Added event handling to prevent unintended actions when renaming conversations.
- Updated ConvoOptions to use Ariakit components for better accessibility and interaction.
- Refactored button handlers for sharing and deleting conversations for clarity and consistency.
- Enhanced dialog components with proper aria attributes and improved structure for better screen reader support.
* refactor: Improve nested dialog accessibility for deleting shared link
- Eliminated the setShareDialogOpen prop from both ShareButton and SharedLinkButton components to streamline the code.
- Updated the delete mutation success handler in SharedLinkButton to improve focus management for accessibility.
- Enhanced the OGDialog component in SharedLinkButton with a triggerRef for better interaction.
- Updated endpoint retrieval logic in `helpers.js` and `v1.js` to use optional chaining for safer access to request body and query parameters, enhancing code robustness.
* fix: create new flows on invalid_grant errors
* chore: fix failing test
* chore: keep isOAuthError test function in sync with implementation
* test: add tests for OAuth error detection on invalid grant errors
* test: add tests for creating new flows when token expires
* test: add test for flow clean up prior to creation
* refactor: consolidate token expiration handling in FlowStateManager
- Removed the old token expiration checks and replaced them with a new method, `isTokenExpired`, to streamline the logic.
- Introduced `normalizeExpirationTimestamp` to handle timestamp normalization for both seconds and milliseconds.
- Updated tests to ensure proper functionality of flow management with token expiration scenarios.
* fix: conditionally setup cleanup handlers in FlowStateManager
- Updated the FlowStateManager constructor to only call setupCleanupHandlers if the ci parameter is not set, improving flexibility in flow management.
* chore: enhance OAuth token refresh logging
- Introduced a new method, `processRefreshResponse`, to streamline the processing of token refresh responses from the OAuth server.
- Improved logging to provide detailed information about token refresh operations, including whether new tokens were received and if the refresh token was rotated.
- Updated existing token handling logic to utilize the new method, ensuring consistency and clarity in token management.
* chore: enhance logging for MCP server reinitialization
- Updated the logging in the reinitMCPServer function to provide more detailed information about the response, including success status, OAuth requirements, presence of the OAuth URL, and the count of tools involved. This improves the clarity and usefulness of logs for debugging purposes.
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🚏 feat: Rate Limit Error handling in MCPConnection
* chore: Added detailed logging for rate limit scenarios to improve debugging.
- Updated comments to clarify the behavior during rate limiting and reconnection attempts.
- Ensured that the connection state is properly managed when encountering rate limit errors.
* fix: Enhance error handling for rate limiting in MCPConnection
- Updated comments to clarify the rationale for throwing errors in the connectClient() method during rate limit scenarios.
- Ensured consistency in error handling between public API and internal methods.
Message aria labels were using the format `message-{depth}-{id}`, which
reads out in a very unfriendly way to a screen reader (e.g.
"message-3-65a38d32-4d6e-42c7-b67b-9ee62f8cedb1").
I standardized all the labeling in one place (`getMessageAriaLabel()`).
They now read out "Message 1", "Message 2", and so on.
* 💻 feat: deeper MCP UI integration in the chat UI using plugins
---------
Co-authored-by: Samuel Path <samuel.path@shopify.com>
Co-authored-by: Pierre-Luc Godin <pierreluc.godin@shopify.com>
* 💻 refactor: Migrate MCP UI resources from index-based to ID-based referencing
- Replace index-based resource markers with stable resource IDs
- Update plugin to parse \ui{resourceId} format instead of \ui0
- Refactor components to use useMessagesOperations instead of useSubmitMessage
- Add ShareMessagesProvider for UI resources in share view
- Add useConversationUIResources hook for cross-turn resource lookups
- Update parsers to generate resource IDs from content hashes
- Update all tests to use resource IDs instead of indices
- Add sandbox permissions for iframe popups
- Remove deprecated MCP tool context instructions
---------
Co-authored-by: Pierre-Luc Godin <pierreluc.godin@shopify.com>
* 🔱 fix: Fork Menu Accessibility Improvements (#10910)
* feat: more accessible aria-label for fork button
* fix: alignment between text and checkbox
* feat: add text change on focus for parity with on hover for keyboard accessibility
* 🤔 fix: Programmatic Expansion State for Thinking Button (#10912)
* 🙋♂️ feat: Accessible Default User Icon Colors (#10909)
* fix: downshift values for all non-compliant default bg-colors for user icons to achieve 4.5:1 contrast threshold minimums with text
* 🚪 feat: Open Sidebar Label Accessibility (#10893)
* feat: more accessible labelling on open / close sidebar
* feat: show column sort direction in all headers for my files datatable
* fix: refactor SortFilterHeader to use DropdownPopup so that keyboard nav and portaling actually work
* feat: visually indicate when a column filter is active
* chore: remove debug visuals
* chore: fix types and import order
* chore: add missing subItems prop to MenuItemProps interface
* feat: add arrow indicator for name column
* fix: page counter no longer shows 1/0 when no results
* feat: keep my files datatable size consistent to avoid issues with sizing of dropdown filter menus which made it difficult to see options
* fix: refactor filter cols button in my files datatable to use ariakit dropdown so keyboard nav works
* feat: better datatable column spacing following tanstack docs
* chore: ESlint complaints
* fix: localize string literals
* fix: move localize hook call inside the function components
* feat: add tooltip label for select all
* feat: better styling on floating label for file filter input
* feat: focus outline on search input
* feat: add search icon
* feat: add aria-sort props to header sort buttons
* feat: better screen reader labels to include information visually conveyed by filter and sort icons
* feat: add descriptive tooltips for headers for better accessibility for cognitive impairments
* chore: import orders
* feat: add more aria states for better feedback of filtered and sorted columns
* chore: add translation key
* chore: Remove @rollup/plugin-terser from package.json and rollup.config.js
* 🔧 chore: Revert Shared Links / Data-Table Changes from #9698
- Added sorting functionality for title and creation date in the Shared Links table.
- Implemented debounced search filtering for improved performance.
- Updated DataTable integration to support new features and improved user experience.
- Refactored delete handling to support bulk deletion of shared links.
- Adjusted dialog components for better accessibility and user feedback.
* 🗑️ chore: Remove unused translation keys from English locale
- Deleted keys related to managing archived chats, deleting archived chats, and opening conversations to streamline the translation file.
* fix: pad cards so focus outline doesn't clip in prompts list
* feat: pad snippet top for space between text and button
* fix: prompt menu focus outline clipping with overflow-visible
* fix: clipping in AgentBuilder for advanced and admin buttons
* fix: clipping in memory panel for admin settings
* fix: better contrast thresholds on focus outlines for admin settings and advanced buttons in agent builder
* fix: better contrast thresholds on focus outlines for admin settings button in memory panel
* fix: clipping on focus outline for manage files button in files panel
* fix: focus outline clipping table cells for files panel table
* fix: clipping on new bookmark button in bookmarks panel
* fix: clipping on Admin Settings button in MCP Settings panel
* fix: better contrast threshold outline and aria-label for Admin Settings button in MCP Settings panel
* fix: misaligned globe because of new unnested menu button positioning
* fix: localize global group aria-label
* fix: screen reader not reading out proper prompt name for dropdown menu button
* 🎨 feat: Enhance Import Conversations UI with loading state and new localization key
* fix: Correct pluralization in selected items message in translation.json
* Refactor Chat Input File Table Headers to Use SortFilterHeader Component
- Replaced button-based sorting headers in the Chat Input Files Table with a new SortFilterHeader component for better code organization and consistency.
- Updated the header for filename, updatedAt, and bytes columns to utilize the new component.
Enhance Navigation Component with Skeleton Loading States
- Added Skeleton loading states to the Nav component for better user experience during data fetching.
- Updated Suspense fallbacks for AgentMarketplaceButton and BookmarkNav components to display Skeletons.
Refactor Avatar Component for Improved UI
- Enhanced the Avatar component by adding a Label for drag-and-drop functionality.
- Improved styling and structure for the file upload area.
Update Shared Links Component for Better Error Handling and Sorting
- Improved error handling in the Shared Links component for fetching next pages and deleting shared links.
- Simplified the header rendering for sorting columns and added sorting functionality to the title and createdAt columns.
Refactor Archived Chats Component
- Merged ArchivedChats and ArchivedChatsTable components into a single ArchivedChats component for better maintainability.
- Implemented sorting and searching functionality with debouncing for improved performance.
- Enhanced the UI with better loading states and error handling.
Update DataTable Component for Sorting Icons
- Added sorting icons (ChevronUp, ChevronDown, ChevronsUpDown) to the DataTable headers for better visual feedback on sorting state.
Localization Updates
- Updated translation.json to fix missing translations and improve existing ones for better user experience.
* ✨ feat: Update DataTable component to streamline props and enhance sorting icons
* fix: TS issues
* feat: polish and redefine DataTable + shared links and archived chats
* feat: enhance DataTable with column pinning and improve sorting functionality
* feat: enhance deepEqual function for array support and improve column style stability
* refactor: DataTable and ArchivedChats; fix: sorting ArchivedChats API
* feat(DataTable): Implement new DataTable component with hooks and optimized features
- Added DataTable component with support for virtual scrolling, row selection, and customizable columns.
- Introduced hooks for debouncing search input, managing row selection, and calculating column styles.
- Enhanced accessibility with keyboard navigation and selection checkboxes.
- Implemented skeleton loading state for better user experience during data fetching.
- Added DataTableSearch component for filtering data with debounced input.
- Created utility logger for improved debugging in development.
- Updated translations to support new UI elements and actions.
* refactor: update SharedLinks and ArchivedChats to use desktopOnly instead of hideOnMobile; remove unused DataTableColumnHeader component
* fix: ensure desktopOnly columns are hidden on mobile in DataTable
* refactor: reorganize imports in DataTable components and update index exports
* refactor: improve styling and animations in Artifacts, ArtifactsSubMenu, and MCPSubMenu components; update border-radius in style.css
* refactor(Artifacts): enhance button toggle functionality and manage expanded state with useEffect
* refactor: comment out desktopOnly property in SharedLinks and ArchivedChats components; update translation.json with new keys for link actions
* refactor(DataTable): streamline column visibility logic and enhance type definitions; improve cleanup timers and optimize rendering
* refactor(DataTable): enhance type definitions for processed data rows and update custom actions renderer type
* refactor(DataTable): optimize processed data handling and improve warning for missing IDs; streamline DataTableComponents imports
* refactor(DataTable): enhance accessibility features and improve localization for selection and loading states
* refactor: improve padding in dialog content and enhance row selection functionality in ArchivedChats and DataTable components
* refactor(DataTable): remove unnecessary role and tabindex attributes from select all button for improved accessibility
* refactor(translation): remove outdated error messages and unused UI strings for cleaner localization
* refactor(DataTable): enhance virtualization and scrolling performance with dynamic overscan adjustments
* refactor(DataTableErrorBoundary): enhance error handling and localization support
* refactor(DataTable): improve column sizing and visibility handling; remove deprecated features
* refactor: enhance UI components with improved class handling and state management
* refactor(DataTable): improve column width handling and responsiveness; disable row selection
* refactor(DataTable): enhance accessibility with row header support and improve column visibility handling
* chore(DataTable): comments update
* refactor(Table): add unwrapped prop for direct table rendering; adjust minWidth calculation for responsiveness
* refactor(DataTable): simplify search handling by removing unnecessary trimming; adjust column width handling for better responsiveness
* refactor(translation): remove redundant drag and drop UI text for clarity
* refactor(parsers): change uiResources to a constant and streamline artifacts handling
* chore: remove unused file, bump @librechat/client to 0.3.2; fix(SharedLinks): missing import;
* refactor: change button variant from destructive to ghost for delete actions in SharedLinks and ArchivedChats components
* refactor(DataTable): simplify aria-sort assignment for better readability
* refactor(DataTable): update aria-label and ariaLabel to use indexed placeholder for localization
* refactor(translation): update no data messages for consistency
* Refactor code structure for improved readability and maintainability
* chore: restore linting fixes
* chore: restore linting fixes 2; refactor: remove unused translation keys
* feat(tests): add unit tests for DataTable components and error handling
- Implement tests for SelectionCheckbox and SkeletonRows components in DataTable.
- Add tests for DataTableErrorBoundary to ensure proper error handling and UI rendering.
- Create tests for DataTableSearch to validate search functionality and accessibility.
- Update DialogTemplate tests to reflect hardcoded cancel text.
- Remove redundant IntersectionObserver mock in SplitText tests.
- Unmock react-i18next in Translation tests to validate actual i18n functionality.
* refactor: Remove jest-environment-jsdom dependency from package.json; fix: reset package-lock
* chore: revert lint fixes
* chore: clean up package.json by removing unused devDependencies and redundant test scripts
* chore: update package dependencies in package.json and package-lock.json
- Added new devDependencies: @babel/core, @babel/preset-env, @babel/preset-react, @babel/preset-typescript, @tanstack/react-table, @tanstack/react-virtual, @testing-library/jest-dom, identity-obj-proxy, jest, jest-environment-jsdom, and lucide-react.
- Updated existing devDependencies to their latest versions.
- Added new module @asamuzakjp/css-color to package-lock.json with its dependencies.
- Updated version of @babel/plugin-transform-destructuring and added @babel/plugin-transform-explicit-resource-management in package-lock.json.
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* chore: Bump @modelcontextprotocol/sdk to version 1.24.3
* refactor: Update resource handling in MCP parsers and types
- Simplified resource text checks in `parseAsString` and `formatToolContent` functions to ensure proper existence checks.
- Removed unnecessary resource name and description handling to streamline output.
- Updated type definitions in `index.ts` to align with the new structure from `@modelcontextprotocol/sdk`, enhancing type safety and clarity.
- Added `logo_uri` and `tos_uri` properties to `MCPOAuthHandler` for improved OAuth metadata support.
* refactor: Update custom endpoint configurations and type definitions
- Removed unused type imports and streamlined the custom parameters handling in `loadCustomEndpointsConfig`.
- Adjusted the `TCustomEndpointsConfig` type to utilize `TConfig` instead of `TEndpoint`, enhancing type accuracy.
- Made the endpoint schema optional in the configuration to improve flexibility.
* fix: Implement token cleanup and error handling for invalid OAuth tokens
- Added `cleanupInvalidTokens` method to remove invalid OAuth tokens from storage when detected.
- Introduced `isInvalidTokenError` method to identify errors indicating revoked or expired tokens.
- Integrated token cleanup logic into the connection attempt process to ensure fresh OAuth flow on invalid token detection.
* feat: Add revoke OAuth functionality in Server Initialization
- Introduced a new button to revoke OAuth for servers, enhancing user control over OAuth permissions.
- Updated the `useMCPServerManager` hook to include a standalone `revokeOAuthForServer` function for managing OAuth revocation.
- Adjusted the UI to conditionally render the revoke button based on server requirements.
* fix: error handling for authentication in MCPConnection
- Updated the error handling logic in MCPConnection to better identify various authentication error indicators, including 401 status, invalid tokens, and unauthorized messages.
- Removed the deprecated cleanupInvalidTokens method and integrated its logic into the connection attempt process for improved clarity and efficiency.
- Adjusted the MCPConnectionFactory to streamline the connection attempt process and handle OAuth errors more effectively.
* refactor: Update button rendering in ServerInitializationSection
- Removed the existing button for server initialization and replaced it with a new button implementation, maintaining the same functionality.
- Ensured consistent rendering of the button within the component's layout.
* chore: update resource type usage in parsers.test.ts
* fix(nav): handle search disabled/error states to stop skeleton loading
* fix(ui): correct chevron direction for chats expand/collapse toggle
* feat(Conversations): Introduce MeasuredRow and ChatsHeader components for improved rendering and layout
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* Feature: Dynamic MCP Server with Full UI Management
* 🚦 feat: Add MCP Connection Status icons to MCPBuilder panel (#10805)
* feature: Add MCP server connection status icons to MCPBuilder panel
* refactor: Simplify MCPConfigDialog rendering in MCPBuilderPanel
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: address code review feedback for MCP server management
- Fix OAuth secret preservation to avoid mutating input parameter
by creating a merged config copy in ServerConfigsDB.update()
- Improve error handling in getResourcePermissionsMap to propagate
critical errors instead of silently returning empty Map
- Extract duplicated MCP server filter logic by exposing selectableServers
from useMCPServerManager hook and using it in MCPSelect component
* test: Update PermissionService tests to throw errors on invalid resource types
- Changed the test for handling invalid resource types to ensure it throws an error instead of returning an empty permissions map.
- Updated the expectation to check for the specific error message when an invalid resource type is provided.
* feat: Implement retry logic for MCP server creation to handle race conditions
- Enhanced the createMCPServer method to include retry logic with exponential backoff for handling duplicate key errors during concurrent server creation.
- Updated tests to verify that all concurrent requests succeed and that unique server names are generated.
- Added a helper function to identify MongoDB duplicate key errors, improving error handling during server creation.
* refactor: StatusIcon to use CircleCheck for connected status
- Replaced the PlugZap icon with CircleCheck in the ConnectedStatusIcon component to better represent the connected state.
- Ensured consistent icon usage across the component for improved visual clarity.
* test: Update AccessControlService tests to throw errors on invalid resource types
- Modified the test for invalid resource types to ensure it throws an error with a specific message instead of returning an empty permissions map.
- This change enhances error handling and improves test coverage for the AccessControlService.
* fix: Update error message for missing server name in MCP server retrieval
- Changed the error message returned when the server name is not provided from 'MCP ID is required' to 'Server name is required' for better clarity and accuracy in the API response.
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🪦 refactor: Remove Legacy Code (#10533)
* 🗑️ chore: Remove unused Legacy Provider clients and related helpers
* Deleted OpenAIClient and GoogleClient files along with their associated tests.
* Removed references to these clients in the clients index file.
* Cleaned up typedefs by removing the OpenAISpecClient export.
* Updated chat controllers to use the OpenAI SDK directly instead of the removed client classes.
* chore/remove-openapi-specs
* 🗑️ chore: Remove unused mergeSort and misc utility functions
* Deleted mergeSort.js and misc.js files as they are no longer needed.
* Removed references to cleanUpPrimaryKeyValue in messages.js and adjusted related logic.
* Updated mongoMeili.ts to eliminate local implementations of removed functions.
* chore: remove legacy endpoints
* chore: remove all plugins endpoint related code
* chore: remove unused prompt handling code and clean up imports
* Deleted handleInputs.js and instructions.js files as they are no longer needed.
* Removed references to these files in the prompts index.js.
* Updated docker-compose.yml to simplify reverse proxy configuration.
* chore: remove unused LightningIcon import from Icons.tsx
* chore: clean up translation.json by removing deprecated and unused keys
* chore: update Jest configuration and remove unused mock file
* Simplified the setupFiles array in jest.config.js by removing the fetchEventSource mock.
* Deleted the fetchEventSource.js mock file as it is no longer needed.
* fix: simplify endpoint type check in Landing and ConversationStarters components
* Updated the endpoint type check to use strict equality for better clarity and performance.
* Ensured consistency in the handling of the azureOpenAI endpoint across both components.
* chore: remove unused dependencies from package.json and package-lock.json
* chore: remove legacy EditController, associated routes and imports
* chore: update banResponse logic to refine request handling for banned users
* chore: remove unused validateEndpoint middleware and its references
* chore: remove unused 'res' parameter from initializeClient in multiple endpoint files
* chore: remove unused 'isSmallScreen' prop from BookmarkNav and NewChat components; clean up imports in ArchivedChatsTable and useSetIndexOptions hooks; enhance localization in PromptVersions
* chore: remove unused import of Constants and TMessage from MobileNav; retain only necessary QueryKeys import
* chore: remove unused TResPlugin type and related references; clean up imports in types and schemas
* 📦 chore: Bump Express.js to v5 (#10671)
* chore: update express to version 5.1.0 in package.json
* chore: update express-rate-limit to version 8.2.1 in package.json and package-lock.json
* fix: Enhance server startup error handling in experimental and index files
* Added error handling for server startup in both experimental.js and index.js to log errors and exit the process if the server fails to start.
* Updated comments in openidStrategy.js to clarify the purpose of the CustomOpenIDStrategy class and its relation to Express version changes.
* chore: Implement rate limiting for all POST routes excluding /speech, required for express v5
* Added middleware to apply IP and user rate limiters to all POST requests, ensuring that the /speech route remains unaffected.
* Enhanced code clarity with comments explaining the new rate limiting logic.
* chore: Enable writable req.query for mongoSanitize compatibility in Express 5
* chore: Ensure req.body exists in multiple middleware and route files for Express 5 compatibility
* 🪨 feat: Add PROXY support for AWS Bedrock endpoints (#8871)
* feat: added PROXY support for AWS Bedrock endpoint
* chore: explicit install of new packages required for bedrock proxy
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: add shift key tracking and instant delete functionality in conversation options
* refactor(Convo): simplify classname logic
* fix: restore package-lock after rebase
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
Co-authored-by: Arthur Barrett <abarrett@fas.harvard.edu>
* 🪦 refactor: Remove Legacy Code (#10533)
* 🗑️ chore: Remove unused Legacy Provider clients and related helpers
* Deleted OpenAIClient and GoogleClient files along with their associated tests.
* Removed references to these clients in the clients index file.
* Cleaned up typedefs by removing the OpenAISpecClient export.
* Updated chat controllers to use the OpenAI SDK directly instead of the removed client classes.
* chore/remove-openapi-specs
* 🗑️ chore: Remove unused mergeSort and misc utility functions
* Deleted mergeSort.js and misc.js files as they are no longer needed.
* Removed references to cleanUpPrimaryKeyValue in messages.js and adjusted related logic.
* Updated mongoMeili.ts to eliminate local implementations of removed functions.
* chore: remove legacy endpoints
* chore: remove all plugins endpoint related code
* chore: remove unused prompt handling code and clean up imports
* Deleted handleInputs.js and instructions.js files as they are no longer needed.
* Removed references to these files in the prompts index.js.
* Updated docker-compose.yml to simplify reverse proxy configuration.
* chore: remove unused LightningIcon import from Icons.tsx
* chore: clean up translation.json by removing deprecated and unused keys
* chore: update Jest configuration and remove unused mock file
* Simplified the setupFiles array in jest.config.js by removing the fetchEventSource mock.
* Deleted the fetchEventSource.js mock file as it is no longer needed.
* fix: simplify endpoint type check in Landing and ConversationStarters components
* Updated the endpoint type check to use strict equality for better clarity and performance.
* Ensured consistency in the handling of the azureOpenAI endpoint across both components.
* chore: remove unused dependencies from package.json and package-lock.json
* chore: remove legacy EditController, associated routes and imports
* chore: update banResponse logic to refine request handling for banned users
* chore: remove unused validateEndpoint middleware and its references
* chore: remove unused 'res' parameter from initializeClient in multiple endpoint files
* chore: remove unused 'isSmallScreen' prop from BookmarkNav and NewChat components; clean up imports in ArchivedChatsTable and useSetIndexOptions hooks; enhance localization in PromptVersions
* chore: remove unused import of Constants and TMessage from MobileNav; retain only necessary QueryKeys import
* chore: remove unused TResPlugin type and related references; clean up imports in types and schemas
* 🪦 refactor: Remove Legacy Code (#10533)
* 🗑️ chore: Remove unused Legacy Provider clients and related helpers
* Deleted OpenAIClient and GoogleClient files along with their associated tests.
* Removed references to these clients in the clients index file.
* Cleaned up typedefs by removing the OpenAISpecClient export.
* Updated chat controllers to use the OpenAI SDK directly instead of the removed client classes.
* chore/remove-openapi-specs
* 🗑️ chore: Remove unused mergeSort and misc utility functions
* Deleted mergeSort.js and misc.js files as they are no longer needed.
* Removed references to cleanUpPrimaryKeyValue in messages.js and adjusted related logic.
* Updated mongoMeili.ts to eliminate local implementations of removed functions.
* chore: remove legacy endpoints
* chore: remove all plugins endpoint related code
* chore: remove unused prompt handling code and clean up imports
* Deleted handleInputs.js and instructions.js files as they are no longer needed.
* Removed references to these files in the prompts index.js.
* Updated docker-compose.yml to simplify reverse proxy configuration.
* chore: remove unused LightningIcon import from Icons.tsx
* chore: clean up translation.json by removing deprecated and unused keys
* chore: update Jest configuration and remove unused mock file
* Simplified the setupFiles array in jest.config.js by removing the fetchEventSource mock.
* Deleted the fetchEventSource.js mock file as it is no longer needed.
* fix: simplify endpoint type check in Landing and ConversationStarters components
* Updated the endpoint type check to use strict equality for better clarity and performance.
* Ensured consistency in the handling of the azureOpenAI endpoint across both components.
* chore: remove unused dependencies from package.json and package-lock.json
* chore: remove legacy EditController, associated routes and imports
* chore: update banResponse logic to refine request handling for banned users
* chore: remove unused validateEndpoint middleware and its references
* chore: remove unused 'res' parameter from initializeClient in multiple endpoint files
* chore: remove unused 'isSmallScreen' prop from BookmarkNav and NewChat components; clean up imports in ArchivedChatsTable and useSetIndexOptions hooks; enhance localization in PromptVersions
* chore: remove unused import of Constants and TMessage from MobileNav; retain only necessary QueryKeys import
* chore: remove unused TResPlugin type and related references; clean up imports in types and schemas
* 📦 chore: Bump Express.js to v5 (#10671)
* chore: update express to version 5.1.0 in package.json
* chore: update express-rate-limit to version 8.2.1 in package.json and package-lock.json
* fix: Enhance server startup error handling in experimental and index files
* Added error handling for server startup in both experimental.js and index.js to log errors and exit the process if the server fails to start.
* Updated comments in openidStrategy.js to clarify the purpose of the CustomOpenIDStrategy class and its relation to Express version changes.
* chore: Implement rate limiting for all POST routes excluding /speech, required for express v5
* Added middleware to apply IP and user rate limiters to all POST requests, ensuring that the /speech route remains unaffected.
* Enhanced code clarity with comments explaining the new rate limiting logic.
* chore: Enable writable req.query for mongoSanitize compatibility in Express 5
* chore: Ensure req.body exists in multiple middleware and route files for Express 5 compatibility
* 🗣 feat: MCP Status Accessibility Improvements (#10738)
* feat: make MultiSelect highlight same opacity as other focus highlights in app
* feat: add better screenreader announcements for mcp server and variable states
* feat: memoize fullTitle calculation
* 🪨 feat: Add PROXY support for AWS Bedrock endpoints (#8871)
* feat: added PROXY support for AWS Bedrock endpoint
* chore: explicit install of new packages required for bedrock proxy
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* ✨ feat: Implement Favorites functionality with controllers, hooks, and UI components
* ✨ feat: Refactor Favorites functionality to support new data structure and enhance UI interactions
* ✨ feat: Add endpoint to new conversation for agent favorites
* ✨ feat: Enhance Conversations and Favorites components with expanded functionality and improved UI interactions
* ✨ feat: Remove 'Pinned' label from UI translations for cleaner interface
* feat: clean up comments and improve code readability in favorites and agent components; bump @librechat/data-schemas to 0.0.24
* ✨ feat: Enhance favorites management with validation, update data structure, and improve UI interactions
* ✨ feat: Simplify rendering logic in EndpointModelItem and optimize useEffect dependencies in Conversations component
* ✨ test: Update favorites mock implementation and improve button focus styles in AgentDetail tests
* ✨ feat: Enhance favorites management by adding loading and error states, and refactor related hooks and components
* ✨ feat: Add loading skeletons for favorites while agents are being fetched
* ✨ feat: Improve loading experience in FavoritesList by adding skeleton placeholders for favorites and marketplace
* feat: Optimize cache handling in Conversations and enhance FavoritesList to notify height changes on loading completion
* ✨ feat: Add loading skeleton for SearchBar in Nav component and update agent avatar fallback icon to Feather
* feat: Refactor FavoritesController validation, streamline ModelSelector component, and enhance EndpointModelItem with selection state
* feat: Adjust padding in Conversations and FavoritesList components for improved layout consistency
* feat: Refactor FavoritesController to use model methods for user updates and retrieval
* feat: Enhance Favorites functionality with validation, cleanup, and improved error handling
* tests: Update AgentCard and agent utilities to use Feather icon fallback instead of Bot icon
* refactor: Remove collapsible animation styles from CSS
* feat: Migrate favorites state management from Recoil to Jotai
* fix: Correct type definition in useGetFavoritesQuery and ensure useFavorites is exported
* refactor: Simplify AuthField component by removing TooltipAnchor and directly rendering Label
* fix: Ensure favorites are always an array and update references in FavoritesList
* style: Update Conversation component styles for improved UI consistency
* feat: re-integrate AuthContext to manage agent marketplace visibility based on authentication state
* fix: Improve optimistic updates in favorites mutation handling
* feat: Implement error handling for favorites limit and consolidate marketplace access logic
* fix: package-lock
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
Co-authored-by: Arthur Barrett <abarrett@fas.harvard.edu>
* refactor: move endpoint initialization methods to typescript
* refactor: move agent init to packages/api
- Introduced `initialize.ts` for agent initialization, including file processing and tool loading.
- Updated `resources.ts` to allow optional appConfig parameter.
- Enhanced endpoint configuration handling in various initialization files to support model parameters.
- Added new artifacts and prompts for React component generation.
- Refactored existing code to improve type safety and maintainability.
* refactor: streamline endpoint initialization and enhance type safety
- Updated initialization functions across various endpoints to use a consistent request structure, replacing `unknown` types with `ServerResponse`.
- Simplified request handling by directly extracting keys from the request body.
- Improved type safety by ensuring user IDs are safely accessed with optional chaining.
- Removed unnecessary parameters and streamlined model options handling for better clarity and maintainability.
* refactor: moved ModelService and extractBaseURL to packages/api
- Added comprehensive tests for the models fetching functionality, covering scenarios for OpenAI, Anthropic, Google, and Ollama models.
- Updated existing endpoint index to include the new models module.
- Enhanced utility functions for URL extraction and model data processing.
- Improved type safety and error handling across the models fetching logic.
* refactor: consolidate utility functions and remove unused files
- Merged `deriveBaseURL` and `extractBaseURL` into the `@librechat/api` module for better organization.
- Removed redundant utility files and their associated tests to streamline the codebase.
- Updated imports across various client files to utilize the new consolidated functions.
- Enhanced overall maintainability by reducing the number of utility modules.
* refactor: replace ModelService references with direct imports from @librechat/api and remove ModelService file
* refactor: move encrypt/decrypt methods and key db methods to data-schemas, use `getProviderConfig` from `@librechat/api`
* chore: remove unused 'res' from options in AgentClient
* refactor: file model imports and methods
- Updated imports in various controllers and services to use the unified file model from '~/models' instead of '~/models/File'.
- Consolidated file-related methods into a new file methods module in the data-schemas package.
- Added comprehensive tests for file methods including creation, retrieval, updating, and deletion.
- Enhanced the initializeAgent function to accept dependency injection for file-related methods.
- Improved error handling and logging in file methods.
* refactor: streamline database method references in agent initialization
* refactor: enhance file method tests and update type references to IMongoFile
* refactor: consolidate database method imports in agent client and initialization
* chore: remove redundant import of initializeAgent from @librechat/api
* refactor: move checkUserKeyExpiry utility to @librechat/api and update references across endpoints
* refactor: move updateUserPlugins logic to user.ts and simplify UserController
* refactor: update imports for user key management and remove UserService
* refactor: remove unused Anthropics and Bedrock endpoint files and clean up imports
* refactor: consolidate and update encryption imports across various files to use @librechat/data-schemas
* chore: update file model mock to use unified import from '~/models'
* chore: import order
* refactor: remove migrated to TS agent.js file and its associated logic from the endpoints
* chore: add reusable function to extract imports from source code in unused-packages workflow
* chore: enhance unused-packages workflow to include @librechat/api dependencies and improve dependency extraction
* chore: improve dependency extraction in unused-packages workflow with enhanced error handling and debugging output
* chore: add detailed debugging output to unused-packages workflow for better visibility into unused dependencies and exclusion lists
* chore: refine subpath handling in unused-packages workflow to correctly process scoped and non-scoped package imports
* chore: clean up unused debug output in unused-packages workflow and reorganize type imports in initialize.ts
* feat: allow keyboard nav in presetItems
(previously edit / pin / delete buttons would only render on hover, so when the element was focused with keybaord navigation, those buttons wouldn't render and couldn't be focused or actuated)
* feat: add aria-labels and TooltipAnchors to buttons in PresetItems
* fix: stop keypresses from triggering parent menuitem instead of buttons
* feat: better focus management on modal close with trigger refs
* feat: use OGDialog modal for preset deletion
* feat: add toast for successful preset deletion
* chore: address copilot comments
* chore: address comments
* chore: import order
* feat: added PROXY support for AWS Bedrock endpoint
* chore: explicit install of new packages required for bedrock proxy
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: make MultiSelect highlight same opacity as other focus highlights in app
* feat: add better screenreader announcements for mcp server and variable states
* feat: memoize fullTitle calculation
* Refactor: MCPServersRegistry Singleton Pattern with Dependency Injection for DB methods consumption
* refactor: error handling in MCP initialization and improve logging for MCPServersRegistry instance creation.
- Added checks for mongoose instance in ServerConfigsDB constructor and refined error messages for clarity.
- Reorder and use type imports
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: add aria-label for expansion chevron in Agent Builder's MCP tool list dropdown
* fix: remove duplicate tool info button in MCPTool so it doesn't get picked up via keyboard nav (still exists on mouse hover as it should to provide tooltip description of tool)
* feat: use InfoHoverCard rather than Ariakit components for tool descriptions
* chore: remove unused i18n keys
The active conversation state previously failed WCAG 1.4.11 Non-text Contrast
requirements (~1.2:1 contrast ratio). Added a left border indicator using
border-xheavy which provides 6:1+ contrast in both light and dark modes.
- Add border-l-2 with border-xheavy color for active state
- Conditionally apply rounded-r-lg (active) vs rounded-lg (inactive)
- Use transition-[background-color] to prevent border/radius animation glitch
Problem:
--------
Commit 5ed1f2991 introduced a layout shift regression when opening the
sidebar. The UI would visibly "jump" as elements shifted right before
the animation completed. Closing the sidebar worked correctly.
Root Cause Analysis:
--------------------
The accessibility PR added a redundant `{navVisible && ...}` conditional
wrapper around the `<nav>` content inside Nav.tsx's `motion.div`. This
caused a race condition:
1. User clicks "Open Sidebar" button
2. `navVisible` state becomes `true`
3. React renders the `motion.div` AND its children simultaneously
4. The inner `{navVisible && (<nav>...)}` renders content at full width
(320px/260px) BEFORE framer-motion applies `initial={{ width: 0 }}`
5. Brief flash of full-width content causes visible layout shift
6. Animation then starts from width: 0, but damage is done
The ref-based focus management (passing `openSidebarRef`/`closeSidebarRef`
through context) was suspected but was not the actual cause. However,
`requestAnimationFrame` focus calls during animation start could trigger
forced layout calculations, exacerbating the issue.
Solution:
---------
1. Remove redundant conditional rendering in Nav.tsx
- The outer `{navVisible && (<motion.div>...)}` already controls
visibility
- The `overflow-x-hidden` class on motion.div clips content during
animation
- Content should always exist inside motion.div for smooth clipping
2. Replace ref-based focus with ID-based focus management
- Refs passed through component tree can affect React's reconciliation
- Using `document.getElementById()` decouples focus from render cycle
- Exported `CLOSE_SIDEBAR_ID` and `OPEN_SIDEBAR_ID` constants for
consistency
3. Delay focus until after animation completes
- Changed from `requestAnimationFrame` to `setTimeout(..., 250)`
- Animation duration is 200ms; 250ms ensures completion
- Prevents layout thrashing during animation
4. Clean up prop drilling
- Removed `openSidebarRef`/`closeSidebarRef` from Root.tsx context
- Simplified Nav.tsx, Header.tsx, NewChat.tsx prop signatures
- Updated ContextType to remove ref properties
Files Changed:
--------------
- client/src/routes/Root.tsx
- client/src/components/Nav/Nav.tsx
- client/src/components/Nav/NewChat.tsx
- client/src/components/Chat/Header.tsx
- client/src/components/Chat/Menus/OpenSidebar.tsx
- client/src/common/types.ts
Accessibility Note:
-------------------
The original inner conditional was added to prevent keyboard navigation
to hidden sidebar content for screen readers. This is still handled by:
- AnimatePresence unmounting the motion.div after exit animation
- The motion.div having width: 0 during exit (content not reachable)
- Screen readers typically skip content being animated out
- Other: removed non-existant prop from BookmarkNav
Testing:
--------
- Verified smooth animation when opening sidebar (no layout shift)
- Verified smooth animation when closing sidebar (unchanged)
- Verified focus transfers correctly between open/close buttons
- Verified keyboard navigation works as expected
* Decouple mcp config from start up config
* Chore: Work on AI Review and Copilot Comments
- setRawConfig is not needed since the private raw config is not needed any more
- !!serversLoading bug fixed
- added unit tests for route /api/mcp/servers
- copilot comments addressed
* chore: remove comments
* chore: rename data-provider dir for MCP
* chore: reorganize mcp specific query hooks
* fix: consolidate imports for MCP server manager
* chore: add dev-staging branch to frontend review workflow triggers
* feat: add GitHub Actions workflow for building and pushing Docker images to GitHub Container Registry and Docker Hub
* fix: update label for tag input in BookmarkForm tests to improve clarity
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: show ModelSelector and other buttons properly
* chore: remove string templates and fix import order
* chore: import order
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: add light/dark differentiation on text color for login footer links for more accessible contrast in light mode
* feat: add darker color focus ring on ThemeSelector in light mode for more accessible contrast
* feat: increase contrast on text color for rendered error messages in light and dark mode so that they pass the 4.5:1 accessibility contrast threshold against their backgrounds
* feat: add more accessible color vars to style.css for better contrast against light/dark backgrounds
* feat: un-nest DropdownMenu from ListCard and make them siblings instead for better accessibility
* feat: tweak --border-heavy in light mode so that it uses --gray-410 rather than --gray-400 so that the contrast ratio threshold is hit for accessibility
* feat: switch email and password input border to border-heavy for more accessible contrast on Login page
* fix: add proper focus ring for Action menu button in Prompts Sidenav
* fix: align light and dark focus rings with surrounding elements on preview/edit menu dropdown button in Prompt Card
* fix: remove aria-hidden on parent div with focusable child element according to accessibility guidelines
* fix: add missing aria-readonly false property that should have been in previous accessibility PR
* feat: add horizontal padding on rowRenderer's CellMeasurer div so that focus ring on rows doesnt clip behind virtualized table borders side-to-side
(still need to figure out vertical clipping on final row / a better solution to be able to get overflows to work properly within the virtualized table)
* feat: remove render prop override so that Share and Delete Buttons in Conversation dropdown can be pressed with Enter keystroke
* fix: undo additional colors and changes to --surface-hover
the initial changes came from a misunderstanding of contrast threshold requirements for hover effect accessibility
* feat: better layout for non-nested prompt card / action menu combination
* fix: add proper focus restoration behavior for Preview modal on close
* fix: undo change to --border-heavy in light mode
* fix: set borders for login input boxes back to light
* feat: add announcement for state change when link copied to clipboard in conversation share modal
* feat: add announcement to Refresh Link button
* feat: add announcement for archiving chats
* feat: make date sections in conversation history list <h2> rather than generic <div> for improved screen reader support
* feat: ensure Share Link modal is accessible at high zoom percentage and low viewport width / height requirements by adding max height and overflow attributes to allow scrolling
* feat: bold toast text so that it hits font size accessibility threshold (above 14 px when bolded - change makes text 16 px bold) so that the more disruptive contrast change of the toast background color is no longer necessary.
The background color would need to achieve a 4.5:1 contrast ratio, which would significantly affect the established aesthetic of the current toast system if achieved.
* fix: do not render side nav when it is hidden to avoid keyboard navigation with screen reader
* fix: add side nav button state change announcements and don't render components that were previosuly reachable via keyboard navigation while in the side nav
* feat: add tooltip anchor for Model Select
* fix: only hide the model selector, export, and temp chat buttons when in mobile view and the sidenav is expanded
* feat: add aria-haspopup support for MenuItems and add aria-haspopup: 'dialog' for Share and Delete buttons in ConvoOptions
* feat: add label for DataTable search so that it does not rely on placeholder attribute for function identification
* feat: make X buttons on dialogs 24x24px to achieve AA compliance
* feat: add announcements for the search bar for model selector
* feat: persistent label for DataTable
* feat: make filter files text contrast compliant
* feat: add non-color visual indicator to AudioRecorder listening state
* feat: add aria-expanded attribute to tool call dropdown for screen reader
* feat: add high contrast and rounded outlines for focus indicators on Run Code and Copy Code buttons for code blocks
* fix: change Button to anchor tag in Shared Links component when linking to original conversation
* fix: allow overflow in datatable cells so that focus indicators dont get cut off
* feat: round out focus outline for link name in SharedLinks modal
* feat: add aria-controls and aria-haspopup: "dialog" to SharedLinks delete button and modal
* feat: add aria-controls for dropdown menu items on ConvoOptions for share and delete modals
* feat: add trigger ref to 2FA button and modal in settings menu so focus returns to button on modal close
* feat: add refs so that open sidebar and close sidebar buttons transfer focus to one another
* chore: formatting
* feat: make sure settings modal is accessible at 200% zoom for screen size 1366x768 viewport
* feat: round out focus outline for link names in archived chats modal
* feat: add result announcements for screen reader in DataTable search
* feat: simplify layout for checkbox / api key components for better accessibility
* feat: return focus to chat input on prompt variables modal close
* feat: add persistent labels to TextareaAutosize Inputs in Variable form
* feat: tighten max width so side scrolling not necessary at 400% zoom for VariableForm modal
* feat: add persistent labels to prompt management page
* feat: announce results found for search bars in prompts page and improve them in datatable
* feat: de-nest DashGroupItem buttons in Prompts page to allow better navigation and comply with accessibility standard
* feat: add heading for new prompt creation page for screen readers
* feat: remove non-compliant description truncation for small screen sizes by making labels static on small enough viewport width
* feat: add mobile view sidebar for prompts page
* feat: add bolded text on select for AdvancedSwitch so that there is a visual indicator of selection and it does not rely solely on color as an indication of state
* feat: add persistent labels to ModelSelector search inputs
* feat: align aria-label with visual label for speech recognition users
* feat: make MemoryCreateDialog accessible at 400% zoom (introduce max viewport height attr and make scrollable)
* feat: add persistent label to Filter input for DataTable in file attach sidebar menu
* feat: add persistent label for bookmark filter input in bookmarks sidebar menu
* feat: add alert for screen readers for invalid inputs when editting bookmarks
* feat: bold font in BookmarkForm error readout to pass contrast compliance thresholds for 14pt text
* feat: align aria-label with visual label for BookmarkForm Ttile input
* feat: add 400% zoom support for ALL modals utilizing OriginalDialog to prevent clipping
* feat: remove state change on aria label and give consistent labelling for button, offload state change notification to the announcement div and make more assertive
* feat: add aria-labels which convey that the buttons are sortable (divergence from visual text because iconography is used to signify sort functionality)
* feat: add supplemental visuals to indicate link is clickable other than color in SharedLinks
* feat: increase saturation to hit contrast threshold minimums on Link color in SharedLinks
* feat: stop DataTable from disappearing at 400% zoom in SharedLinks
* feat: increase contrast to hit contrast threshold minimums on Animated Search Input visual indicators
* feat: add aria-label for AnimatedSearchInput (doesn't require explicit labelling because of Search icon)
* fix: stop long example variable declaration from clipping at high zoom in variables info
* feat: add aria-label to bettter describe sort button functionality for vision impaired users
* chore: remove unused translation key
* chore: address ESLint comments
* fix: modify test to account for new alert on theme toggle switch for login page
* chore: interpolate translation key
* 🔄 Refactoring: MCP Runtime Configuration Reload
- PrivateServerConfigs own cache classes (inMemory and Redis).
- Connections staleness detection by comparing (connection.createdAt and config.LastUpdatedAt)
- ConnectionsRepo access Registry instead of in memory config dict and renew stale connections
- MCPManager: adjusted init of ConnectionsRepo (app level)
- UserConnectionManager: renew stale connections
- skipped test, to test "should only clear keys in its own namespace"
- MCPPrivateServerLoader: new component to manage logic of loading / editing private servers on runtime
- PrivateServersLoadStatusCache to track private server cache status
- New unit and integration tests.
Misc:
- add es lint rule to enforce line between class methods
* Fix cluster mode batch update and delete workarround. Fixed unit tests for cluster mode.
* Fix Keyv redis clear cache namespace awareness issue + Integration tests fixes
* chore: address copilot comments
* Fixing rebase issue: removed the mcp config fallback in single getServerConfig method:
- to not to interfere with the logic of the right Tier (APP/USER/Private)
- If userId is null, the getServerConfig should not return configs that are a SharedUser tier and not APP tier
* chore: add dev-staging branch to workflow triggers for backend, cache integration, and ESLint checks
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
* chore: update express to version 5.1.0 in package.json
* chore: update express-rate-limit to version 8.2.1 in package.json and package-lock.json
* fix: Enhance server startup error handling in experimental and index files
* Added error handling for server startup in both experimental.js and index.js to log errors and exit the process if the server fails to start.
* Updated comments in openidStrategy.js to clarify the purpose of the CustomOpenIDStrategy class and its relation to Express version changes.
* chore: Implement rate limiting for all POST routes excluding /speech, required for express v5
* Added middleware to apply IP and user rate limiters to all POST requests, ensuring that the /speech route remains unaffected.
* Enhanced code clarity with comments explaining the new rate limiting logic.
* chore: Enable writable req.query for mongoSanitize compatibility in Express 5
* chore: Ensure req.body exists in multiple middleware and route files for Express 5 compatibility
* 🗑️ chore: Remove unused Legacy Provider clients and related helpers
* Deleted OpenAIClient and GoogleClient files along with their associated tests.
* Removed references to these clients in the clients index file.
* Cleaned up typedefs by removing the OpenAISpecClient export.
* Updated chat controllers to use the OpenAI SDK directly instead of the removed client classes.
* chore/remove-openapi-specs
* 🗑️ chore: Remove unused mergeSort and misc utility functions
* Deleted mergeSort.js and misc.js files as they are no longer needed.
* Removed references to cleanUpPrimaryKeyValue in messages.js and adjusted related logic.
* Updated mongoMeili.ts to eliminate local implementations of removed functions.
* chore: remove legacy endpoints
* chore: remove all plugins endpoint related code
* chore: remove unused prompt handling code and clean up imports
* Deleted handleInputs.js and instructions.js files as they are no longer needed.
* Removed references to these files in the prompts index.js.
* Updated docker-compose.yml to simplify reverse proxy configuration.
* chore: remove unused LightningIcon import from Icons.tsx
* chore: clean up translation.json by removing deprecated and unused keys
* chore: update Jest configuration and remove unused mock file
* Simplified the setupFiles array in jest.config.js by removing the fetchEventSource mock.
* Deleted the fetchEventSource.js mock file as it is no longer needed.
* fix: simplify endpoint type check in Landing and ConversationStarters components
* Updated the endpoint type check to use strict equality for better clarity and performance.
* Ensured consistency in the handling of the azureOpenAI endpoint across both components.
* chore: remove unused dependencies from package.json and package-lock.json
* chore: remove legacy EditController, associated routes and imports
* chore: update banResponse logic to refine request handling for banned users
* chore: remove unused validateEndpoint middleware and its references
* chore: remove unused 'res' parameter from initializeClient in multiple endpoint files
* chore: remove unused 'isSmallScreen' prop from BookmarkNav and NewChat components; clean up imports in ArchivedChatsTable and useSetIndexOptions hooks; enhance localization in PromptVersions
* chore: remove unused import of Constants and TMessage from MobileNav; retain only necessary QueryKeys import
* chore: remove unused TResPlugin type and related references; clean up imports in types and schemas
* fix: replace string concatenation of localization keys with interpolations and add keys for unlocalized string literals
* chore: update test for new localization key
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: wrap main content of page in <main> tag for screen reader landmarks (439)
* feat: add italic on active convo when selected so that selection state does not rely on bg contrast ratio (562)
* feat: add border ring around SearchBar so that it passes focus contrast minimums (577)
* fix: hide decorative SVGs from screen readers (578)
* fix: stop clipping of focus outlines in My Files modal (593)
* feat: programmatically declare state of Temporary Chat toggle for screen readers (606)
* feat: add sr-only components to warn screen readers that footer links open in new tab (611)
* feat: add aria-labels to archived chat table buttons
* feat: add screen reader heading for prompt edit page (776)
* feat: increase contrast to threshold minimum for production tag in prompts advanced view (773)
* feat: increase contrast to thehold minimums for production tag and version card border highlights (770)
* fix: h2 now reads as 'control bar' to screen readers in edit prompt page (768)
* feat: add selected state tracking for simple / advanced toggle for screen readers (765)
* feat: add left padding to theme selector in prompts side nav panel so that focus outline doesnt clip
* feat: darken orange bg for warning toasts to hit 3:1 contrast minimum with white text (725)
* fix: return focus to triggering element on modal close for image preview in attach files panel (717)
* fix: hide SVG for AddMultiConvo button from screen readers (708)
* feat: add persistent label to Filter Memories... input in memory side panel
If you've got a screen reader that is reading out the whole page,
each icon button (i.e., `<button><SVG></button>`) will have both
the button's aria-label read out as well as the title from the
SVG (which is usually just "image").
Since we are pretty good about setting aria-labels, we should instead
use `aria-hidden="true"` on these images, since they are not useful
to be read out.
I don't consider this a comprehensive review of all icons in the app,
but I knocked out all the low hanging fruit in this commit.
Adds support for MCP servers like StackOverflow that use OAuth but don't
provide standard discovery metadata at .well-known endpoints.
Changes:
- Add fallback OAuth endpoints (/authorize, /token, /register) when
discoverAuthorizationServerMetadata returns undefined
- Add POST fallback in OAuth detection when HEAD returns non-401
(StackOverflow returns 405 for HEAD, 401 for POST)
- Detect OAuth requirement from WWW-Authenticate: Bearer header even
without resource_metadata URL
- Add fallback /token endpoint for token refresh when metadata
discovery fails
- Add registration_endpoint to OAuthMetadata type
This mirrors the MCP SDK's behavior where it gracefully falls back to
default OAuth endpoint paths when .well-known metadata isn't available.
Tests:
- Add unit tests for detectOAuth.ts (POST fallback, Bearer detection)
- Add unit tests for handler.ts (fallback metadata, fallback refresh)
- Add StackOverflow to integration test servers
Fixes OAuth flow for servers that:
- Return 405 for HEAD requests (only support POST)
- Return 401 with simple "Bearer" in WWW-Authenticate
- Don't have .well-known/oauth-authorization-server endpoint
- Use standard /authorize, /token, /register paths
- Added try-catch blocks to handle errors during document deletion from the RAG API.
- Implemented logging for 404 errors indicating that the document may have already been deleted.
- Improved error logging for other deletion errors in both Firebase and Local file services.
* 🔖 refactor: citation handling with support for both literal and Unicode formats
* refactor: file search messages for edge cases in documents
* 🔧 refactor: Enhance citation handling with detailed regex patterns for literal and Unicode formats
* 🔧 refactor: Simplify file search query handling by removing unnecessary parameters and improving result formatting
* ✨ test: Add comprehensive integration tests for citation processing flow with support for literal and Unicode formats
* 🔧 refactor: Improve regex match handling and add performance tests for citation processing
- Updated @librechat/api to version 1.7.0
- Updated @librechat/client to version 0.4.1
- Updated librechat-data-provider to version 0.8.200
- Updated @librechat/data-schemas to version 0.0.31
* v0.8.1
* fix: GitHub workflows for OIDC trusted publishing
- Added permissions for OIDC trusted publishing in client, data-provider, and data-schemas workflows.
- Updated npm installation to support OIDC in all workflows.
- Changed npm publish commands to include `--provenance` for better package integrity.
- Updated repository URLs in package.json files for client, data-provider, and data-schemas to remove `git+` prefix.
* 🔊 fix: Validate language format for OpenAI STT model
* fix: Normalize input language model assignment in STTService
* refactor: Enhance error logging and language validation in STT and TTS services
* fix: Improve language validation in getValidatedLanguageCode function
* Improve prompt for better citation formatting
* Provide format example
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor: Simplify citation guidelines and response structure in tool loading
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
- Created a new `bun.lock` file to manage project dependencies effectively.
- Removed the obsolete `bun.lockb` file.
- Updated `package.json` scripts to streamline the build process for the client and API, enhancing the overall development workflow.
- Introduced new build commands for the client package to improve modularity and clarity in the build process.
- Introduced `inferMimeType` utility to improve MIME type detection for uploaded files, including support for HEIC and HEIF formats.
- Updated DragDropModal to utilize the new inference logic for validating file types, ensuring compatibility with various document upload providers.
- Added comprehensive tests for `inferMimeType` to cover various scenarios, including handling of unknown extensions and preserving browser-provided types.
* 🔧 fix: Gemini as Custom Endpoint Auth. Error for OAI-compatible API
* refactor: Google Compatibility in OpenAI Config
- Added a test to ensure `googleSearch` is filtered out when `web_search` is only present in `modelOptions`, not in `addParams` or `defaultParams`.
- Updated `transformToOpenAIConfig` to preserve `googleSearch` tools if `web_search` is explicitly enabled via `addParams` or `defaultParams`.
- Refactored the filtering logic for Google-specific tools to accommodate the new behavior.
* refactor: implement sanitizeFileForTransmit and sanitizeMessageForTransmit functions for smaller payload to client transmission
* refactor: enhance sanitizeMessageForTransmit to preserve empty files array and avoid mutating original message
* refactor: update sanitizeMessageForTransmit to ensure immutability of files array and improve test clarity
* refactor: Token Limit Processing with Enhanced Efficiency
- Added a new test suite for `processTextWithTokenLimit`, ensuring comprehensive coverage of various scenarios including under, at, and exceeding token limits.
- Refactored the `processTextWithTokenLimit` function to utilize a ratio-based estimation method, significantly reducing the number of token counting function calls compared to the previous binary search approach.
- Improved handling of edge cases and variable token density, ensuring accurate truncation and performance across diverse text inputs.
- Included direct comparisons with the old implementation to validate correctness and efficiency improvements.
* refactor: Remove Tokenizer Route and Related References
- Deleted the tokenizer route from the server and removed its references from the routes index and server files, streamlining the API structure.
- This change simplifies the routing configuration by eliminating unused endpoints.
* refactor: Migrate countTokens Utility to API Module
- Removed the local countTokens utility and integrated it into the @librechat/api module for centralized access.
- Updated various files to reference the new countTokens import from the API module, ensuring consistent usage across the application.
- Cleaned up unused references and imports related to the previous countTokens implementation.
* refactor: Centralize escapeRegExp Utility in API Module
- Moved the escapeRegExp function from local utility files to the @librechat/api module for consistent usage across the application.
- Updated imports in various files to reference the new centralized escapeRegExp function, ensuring cleaner code and reducing redundancy.
- Removed duplicate implementations of escapeRegExp from multiple files, streamlining the codebase.
* refactor: Enhance Token Counting Flexibility in Text Processing
- Updated the `processTextWithTokenLimit` function to accept both synchronous and asynchronous token counting functions, improving its versatility.
- Introduced a new `TokenCountFn` type to define the token counting function signature.
- Added comprehensive tests to validate the behavior of `processTextWithTokenLimit` with both sync and async token counting functions, ensuring consistent results.
- Implemented a wrapper to track call counts for the `countTokens` function, optimizing performance and reducing unnecessary calls.
- Enhanced existing tests to compare the performance of the new implementation against the old one, demonstrating significant improvements in efficiency.
* chore: documentation for Truncation Safety Buffer in Token Processing
- Added a safety buffer multiplier to the character position estimates during text truncation to prevent overshooting token limits.
- Updated the `processTextWithTokenLimit` function to utilize the new `TRUNCATION_SAFETY_BUFFER` constant, enhancing the accuracy of token limit processing.
- Improved documentation to clarify the rationale behind the buffer and its impact on performance and efficiency in token counting.
- Updated `useChatFunctions` to derive `iconURL` from conversation data before parsing
- Modified `parseCompactConvo` to explicitly omit `iconURL` from parsed conversations, reinforcing security measures around URL handling.
* 🖥️ feat: Add Proxy Support for Tavily API Tool
- Integrated ProxyAgent from undici to enable proxy support for API requests in TavilySearch and TavilySearchResults.
- Updated fetch options to conditionally include the proxy configuration based on the environment variable, enhancing flexibility for network requests.
* ci: TavilySearchResults with Proxy Support Tests
- Added tests to verify the integration of ProxyAgent for API requests in TavilySearchResults.
- Implemented conditional logic to check for the PROXY environment variable, ensuring correct usage of ProxyAgent based on its presence.
- Updated test setup to clear mocks before each test for improved isolation and reliability.
* refactor: Add back user variable descriptions for MCP under input and not as Tooltips
- Integrated DOMPurify to sanitize HTML content in user variable descriptions, ensuring safe rendering of links and formatting.
- Updated the AuthField component to display sanitized descriptions, enhancing security and user experience.
- Removed TooltipAnchor in favor of direct label rendering for improved clarity.
* 📦 chore: Update `dompurify` to v3.3.0 in package dependencies
- Added `dompurify` version 3.3.0 to `package.json` and `package-lock.json` for improved HTML sanitization.
- Updated existing references to `dompurify` to ensure consistency across the project.
* refactor: Update tooltip styles for sanitized description in AuthField component
* 🗨️ fix: Safe Validation for Prompt Updates
- Added `safeValidatePromptGroupUpdate` function to validate and sanitize prompt group update requests, ensuring only allowed fields are processed and sensitive fields are stripped.
- Updated the `patchPromptGroup` route to utilize the new validation function, returning appropriate error messages for invalid requests.
- Introduced comprehensive tests for the validation logic, covering various scenarios including allowed and disallowed fields, enhancing overall request integrity and security.
- Created a new schema file for prompt group updates, defining validation rules and types for better maintainability.
* 🔒 feat: Add JSON parse error handling middleware
* 🔒 fix: `iconURL` in conversation parsing
- Updated the `buildEndpointOption` middleware to derive `iconURL` from model specs when not provided by the client, improving security by preventing malicious URLs.
- Modified the `parseCompactConvo` function to strip `iconURL` from conversation inputs, ensuring it is only set server-side.
- Added comprehensive tests to validate the stripping of `iconURL` across various endpoint types, enhancing overall input sanitization.
* ✨ feat: Add ESLint rule for unused variables
- Introduced a new ESLint rule to warn about unused variables, allowing for better code quality and maintainability.
- Configured the rule to ignore variables and arguments that start with an underscore, accommodating common coding practices.
* 🔧 chore: Update @librechat/agents to version 3.0.35
* ✨ feat: Add DeepSeek Model Pricing and Token Handling
- Introduced pricing and token limits for 'deepseek-chat' and 'deepseek-reasoner' models, including prompt and completion rates.
- Enhanced tests to validate pricing and token limits for DeepSeek models, ensuring correct handling of model variations and provider prefixes.
- Updated cache multipliers for DeepSeek models to reflect new pricing structure.
- Improved max output token handling for DeepSeek models, ensuring consistency across different endpoints.
* 🔧 fix: Handle null content parts in message processing
- Added checks to filter out null content parts in various message handling functions, ensuring robustness against undefined values.
- Updated the `extractMessageContent`, `useContentHandler`, `useEventHandlers`, and `useStepHandler` hooks to prevent errors caused by null parts.
- Enhanced the `getAllContentText` utility to only include valid content types, improving overall message integrity.
* 🔧 fix: Enhance error handling in event and SSE handlers
- Wrapped critical sections in try-catch blocks within `useEventHandlers` and `useSSE` hooks to improve error management and prevent application crashes.
- Added console error logging for better debugging and tracking of issues during message processing and conversation aborting.
- Ensured that UI states like `setIsSubmitting` and `setShowStopButton` are correctly updated in case of errors, maintaining a consistent user experience.
* 🔧 fix: Filter out null and empty content in message export
- Enhanced the `useExportConversation` hook to filter out null content parts and empty strings during message processing, ensuring only valid content is included in the export.
- This change improves the integrity of exported conversations by preventing unnecessary empty entries in the output.
* 📐 refactor: Exclude Params from OAI Reasoning Models
- Introduced a new test suite for `getOpenAILLMConfig` covering various model configurations, including basic settings, reasoning models, and web search functionality.
- Validated parameter handling for different models, ensuring correct exclusions and conversions, particularly for temperature and max_tokens.
- Enhanced tests for default and additional parameters, drop parameters, and verbosity handling, ensuring robust coverage of the configuration logic.
* ci: Update OpenAI model version in configuration tests
- Changed model references from 'gpt-5' to 'gpt-4' across multiple test cases in the `getOpenAIConfig` function.
- Adjusted related parameter handling to ensure compatibility with the updated model version, including maxTokens and temperature settings.
- Enhanced test coverage for model options and their expected configurations.
- Updated the `findUser` method to normalize email fields to lowercase and trimmed whitespace for case-insensitive matching.
- Enhanced the `normalizeEmailInCriteria` function to handle email normalization in search criteria, including `` conditions.
- Added tests to ensure email normalization works correctly across various scenarios, including case differences and whitespace handling.
* 🤖 feat: Latest Grok Model Pricing & Context Rates
- Introduced 'grok-4-fast', 'grok-4-1-fast', and 'grok-code-fast' models with their respective prompt and completion rates.
- Enhanced unit tests to validate prompt and completion rates for the new models, including variations with prefixes.
- Updated token limits for the new models in the tokens utility, ensuring accurate handling in tests.
* 🔧 refactor: Optimize JSON Export Logic in useExportConversation Hook
Updated the export logic to create a Blob from the JSON string before downloading, improving compatibility and performance for file downloads. This change enhances the handling of deeply nested exports while maintaining the file size reduction achieved in previous updates.
Updated the export logic in the useExportConversation hook to use JSON.stringify without indentation, reducing file size for deeply nested exports. Additionally, ensured safe access to text content by providing a fallback for undefined values.
* 🔧 fix: Correct URL Construction in fetchModels Function
Updated the URL construction in the fetchModels function to ensure proper formatting by removing trailing slashes from the base URL. This change prevents potential issues with API endpoint calls.
* 🔧 fix: Remove OLLAMA from Known Custom Providers
Updated the isKnownCustomProvider function and providerConfigMap to exclude OLLAMA as a known custom provider, streamlining the provider checks and configurations.
* 🔧 test: Enhance fetchModels Tests for URL Construction
Added new test cases to validate the URL construction in the fetchModels function, ensuring it handles trailing slashes correctly and appends query parameters as expected. This improves the robustness of the API endpoint calls.
* chore: remove ollama provider-specific handling
* chore: Refactor imports to use isUserProvided from @librechat/api
* ✨ v0.8.1-rc2
- Updated version numbers in Dockerfile, Dockerfile.multi, package.json, and various package.json files for client, api, and data-provider.
- Adjusted appVersion in Chart.yaml and constants in config.ts to reflect the new version.
- Incremented versions for @librechat/api, @librechat/client, and librechat-data-provider packages.
* chore: Update Chart version to 1.9.3
- Incremented the chart version in Chart.yaml to reflect the latest changes.
Removed unnecessary debug logging statements in the extractOpenIDTokenInfo function to streamline the code and improve readability. This change enhances the clarity of the function's logic without altering its functionality.
* fix: exclude the currently edited bookmark from duplicate checks
* ci: Add comprehensive tests for BookmarkForm component
- Introduced a new test suite for the BookmarkForm component to validate bookmark editing functionality.
- Implemented tests for various scenarios including editing descriptions, renaming tags, and handling duplicate tags.
- Ensured proper feedback through toasts for error cases and successful submissions.
- Mocked necessary hooks and context to isolate component behavior during tests.
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
When using direct endpoints (e.g., Google) instead of Agents, `this.options.agent` is undefined, causing provider detection to fail. This resulted in "Unknown content type document" errors for Google/Gemini PDF uploads.
Added `?? this.options.endpoint` fallback in addDocuments(), addVideos(), and addAudios() methods to ensure correct provider detection for all endpoint types.
* feat: shift collapse chevron inside ChatForm input area
* feat: add soft gradient on bottom of collapsed text input so there isn't a hard cut off when text overflows
* feat: add better scroll bar behavior for main chat input
* fix: smooth out purple gradient for temporary chats
* feat: better colors for gradient
* feat: use blur instead of colors
* chore: address copilot comments
* fix: increase RAG API text parsing timeout for large files
* ci: Update text.spec.ts
---------
Co-authored-by: Rosen Simov <rosen.simov@endurosat.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: remove side panel elements from screen reader when hidden
There's both left & right side panels; elements of both of them
are hidden when dismissed. However, currently they are being hidden
by using classes to hide their UI (such as making the sidebar
zero width).
That works for visually dismissing these elements, but they can still
be viewed by a screen reader (using the tab key to jump between
interactable elements). That can be a rather confusing experience
for anyone visually impaired (such as duplicate buttons, or buttons
that do nothing).
--------
I've changed it so hidden elements are fully removed from the render.
This prevents them from being interactable via keyboard.
I leveraged Motion to duplicate the animations as they happened before.
I subtly cleaned up the animations while I was at it.
* Implemented reasonable suggestions from Copilot review
* 🤖 feat: Claude Opus 4.5 Token Rates and Window Limits
- Introduced new model 'claude-opus-4-5' with defined prompt and completion values in tokenValues and cacheTokenValues.
- Updated tests to validate prompt, completion, and cache rates for the new model.
- Enhanced model name handling to accommodate variations for 'claude-opus-4-5' across different contexts.
- Adjusted schemas to ensure correct max output token limits for the new model.
* ci: Add tests for "prompt-caching" beta header in Claude Opus 4.5 models
- Implemented tests to verify the addition of the "prompt-caching" beta header for the 'claude-opus-4-5' model and its variations.
- Updated future-proofing logic to ensure correct max token limits for Claude 4.x and 5.x Opus models, adjusting defaults to 64K where applicable.
- Enhanced existing tests to reflect changes in expected max token values for future Claude models.
* chore: Remove redundant max output check for Anthropic settings
- Eliminated the unnecessary check for ANTHROPIC_MAX_OUTPUT in the anthropicSettings schema, streamlining the logic for handling max output values.
* fix: Header and Environment Variable Handling Bug from #9931
* refactor: Remove warning log for missing tokens in extractOpenIDTokenInfo function
* feat: Enhance resolveNestedObject function for improved placeholder processing
- Added a new function `resolveNestedObject` to recursively process nested objects, replacing placeholders in string values while preserving the original structure.
- Updated `createTestUser` to use `IUser` type and modified user ID generation.
- Added comprehensive unit tests for `resolveNestedObject` to cover various scenarios, including nested structures, arrays, and custom user variables.
- Improved type handling in `processMCPEnv` to ensure correct processing of mixed numeric and placeholder values.
* refactor: Remove unnecessary manipulation of Bedrock options introduced in #9931
- Eliminated the resolveHeaders function call from the getOptions method in options.js, as it was no longer necessary for processing additional model request fields.
- This change simplifies the code and improves maintainability.
* 🗑️ chore: Remove @microsoft/eslint-formatter-sarif from dependencies and update ESLint CI workflow
- Removed @microsoft/eslint-formatter-sarif from package.json and package-lock.json.
- Updated ESLint CI workflow to eliminate SARIF upload logic and related environment variables.
* chore: Remove ts-jest from dependencies in jest.config and package files
* chore: Update package dependencies to latest versions
- Upgraded @rollup/plugin-commonjs from 25.0.2 to 29.0.0 across multiple packages.
- Updated rimraf from 5.0.1 to 6.1.2 in packages/api, client, data-provider, and data-schemas.
- Added new dependencies: @isaacs/balanced-match and @isaacs/brace-expansion in package-lock.json.
- Updated glob from 8.1.0 to 13.0.0 and adjusted related dependencies accordingly.
* chore: remove prettier-eslint dependency from package.json
* chore: npm audit fix
* fix: correct `getBasePath` import
* fix: update @librechat/agents dependency to version 3.0.29
* chore: fix typing by replacing TUser with IUser
* chore: import order
* fix: replace TUser with IUser in run and OAuthReconnectionManager modules
* fix: update @librechat/agents dependency to version 3.0.30
* remove all user metadata on deletion
* chore: import order
* fix: Update JSDoc types for deleteMessages function parameters and return value
* fix: Enhance user deletion process by removing associated data and updating group memberships
* fix: Add missing config middleware to user deletion route
* fix: Refactor agent and prompt deletion processes to bulk delete and remove associated ACL entries
* fix: Add deletion of OAuth tokens and ACL entries in user deletion process
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: add basePath pattern to support login/register and image paths
* Fix linter errors
* refactor: Update import statements for getBasePath and isEnabled, and add path utility functions with tests
- Refactored imports in addImages.js and StableDiffusion.js to use getBasePath from '@librechat/api'.
- Consolidated isEnabled and getBasePath imports in validateImageRequest.js.
- Introduced new path utility functions in path.ts and corresponding unit tests in path.spec.ts to validate base path extraction logic.
* fix: Update domain server base URL in MarkdownComponents and refactor authentication redirection logic
- Changed the domain server base URL in MarkdownComponents.tsx to use the API base URL.
- Refactored the useAuthRedirect hook to utilize React Router's navigate for redirection instead of window.location, ensuring a smoother SPA experience.
- Added unit tests for the useAuthRedirect hook to verify authentication redirection behavior.
* test: Mock isEnabled in validateImages.spec.js for improved test isolation
- Updated validateImages.spec.js to mock the isEnabled function from @librechat/api, ensuring that tests can run independently of the actual implementation.
- Cleared the DOMAIN_CLIENT environment variable before tests to avoid interference with basePath resolution.
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: Add OpenID Connect federated provider token support
Implements support for passing federated provider tokens (Cognito, Azure AD, Auth0)
as variables in LibreChat's librechat.yaml configuration for both custom endpoints
and MCP servers.
Features:
- New LIBRECHAT_OPENID_* template variables for federated provider tokens
- JWT claims parsing from ID tokens without verification (for claim extraction)
- Token validation with expiration checking
- Support for multiple token storage locations (federatedTokens, openidTokens)
- Integration with existing template variable system
- Comprehensive test suite with Cognito-specific scenarios
- Provider-agnostic design supporting Cognito, Azure AD, Auth0, etc.
Security:
- Server-side only token processing
- Automatic token expiration validation
- Graceful fallbacks for missing/invalid tokens
- No client-side token exposure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Add federated token propagation to OIDC authentication strategies
Adds federatedTokens object to user during authentication to enable
federated provider token template variables in LibreChat configuration.
Changes:
- OpenID JWT Strategy: Extract raw JWT from Authorization header and
attach as federatedTokens.access_token to enable {{LIBRECHAT_OPENID_TOKEN}}
placeholder resolution
- OpenID Strategy: Attach tokenset tokens as federatedTokens object to
standardize token access across both authentication strategies
This enables proper token propagation for custom endpoints and MCP
servers that require federated provider tokens for authorization.
Resolves missing token issue reported by @ramden in PR #9931🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Denis Ramic <denis.ramic@nfon.com>
Co-Authored-By: Claude <noreply@anthropic.com>
* test: Add federatedTokens validation tests for OIDC strategies
Adds comprehensive test coverage for the federated token propagation
feature implemented in the authentication strategies.
Tests added:
- Verify federatedTokens object is attached to user with correct structure
(access_token, refresh_token, expires_at)
- Verify both tokenset and federatedTokens are present in user object
- Ensure tokens from OIDC provider are correctly propagated
Also fixes existing test suite by adding missing mocks:
- isEmailDomainAllowed function mock
- findOpenIDUser function mock
These tests validate the fix from commit 5874ba29f that enables
{{LIBRECHAT_OPENID_TOKEN}} template variable functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: Remove implementation documentation file
The PR description already contains all necessary implementation details.
This documentation file is redundant and was requested to be removed.
* fix: skip s256 check
* fix(openid): handle missing refresh token in Cognito token refresh response
When OPENID_REUSE_TOKENS=true, the token refresh flow was failing because
Cognito (and most OAuth providers) don't return a new refresh token in the
refresh grant response - they only return new access and ID tokens.
Changes:
- Modified setOpenIDAuthTokens() to accept optional existingRefreshToken parameter
- Updated validation to only require access_token (refresh_token now optional)
- Added logic to reuse existing refresh token when not provided in tokenset
- Updated refreshController to pass original refresh token as fallback
- Added comments explaining standard OAuth 2.0 refresh token behavior
This fixes the "Token is not present. User is not authenticated." error that
occurred during silent token refresh with Cognito as the OpenID provider.
Fixes: Authentication loop with OPENID_REUSE_TOKENS=true and AWS Cognito
* fix(openid): extract refresh token from cookies for template variable replacement
When OPENID_REUSE_TOKENS=true, the openIdJwtStrategy populates user.federatedTokens
to enable template variable replacement (e.g., {{LIBRECHAT_OPENID_ACCESS_TOKEN}}).
However, the refresh_token field was incorrectly sourced from payload.refresh_token,
which is always undefined because:
1. JWTs don't contain refresh tokens in their payload
2. The JWT itself IS the access token
3. Refresh tokens are separate opaque tokens stored in HTTP-only cookies
This caused extractOpenIDTokenInfo() to receive incomplete federatedTokens,
resulting in template variables remaining unreplaced in headers.
**Root Cause:**
- Line 90: `refresh_token: payload.refresh_token` (always undefined)
- JWTs only contain access token data in their claims
- Refresh tokens are separate, stored securely in cookies
**Solution:**
- Import `cookie` module to parse cookies from request
- Extract refresh token from `refreshToken` cookie
- Populate federatedTokens with both access token (JWT) and refresh token (from cookie)
**Impact:**
- Template variables like {{LIBRECHAT_OPENID_ACCESS_TOKEN}} now work correctly
- Headers in librechat.yaml are properly replaced with actual tokens
- MCP server authentication with federated tokens now functional
**Technical Details:**
- passReqToCallback=true in JWT strategy provides req object access
- Refresh token extracted via cookies.parse(req.headers.cookie).refreshToken
- Falls back gracefully if cookie header or refreshToken is missing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: re-resolve headers on each request to pick up fresh federatedTokens
- OpenAIClient now re-resolves headers in chatCompletion() before each API call
- This ensures template variables like {{LIBRECHAT_OPENID_TOKEN}} are replaced
with actual token values from req.user.federatedTokens
- initialize.js now stores original template headers instead of pre-resolved ones
- Fixes template variable replacement when OPENID_REUSE_TOKENS=true
The issue was that headers were only resolved once during client initialization,
before openIdJwtStrategy had populated user.federatedTokens. Now headers are
re-resolved on every request with the current user's fresh tokens.
* debug: add logging to track header resolution in OpenAIClient
* debug: log tokenset structure after refresh to diagnose missing access_token
* fix: set federatedTokens on user object after OAuth refresh
- After successful OAuth token refresh, the user object was not being
updated with federatedTokens
- This caused template variable resolution to fail on subsequent requests
- Now sets user.federatedTokens with access_token, id_token, refresh_token
and expires_at from the refreshed tokenset
- Fixes template variables like {{LIBRECHAT_OPENID_TOKEN}} not being
replaced after token refresh
- Related to PR #9931 (OpenID federated token support)
* fix(openid): pass user object through agent chain for template variable resolution
Root cause: buildAgentContext in agents/run.ts called resolveHeaders without
the user parameter, preventing OpenID federated token template variables from
being resolved in agent runtime parameters.
Changes:
- packages/api/src/agents/run.ts: Add user parameter to createRun signature
- packages/api/src/agents/run.ts: Pass user to resolveHeaders in buildAgentContext
- api/server/controllers/agents/client.js: Pass user when calling createRun
- api/server/services/Endpoints/bedrock/options.js: Add resolveHeaders call with debug logging
- api/server/services/Endpoints/custom/initialize.js: Add debug logging
- packages/api/src/utils/env.ts: Add comprehensive debug logging and stack traces
- packages/api/src/utils/oidc.ts: Fix eslint errors (unused type, explicit any)
This ensures template variables like {{LIBRECHAT_OPENID_TOKEN}} and
{{LIBRECHAT_USER_OPENIDID}} are properly resolved in both custom endpoint
headers and Bedrock AgentCore runtime parameters.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: remove debug logging from OpenID token template feature
Removed excessive debug logging that was added during development to make
the PR more suitable for upstream review:
- Removed 7 debug statements from OpenAIClient.js
- Removed all console.log statements from packages/api/src/utils/env.ts
- Removed debug logging from bedrock/options.js
- Removed debug logging from custom/initialize.js
- Removed debug statement from AuthController.js
This reduces the changeset by ~50 lines while maintaining full functionality
of the OpenID federated token template variable feature.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test(openid): add comprehensive unit tests for template variable substitution
- Add 34 unit tests for OIDC token utilities (oidc.spec.ts)
- Test coverage for token extraction, validation, and placeholder processing
- Integration tests for full OpenID token flow
- All tests pass with comprehensive edge case coverage
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* test: fix OpenID federated tokens test failures
- Add serverMetadata() mock to openid-client mock configuration
* Fixes TypeError in openIdJwtStrategy.js where serverMetadata() was being called
* Mock now returns jwks_uri and end_session_endpoint as expected by the code
- Update outdated initialize.spec.js test
* Remove test expecting resolveHeaders call during initialization
* Header resolution was refactored to be deferred until LLM request time
* Update test to verify options are returned correctly with useLegacyContent flag
Fixes#9931 CI failures for backend unit tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: fix package-lock.json conflict
* chore: sync package-log with upstream
* chore: cleanup
* fix: use createSafeUser
* fix: fix createSafeUser signature
* chore: remove comments
* chore: purge comments
* fix: update Jest testPathPattern to testPathPatterns for Jest 30+ compatibility
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Denis Ramic <denis.ramic@nfon.com>
Co-authored-by: kristjanaapro <kristjana@apro.is>
chore: import order and add back JSDoc for OpenID JWT callback
* fix: change google multimodal attachments to use type: 'media'
* chore: Update @librechat/agents to version 3.0.27 in package.json and package-lock.json
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* Added a new `isIP` function for validating IP addresses in both Node.js and browser environments, replacing the previous reliance on the Node.js `net` module.
* Updated domain extraction and validation logic to utilize the new `isIP` function, ensuring consistent IP validation across the application.
* Enhanced handling of IPv4 and IPv6 addresses, including proper formatting for URLs.
* 🔒 feat: Enhance SSRF Protection with Comprehensive IP and Domain Validation
* Added extensive tests for validating IP addresses and domains to prevent SSRF attacks, including checks for internal, private, and link-local addresses.
* Improved domain validation logic to handle various edge cases, ensuring only legitimate requests are processed.
* Implemented security measures against common cloud provider metadata access and internal service exploitation.
* Updated existing tests to reflect changes in validation logic and ensure robust security coverage.
* chore: cleanup comments
* 🔒 feat: Improve Domain Validation Logic for Enhanced Security
* Added logic to extract and normalize hostnames from client-provided domains, including handling of URLs and IP addresses.
* Implemented checks using Node.js's net module to validate IP addresses, ensuring robust domain validation.
* Updated existing validation conditions to enhance security against potential SSRF attacks.
* feat: Additional Protocol Checks and IPv6 Support
* Added tests to reject unsupported protocols (FTP, WebSocket, file) in client domains to strengthen SSRF protection.
* Improved domain extraction logic to preserve brackets for IPv6 addresses, ensuring correct URL formatting.
* Updated validation logic to handle various edge cases for client-provided domains, enhancing overall security.
* feat: Expand Domain Validation Tests for Enhanced SSRF Protection
* Added comprehensive tests for handling various URL formats, including IPv6 addresses, authentication credentials, and special characters in paths.
* Implemented additional validation scenarios for client domains, covering edge cases such as malformed URLs, empty strings, and unsupported protocols.
* Enhanced handling of internationalized domain names and localhost variations to ensure robust domain extraction and validation.
* chore: Add experimental backend server for multi-pod simulation
* Introduced a new backend script (`experimental.js`) to manage a clustered server environment with Redis cache flushing on startup.
* Updated `package.json` to include a new script command for the experimental backend.
* This setup aims to enhance scalability and performance for production environments.
* refactor: Remove server disconnection handling logic from useMCPServerManager
TooltipAnchor was automatically adding an `aria-describedby`
tag which often duplicated the labeling already present inside
of the anchor. E.g., the screen reader might say
"New Chat, New Chat, button" instead of just "New Chat, button."
I've removed the TooltipAnchor's automatic `aria-describedby` and
worked to make sure that anyone using TooltipAnchor properly defines
its labeling.
* feat: Add support for model in token configurations and tests
* chore: Update @librechat/agents to version 3.0.26 in package.json and package-lock.json
* 🔧 fix: Enhance error handling for agents system in uncaughtException logger
* Added specific logging for errors originating from the agents system to improve debugging and maintain application stability.
* 📦 chore: Update dependencies for `@librechat/agents` and related packages to v3.0.25 and improve version consistency across modules
* 🔧 fix: Handle errors when fetching server tools and log missing tools in MCP tools controller, to prevent all MCP tools from not getting listed
* 🔧 fix: Remove trailing colons from error messages in MCPConnection class
* chore: Update test command patterns in package.json for cache integration tests
* Refactored `openFileDialog` to use `useCallback` for better performance.
* Introduced `handleSelectFileClick` to manage file selection click events, enhancing user interaction.
* ✨ feat: Enhance agent avatar management with upload and reset functionality
* ✨ feat: Refactor AvatarMenu to use DropdownPopup for improved UI and functionality
* ✨ feat: Improve avatar upload handling in AgentPanel to suppress misleading "no changes" toast
* ✨ feat: Refactor toast message handling and payload composition in AgentPanel for improved clarity and functionality
* ✨ feat: Enhance agent avatar functionality with upload, reset, and validation improvements
* ✨ feat: Refactor agent avatar upload handling and enhance related components for improved functionality and user experience
* feat(agents): tighten ACL, harden GETs/search, and sanitize action metadata
stop persisting refreshed S3 URLs on GET; compute per-response only
enforce ACL EDIT on revert route; remove legacy admin/author/collab checks
sanitize action metadata before persisting during duplication (api_key, oauth_client_id, oauth_client_secret)
escape user search input, cap length (100), and use Set for public flag mapping
add explicit req.file guard in avatar upload; fix empty catch lint; remove unused imports
* feat: Remove outdated avatar-related translation keys
* feat: Improve error logging for avatar updates and streamline file input handling
* feat(agents): implement caching for S3 avatar refresh in agent list responses
* fix: replace unconventional 'void e' with explicit comment to clarify intentionally ignored error
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat(agents): enhance avatar handling and improve search functionality
* fix: clarify intentionally ignored error in agent list handler
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* chore: update @librechat/agents dependency to version 3.0.18
* refactor: add optional metadata field to message schema and types
* chore: update @librechat/agents to v3.0.19
* refactor: update return type of sendCompletion method to include metadata
* chore: linting
* chore: update @librechat/agents dependency to v3.0.20
* refactor: implement agent labeling for conversation history in multi-agent scenarios
* refactor: improve error handling for capturing agent ID map in AgentClient
* refactor: clear agentIdMap and related properties during client disposal to prevent memory leaks
* chore: update sendCompletion method for FakeClient to return an object with completion and metadata fields
* ✨ feat: Implement scanIterator method for Redis cluster client
This resolves the bug where `ServerConfigsCacheRedis#getAll` returns an empty object when a Redis Cluster (instead of a single node server is used)
* ✨ feat: Update cache integration tests for Redis cluster support
* chore: update js-yaml to v4.1.1
* chore: update eslint to v9.39.1 in package.json and package-lock.json
* chore: update prettier-eslint to v16.4.2 in package.json and package-lock.json
* chore: update @eslint/eslintrc to v3.3.1 in package.json and package-lock.json
* chore: update ts-jest to v29.4.5 in package.json and package-lock.json
* chore: update jest to version 30.2.0 across multiple packages and update related dependencies
* feat: Integrate logger for MessageIcon component
* feat: Enhance artifact sharing functionality with updated path checks and read-only state management
* feat: Refactor Thinking and Reasoning components for improved structure and styling
* feat: Enhance artifact sharing with context value management and responsive layout
* feat: Enhance ShareView with theme and language management features
* feat: Improve ThinkingButton accessibility and styling for better user interaction
* feat: Introduce isArtifactRoute utility for route validation in Artifact components
* feat: Add latest message text extraction in SharedView for improved message display
* feat: Update locale handling in SharedView for dynamic date formatting
* feat: Refactor ArtifactsContext and SharedView for improved context handling and styling adjustments
* feat: Enhance artifact panel size management with local storage integration
* chore: imports
* refactor: move ShareArtifactsContainer out of ShareView
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: Add Bedrock Cache Control Functionality
- fix: Update Bedrock Cache Control to Require cachePoint as a Separate Content Block
- Modified the addBedrockCacheControl function to ensure cachePoint is added as a separate content block in the content array, rather than as a property of text objects.
- refactor: move addBedrockCacheControl over to packages/api
- ci: add tests for addBedrockCacheControl until full coverage reached
* ci: add test similar to example from the langchain PR
* refactor: move addBedrockCacheControl logic and tests to agents repository
* chore: remove extraneous comment
* chore: update @librechat/agents dependency to version 3.0.12
* chore: update @librechat/agents dependency to version 3.0.13
* chore: update @librechat/agents dependency to version 3.0.14
* chore: update @librechat/agents to v3.0.15
* chore: update default value for prompt cache setting to true
* refactor: set default promptCache to true for claude and nova models
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: integrate Helicone AI gateway provider
- Add Helicone provider support with automatic model fetching
- Implement custom API logic for Helicone model registry endpoint
- Enable access to 75+ models from multiple AI providers through Helicone gateway
- Add Helicone to supported providers list in README
- Include Helicone configuration in example YAML
* docs: add Helicone to supported providers list
* fix comments
* fixed backgroundless helicone icon asset
* removed unecessesary changes
* replace svg helicone image instead of png
* feat: Add error handling for model refusal and update translations
* refactor: error handling in AgentClient to improve logging and cleanup process
* refactor: Update error message for response refusal to improve clarity
* ✨ feat: Enhance Artifact Management with Version Control and UI Improvements
✨ feat: Improve mobile layout and responsiveness in Artifacts component
✨ feat: Refactor imports and remove unnecessary props in Artifact components
✨ feat: Enhance Artifacts and SidePanel components with improved mobile responsiveness and layout transitions
feat: Enhance artifact panel animations and improve UI responsiveness
- Updated Thinking component button styles for smoother transitions.
- Implemented dynamic rendering for artifacts panel with animation effects.
- Refactored localization keys for consistency across multiple languages.
- Added new CSS animations for iOS-inspired smooth transitions.
- Improved Tailwind CSS configuration to support enhanced animation effects.
✨ feat: Add fullWidth and icon support to Radio component for enhanced flexibility
refactor: Remove unused PreviewProps import in ArtifactPreview component
refactor: Improve button class handling and blur effect constants in Artifact components
✨ feat: Refactor Artifacts component structure and add mobile/desktop variants for improved UI
chore: Bump @librechat/client version to 0.3.2
refactor: Update button styles and transition durations for improved UI responsiveness
refactor: revert back localization key
refactor: remove unused scaling and animation properties for cleaner CSS
refactor: remove unused animation properties for cleaner configuration
* ✨ refactor: Simplify className usage in ArtifactTabs, ArtifactsHeader, and SidePanelGroup components
* refactor: Remove cycleArtifact function from useArtifacts hook
* ✨ feat: Implement Chromium resize lag fix with performance optimizations and new ArtifactsPanel component
* ✨ feat: Update Badge component for responsive design and improve tap scaling behavior
* chore: Update react-resizable-panels dependency to version 3.0.6
* ✨ feat: Refactor Artifacts components for improved structure and performance; remove unused files and optimize styles
* ✨ style: Update text color for improved visibility in Artifacts component
* ✨ style: Remove text color class for improved Spinner styling in Artifacts component
* refactor: Split EditorContext into MutationContext and CodeContext to optimize re-renders; update related components to use new hooks
* refactor: Optimize debounced mutation handling in CodeEditor component using refs to maintain current values and reduce re-renders
* fix: Correct endpoint for message artifacts by changing URL segment from 'artifacts' to 'artifact'
* feat: Enhance useEditArtifact mutation with optimistic updates and rollback on error; improve type safety with context management
* fix: proper switch to preview as soon as artifact becomes enclosed
* refactor: Remove optimistic updates from useEditArtifact mutation to prevent errors; simplify onMutate logic
* test: Add comprehensive unit tests for useArtifacts hook to validate artifact handling, tab switching, and state management
* test: Enhance unit tests for useArtifacts hook to cover new conversation transitions and null message handling
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* 🔒 feat: Implement idempotency check for OAuth flow completion
- Added a check to prevent duplicate token exchanges if the OAuth flow has already been completed.
- Updated the OAuth callback route to redirect appropriately when a completed flow is detected.
- Refactored token storage logic to use original flow state credentials instead of updated ones.
- Enhanced tests to cover the new idempotency behavior and ensure correct handling of OAuth flow states.
* chore: add back scope for logging
* refactor: Add isFlowStale method to FlowStateManager for stale flow detection
- Implemented a new method to check if a flow is stale based on its age and status.
- Updated MCPConnectionFactory to utilize the isFlowStale method for cleaning up stale OAuth flows.
- Enhanced logging to provide more informative messages regarding flow status and age during cleanup.
* test: Add unit tests for isFlowStale method in FlowStateManager
- Implemented comprehensive tests for the isFlowStale method to verify its behavior across various flow statuses (PENDING, COMPLETED, FAILED) and age thresholds.
- Ensured correct handling of edge cases, including flows with missing timestamps and custom stale thresholds.
- Enhanced test coverage to validate the logic for determining flow staleness based on createdAt, completedAt, and failedAt timestamps.
* feat: add support for known/add/drop parameters in Anthropic and Google LLM configurations
* ci: add tests for web search support for Anthropic and Google configurations with addParams and dropParams handling
- Implemented validation for OpenAPI specifications to ensure the server URL matches the client-provided domain, preventing SSRF attacks.
- Added domain extraction and validation functions to improve security checks.
- Updated relevant services and routes to utilize the new validation logic, ensuring robust handling of client-provided domains against the OpenAPI spec.
- Introduced comprehensive tests to validate the new security features and ensure correct behavior across various scenarios.
- Added DEBUG_MESSAGE_LENGTH constant to allow dynamic adjustment of debug message length based on environment variable.
- Updated logging format to utilize the new constant for truncating debug messages, enhancing flexibility in log output.
* refactor: add image file size validation as part of payload build
* feat: implement file size and MIME type filtering in endpoint configuration
* chore: import order
* feat: add filterFilesByEndpointConfig to filter disabled file processing by provider
* chore: explicit define of endpointFileConfig for better debugging
* refactor: move `normalizeEndpointName` to data-provider as used app-wide
* chore: remove overrideEndpoint from useFileHandling
* refactor: improve endpoint file config selection
* refactor: update filterFilesByEndpointConfig to accept structured parameters and improve endpoint file config handling
* refactor: replace defaultFileConfig with getEndpointFileConfig for improved file configuration handling across components
* test: add comprehensive unit tests for getEndpointFileConfig to validate endpoint configuration handling
* refactor: streamline agent endpoint assignment and improve file filtering logic
* feat: add error handling for disabled file uploads in endpoint configuration
* refactor: update encodeAndFormat functions to accept structured parameters for provider and endpoint
* refactor: streamline requestFiles handling in initializeAgent function
* fix: getEndpointFileConfig partial config merging scenarios
* refactor: enhance mergeWithDefault function to support document-supported providers with comprehensive MIME types
* refactor: user-configured default file config in getEndpointFileConfig
* fix: prevent file handling when endpoint is disabled and file is dragged to chat
* refactor: move `getEndpointField` to `data-provider` and update usage across components and hooks
* fix: prioritize endpointType based on agent.endpoint in file filtering logic
* fix: prioritize agent.endpoint in file filtering logic and remove unnecessary endpointType defaulting
* chore: temp. remove @librechat/agents
* 🔧 chore: update @langchain/core to version 0.3.79
* chore: update dependencies for @langchain/core and add back latest @librechat/agents
* chore: update @librechat/agents to version 3.0.11
* fix: enhance error handling for uncaught exceptions due to abort errors
* fix: standardize warning message for uncatchable abort errors
* fix: improve tool call handling in ModelEndHandler for unprocessed edge case
* fix: prevent content type mismatch in message updates and preserve args in final updates
* chore: add debug logging for client disposal in disposeClient function
* fix: update agent context handling in ModelEndHandler due to new MultiAgentGraph
* refactor: streamline client cleanup process by utilizing property arrays for potential circular reference removal
* chore: correct type for ServerRequest
* chore: improve ServerRequest typing across several modules
* feat: Add PDF configured limit validation
- Introduced comprehensive tests for PDF validation across multiple providers, ensuring correct behavior for file size limits and edge cases.
- Enhanced the `validatePdf` function to accept an optional configured file size limit, allowing for stricter validation based on user configurations.
- Updated related functions to utilize the new validation logic, ensuring consistent behavior across different providers.
* chore: Update Request type to ServerRequest in audio and video encoding modules
* refactor: move `getConfiguredFileSizeLimit` utility
* feat: Add video and audio validation with configurable size limits
- Introduced `validateVideo` and `validateAudio` functions to validate media files against provider-specific size limits.
- Enhanced validation logic to consider optional configured file size limits, allowing for more flexible file handling.
- Added comprehensive tests for video and audio validation across different providers, ensuring correct behavior for various scenarios.
* refactor: Update PDF and media validation to allow higher configured limits
- Modified validation logic to accept user-configured file size limits that exceed provider defaults, ensuring correct acceptance of files within the specified range.
- Updated tests to reflect changes in validation behavior, confirming that files are accepted when within the configured limits.
- Enhanced documentation in tests to clarify expected outcomes with the new validation rules.
* chore: Add @types/node-fetch dependency to package.json and package-lock.json
- Included the @types/node-fetch package to enhance type definitions for node-fetch usage.
- Updated package-lock.json to reflect the addition of the new dependency.
* fix: Rename FileConfigInput to TFileConfig
* ✨ feat: Enhance DELETE /all endpoint to remove shared links alongside conversations and tool calls
- Added functionality to delete all shared links for a user when clearing conversations.
- Introduced comprehensive tests to ensure correct behavior and error handling for the new deletion process.
* ✨ feat: Implement deleteConvoSharedLink method and update conversation deletion logic to remove associated shared links
* chore: remove `@langchain/community` dependency
* refactor: remove SerpAPI integration and update related imports
* chore: remove legacy code with unnecessary dependencies
* chore: cleanup packages
* chore: cleanup packages
* chore: update openai dependency version to 5.10.1
* chore: add back @librechat/agents dependency
* chore: downgrade openai dependency from 5.10.1 to 5.8.2
* Remove dependency on @librechat/agents from the API package
* chore: add @librechat/agents dependency to the API package
* fix: add useLegacyContent property to RunAgent type and propagate it in createRun function
* chore: remove openai dependency version 5.10.1 from package.json
* feat: Add support for agent handoffs with edges in agent forms and schemas
chore: Mark `agent_ids` field as deprecated in favor of edges across various schemas and types
chore: Update dependencies for @langchain/core and @librechat/agents to latest versions
chore: Update peer dependency for @librechat/agents to version 3.0.0-rc2 in package.json
chore: Update @librechat/agents dependency to version 3.0.0-rc3 in package.json and package-lock.json
feat: first pass, multi-agent handoffs
fix: update output type to ToolMessage in memory handling functions
fix: improve type checking for graphConfig in createRun function
refactor: remove unused content filtering logic in AgentClient
chore: update @librechat/agents dependency to version 3.0.0-rc4 in package.json and package-lock.json
fix: update @langchain/core peer dependency version to ^0.3.72 in package.json and package-lock.json
fix: update @librechat/agents dependency to version 3.0.0-rc6 in package.json and package-lock.json; refactor stream rate handling in various endpoints
feat: Agent handoff UI
chore: update @librechat/agents dependency to version 3.0.0-rc8 in package.json and package-lock.json
fix: improve hasInfo condition and adjust UI element classes in AgentHandoff component
refactor: remove current fixed agent display from AgentHandoffs component due to redundancy
feat: enhance AgentHandoffs UI with localized beta label and improved layout
chore: update @librechat/agents dependency to version 3.0.0-rc10 in package.json and package-lock.json
feat: add `createSequentialChainEdges` function to add back agent chaining via multi-agents
feat: update `createSequentialChainEdges` call to only provide conversation context between agents
feat: deprecate Agent Chain functionality and update related methods for improved clarity
* chore: update @librechat/agents dependency to version 3.0.0-rc11 in package.json and package-lock.json
* refactor: remove unused addCacheControl function and related imports and import from @librechat/agents
* chore: remove unused i18n keys
* refactor: remove unused format export from index.ts
* chore: update @librechat/agents to v3.0.0-rc13
* chore: remove BEDROCK_LEGACY provider from Providers enum
* chore: update @librechat/agents to version 3.0.2 in package.json
* Fixed upload to provider for custom endpoints + unit tests
* fix: add support back for agents to be able to use Upload to Provider with supported providers
* ci: add test for agents endpoint still recognizing document supported providers
* chore: address ESLint suggestions
* Improved unit tests
* Linting error on unit tests fixed
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
* refactor: Restructure MCP registry system with caching
- Split MCPServersRegistry into modular components:
- MCPServerInspector: handles server inspection and health checks
- MCPServersInitializer: manages server initialization logic
- MCPServersRegistry: simplified registry coordination
- Add distributed caching layer:
- ServerConfigsCacheRedis: Redis-backed configuration cache
- ServerConfigsCacheInMemory: in-memory fallback cache
- RegistryStatusCache: distributed leader election state
- Add promise utilities (withTimeout) replacing Promise.race patterns
- Add comprehensive cache integration tests for all cache implementations
- Remove unused MCPManager.getAllToolFunctions method
* fix: Update OAuth flow to include user-specific headers
* chore: Update Jest configuration to ignore additional test files
- Added patterns to ignore files ending with .helper.ts and .helper.d.ts in testPathIgnorePatterns for cleaner test runs.
* fix: oauth headers in callback
* chore: Update Jest testPathIgnorePatterns to exclude helper files
- Modified testPathIgnorePatterns in package.json to ignore files ending with .helper.ts and .helper.d.ts for cleaner test execution.
* ci: update test mocks
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: Reasoning components with independent toggle buttons
- Refactored ThinkingButton to remove unnecessary state and props.
- Updated ContentParts to simplify content rendering and remove hover handling.
- Improved Reasoning component to include independent toggle functionality for each THINK part.
- Adjusted styles for better layout consistency and user experience.
* refactor: isolate hover effects for Reasoning
- Updated ThinkingButton to improve hover effects and layout consistency.
- Refactored Reasoning component to include a new wrapper class for better styling.
- Adjusted icon visibility and transitions for a smoother user experience.
* fix: Prevent rendering of empty messages in Chat component
- Added a check to skip rendering if the message text is only whitespace, improving the user interface by avoiding empty containers.
* chore: Replace div with fragment in Thinking component for cleaner markup
* chore: move Thinking component to Content Parts directory
* refactor: prevent rendering of whitespace-only text in Part component only for edge cases
* ✨ feat: Refactor error handling and improve loading states in MessageContent component
* ✨ feat: Enhance Thinking and ContentParts components with improved hover functionality and clipboard support
* fix: Adjust padding in Thinking and ContentParts components for consistent layout
* ✨ feat: Add response label and improve message editing UI with contextual indicators
* ✨ feat: Add isEditing prop to Feedback and Fork components for improved editing state handling
* refactor: Remove isEditing prop from Feedback and Fork components for cleaner state management
* refactor: Migrate state management from Recoil to Jotai for font size and show thinking features
* refactor: Separate ToggleSwitch into RecoilToggle and JotaiToggle components for improved clarity and state management
* refactor: Remove unnecessary comments in ToggleSwitch and MessageContent components for cleaner code
* chore: reorder import statements in Thinking.tsx
* chore: reorder import statement in EditTextPart.tsx
* chore: reorder import statement
* chore: Reorganize imports in ToggleSwitch.tsx
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🦙 fix: Ollama Custom Headers
* chore: Correct import order for resolveHeaders in OllamaClient.js
* fix: Improve error logging for Ollama API model fetch failure
* ci: update Ollama model fetch tests
* ci: Add unit test for passing headers and user object to Ollama fetchModels
* Refactored the logic for determining max output tokens in the agent initialization process.
* Changed variable names for clarity, updating from `maxTokens` to `maxOutputTokens` to better reflect their purpose.
* Adjusted calculations for `maxContextTokens` to use the new `maxOutputTokens` variable.
* 📫 refactor: Enhance OpenID email Fallback
* Updated email retrieval logic to use preferred_username or upn if email is not available.
* Adjusted logging and user data assignment to reflect the new email handling approach.
* Ensured email domain validation checks the correct email source.
* 🔄 refactor: Update Email Domain Validation Logic
* Modified `isEmailDomainAllowed` function to return true for falsy emails and missing domain restrictions.
* Added new test cases to cover scenarios with and without domain restrictions.
* Ensured proper validation when domain restrictions are present.
* fix: Sanitize LLM titles by stripping <think> tags and fix modal overflow
* chore: linting
* chore: Simplify title sanitization by removing unnecessary variable assignment and import order
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 📦 feat: `@librechat/agents` v2.4.87 for LangFuse Support
* 📦 chore: update @librechat/agents to v2.4.88 in package.json and package-lock.json
* 📦 chore: update @librechat/agents to v2.4.89
* feat: Add runName configuration to AgentClient and Memory agent for improved tracing
* chore: correct startupConfig usage in ImportConversations component
* refactor: properly process configured speechToText and textToSpeech settings in getCustomConfigSpeech
* refactor: proxy configuration by utilizing HttpsProxyAgent for OpenAI Image Edits
* Possibility to add extra env values to the deployment
* Fix: Custom environment variables should be placed after the predefined environment variables
* chore: add i18n localization comment for AlwaysMakeProd component
* feat: enhance accessibility by adding aria-label and aria-labelledby to Switch component
* feat: add aria-labels for accessibility in Agent and Assistant avatar buttons
* fix: add switch aria-labels for accessibility in various components
* feat: add aria-labels and localization keys for accessibility in DataTable, DataTableColumnHeader, and OGDialogTemplate components
* chore: refactor out nested ternary
* feat: add aria-label to DataTable filter button for My Files modal
* feat: add aria-labels for Buttons and localization strings
* feat: add aria-labels to Checkboxes in Agent Builder
* feat: enhance accessibility by adding aria-label and aria-labelledby to Checkbox component
* feat: add aria-label to FileSearchCheckbox in Agent Builder
* feat: add aria-label to Prompts text input area
* feat: enhance accessibility by adding aria-label and aria-labelledby to TextAreaAutosize component
* feat: remove improper role: "list" prop from List in Conversations.tsx to enhance accessibility and stop aria rules conflicting within react-virtualized component
* feat: enhance accessibility by allowing tab navigation and adding ring highlights for conversation title editing accept/reject buttons
* feat: add aria-label to Copy Link button in the conversation share modal
* feat: add title to QR code svg in conversation share modal to describe the image content
* feat: enhance accessibility by making Agent Avatar upload keyboard navigable and round out highlight border on focus
* feat: enhance accessibility by adding aria attributes around alerting users with screen readers to invalid email address inputs in the Agent Builder
* feat: add aria-labels to buttons in Advanced panel of Agent Builder
* feat: enhance accessibility by making FileUpload and Clear All buttons in PresetItems keyboard navigable
* feat: enchance accessiblity by indexing view and delete button aria-labels in shared links management modal to their specific chat titles
* feat: add border highlighting on focus for AnimatedSearchInput
* feat: add category description to aria-labels for prompts in ListCard
* feat: add proper scoping to rows and columns in table headers
* feat: add localized aria-labelling to EditTextPart's TextAreaAutosize component and base dynamic paramters panel components and their supporting translation keys
* feat: add localized aria-labels and aria-labelledBy to Checkbox components without them
* feat: add localized aria-labeledBy for endpoint settings Sliders
* feat: add localized aria-labels for TextareaAutosize components
* chore: remove unused i18n string
* feat: add localized aria-label for BookmarkForm Checkbox
* fix: add stopPropagation onKeyDown for Preview and Edit menu items in prompts that was causing the prompts to inadvertently be sent when triggered with keyboard navigation when Auto-send Prompts was toggled on
* fix: switch TableCell to TableHead for title cells according to harvard issue #789
* fix: add more descriptive localization key for file filter button in DataTable
* chore: remove self-explanatory code comment from RenameForm
* fix: remove stray bg-yellow highlight that was left in during debugging
* fix: add aria-label to model configurator panel back button
* fix: undo incorrect hoist of tool name split for aria-label and span in MCPInput
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: remove `useChatContext` from `useSelectMention`, explicitly pass `conversation` object
* feat: ephemeral agents via model specs
* refactor: Sync Jotai state with ephemeral agent state, also when Ephemeral Agent has no MCP servers selected
* refactor: move `useUpdateEphemeralAgent` to store and clean up imports
* refactor: reorder imports and invalidate queries for mcpConnectionStatus in event handler
* refactor: replace useApplyModelSpecEffects with useApplyModelSpecAgents and update event handlers to use new agent template logic
* ci: update useMCPSelect test to verify mcpValues sync with empty ephemeralAgent.mcp
* filter out unavailable servers
* bump render time
* Fix import path for useGetStartupConfig
* refactor: Change configuredServers to use Set for improved filtering of available MCPs
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: Default Model Spec Retrieval Logic, allowing last selected spec on new chat if last selection was a spec
* chore: Replace hardcoded 'new' conversation ID with Constants.NEW_CONVO for consistency
* chore: remove redundant condition for model spec preset selection in useNewConvo hook
* updated gpt5-pro
it is here and on openrouter
https://platform.openai.com/docs/models/gpt-5-pro
* feat: Add gpt-5-pro pricing
- Implemented handling for the new gpt-5-pro model in the getValueKey function.
- Updated tests to ensure correct behavior for gpt-5-pro across various scenarios.
- Adjusted token limits and multipliers for gpt-5-pro in the tokens utility files.
- Enhanced model matching functionality to include gpt-5-pro variations.
* refactor: optimize model pricing and validation logic
- Added new model pricing entries for llama2, llama3, and qwen variants in tx.js.
- Updated tokenValues to include additional models and their pricing structures.
- Implemented validation tests in tx.spec.js to ensure all models resolve correctly to pricing.
- Refactored getValueKey function to improve model matching and resolution efficiency.
- Removed outdated model entries from tokens.ts to streamline pricing management.
* fix: add missing pricing
* chore: update model pricing for qwen and gemma variants
* chore: update model pricing and add validation for context windows
- Removed outdated model entries from tx.js and updated tokenValues with new models.
- Added a test in tx.spec.js to ensure all models with pricing have corresponding context windows defined in tokens.ts.
- Introduced 'command-text' model pricing in tokens.ts to maintain consistency across model definitions.
* chore: update model names and pricing for AI21 and Amazon models
- Refactored model names in tx.js for AI21 and Amazon models to remove versioning and improve consistency.
- Updated pricing values in tokens.ts to reflect the new model names.
- Added comprehensive tests in tx.spec.js to validate pricing for both short and full model names across AI21 and Amazon models.
* feat: add pricing and validation for Claude Haiku 4.5 model
* chore: increase default max context tokens to 18000 for agents
* feat: add Qwen3 model pricing and validation tests
* chore: reorganize and update Qwen model pricing in tx.js and tokens.ts
---------
Co-authored-by: khfung <68192841+khfung@users.noreply.github.com>
* fix: reapply chat font size on load
* refactor: streamline font size handling in localStorage
* fix: update matchMedia mock to accurately reflect desktop and touchscreen capabilities
* refactor: implement Jotai for font size management and initialize on app load
- Replaced Recoil with Jotai for font size state management across components.
- Added a new `fontSize` atom to handle font size changes and persist them in localStorage.
- Implemented `initializeFontSize` function to apply saved font size on app load.
- Updated relevant components to utilize the new font size atom.
---------
Co-authored-by: ddooochii <ddooochii@gmail.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: Remove ephemeral cache control from document encoding function
* refactor: Improve document encoding types and add file context for anthropic messages api
- Added AnthropicDocumentBlock interface to define the structure for documents from the Anthropic provider.
- Updated encodeAndFormatDocuments function to utilize the new type and include optional context for filenames.
- Refactored DocumentResult to use a union type for various document formats, improving type safety and clarity.
* 🔧 feat: Enhance Redis Configuration and Connection Handling in Cache Flush Utility
- Added support for Redis username, password, and CA certificate.
- Improved Redis client creation to handle both cluster and single instance configurations.
- Implemented a helper function to read the Redis CA certificate with error handling.
- Updated connection logic to include timeout and error handling for Redis connections.
* refactor: flush cache if redis URI is defined
Remove deprecated OpenAI models and add latest GPT-5, o3/o4, and GPT-4.1 series models based on current API offerings as of October 2025.
Removed deprecated models:
- gpt-4.5-preview (deprecated July 2025)
- o1-preview, o1-mini (deprecated July/October 2025)
- gpt-4-vision-preview (shut down December 2024)
- Dated GPT-3.5 and GPT-4 variants (consolidated into base versions)
Added new flagship models:
- GPT-5 series: gpt-5, gpt-5-mini, gpt-5-nano
- o3/o4 reasoning models: o3, o4-mini, o3-pro, o3-mini
- GPT-4.1 series: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano
Reorganized list with newest models first for better discoverability.
References:
- https://platform.openai.com/docs/models
- https://platform.openai.com/docs/deprecations
Enables word wrapping for text, markdown, and plaintext code blocks
to prevent horizontal scrolling on long lines. Improves readability
for prose content in fenced code blocks.
* Add Markdown rendering support for artifacts
* Add tests
* Remove custom code for mermaid
* Remove unnecessary dark mode hook
* refactor: optimize mermaid dependencies
- Added support for additional MIME types in artifact templates.
- Updated mermaidDependencies to include new packages: class-variance-authority, clsx, tailwind-merge, and @radix-ui/react-slot.
- Refactored zoom and refresh icons in MermaidDiagram component for improved clarity and maintainability.
* fix: add Markdown support for artifacts rendering
* feat: support 'text/md' as an additional MIME type for Markdown artifacts
* refactor: simplify markdownDependencies structure in artifacts utility
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: Add group field to modelSpecs for flexible grouping
* resolve lint issues
* fix test
* docs: enhance modelSpecs group field documentation for clarity
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* Update prompt value for gemini-2.5-flash-lite
New Input price (text, image, video) --> $0.10
https://ai.google.dev/gemini-api/docs/pricing
* Fix formatting of gemini-2.5-flash-lite values
changed 0.10 to 0.1 to follow standards
* feat: Enhance shared link functionality with target message support
* refactor: Remove comment on compound index in share schema
* chore: Reorganize imports in ShareButton component for clarity
* refactor: Integrate Recoil for latest message tracking in ShareButton component
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
- problem: `addImageUrls` had a side effect that was being leveraged before to populate both the `ocr` message field, now `fileContext`, and `client.options.attachments`, which would record the user's uploaded message attachments to the user message when saved to the database and returned at the end of the request lifecycle
- solution: created dedicated handling for file context, and made sure to populate `allFiles` with non-provider attachments
* chore: enhance logging for latest message actions in message components
* fix: Extract previous convoId from latest text in message helpers and process hooks
- Updated `useMessageHelpers` and `useMessageProcess` to extract `convoId` from the previous text key for improved message handling.
- Refactored `getLengthAndLastTenChars` to `getLengthAndLastNChars` for better flexibility in character length retrieval.
- Introduced `getLatestContentForKey` function to streamline content extraction from messages.
* chore: Enhance logging for clearing latest messages in conversation hooks
* refactor: Update message key formatting for improved URL parameter handling
- Modified `getLatestContentForKey` to change the format from `${text}-${i}` to `${text}&i=${i}` for better URL parameter structure.
- Adjusted `getTextKey` to increase character length retrieval from 12 to 16 in `getLengthAndLastNChars` for enhanced text processing.
* refactor: Simplify convoId extraction and enhance message formatting
- Updated `useMessageHelpers` and `useMessageProcess` to extract `convoId` using a new format for improved clarity.
- Refactored `getLatestContentForKey` to streamline content formatting and ensure consistent use of `Constants.COMMON_DIVIDER` for better message structure.
- Removed redundant length and last character extraction logic from `getLengthAndLastNChars` for cleaner code.
* chore: linting
* chore: Simplify pre-commit hook by removing unnecessary lines
* feat: Add support for users to be admins when logging in using OpenID
* fix: Linting issues
* fix: whitespace
* chore: add unit tests for OIDC_ADMIN_ROLE
* refactor: Replace custom property retrieval function with lodash's get for improved readability and maintainability
* feat: Enhance OpenID role extraction and error handling in setupOpenId function
- Improved role validation to check for both array and string types.
- Added detailed error messages for missing or invalid role paths in tokens.
- Expanded unit tests to cover various scenarios for nested role extraction and error handling.
* fix: Improve error handling for role extraction in OpenID strategy
- Enhanced validation to check for invalid role types (array or string).
- Updated error messages for clarity when roles are missing or of incorrect type.
- Added unit tests to cover scenarios where roles return invalid types (object, number).
* feat: Implement user role demotion in OpenID strategy when admin role is absent from token
- Added logic to demote users from 'ADMIN' to 'USER' if the admin role is not present in the token.
- Enhanced logging to capture role changes for better traceability.
- Introduced unit tests to verify the demotion behavior and ensure correct handling when admin role environment variables are not configured.
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* Check file size of conversation being imported against a configured max size to prevent bringing down the application by uploading a large file
chore: remove non-english localization as needs to be added via locize
* feat: Implement file size validation for conversation imports to prevent oversized uploads
---------
Co-authored-by: Marc Amick <MarcAmick@jhu.edu>
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🔧 refactor: Improve accessibility and styling in ChatGroupItem and FilterPrompts components
* 🔧 fix: Add button type and keyboard accessibility to dropdown menu trigger in ChatGroupItem
* 🔧 fix(757): Enhance accessibility by updating aria-labels and adding localization for prompt groups
* 🔧 fix(618): Update version to 0.3.1 and enhance accessibility in InfoHoverCard component
* 🔧 fix(618): Update aria-label in InfoHoverCard to use dynamic text prop for improved accessibility
* 🔧 fix: Enhance accessibility by updating aria-labels and roles in Conversations components
* 🔧 fix(620): Enhance accessibility by adding tabIndex to Tabs.Content components in ArtifactTabs, Settings, and Speech components
* refactor: remove RevokeKeysButton component and update related components for accessibility
- Deleted RevokeKeysButton component.
- Updated SharedLinks and General components to use Label for accessibility.
- Enhanced Personalization component with aria-labelledby and aria-describedby attributes.
- Refactored ConversationModeSwitch to use ToggleSwitch for better state management.
- Improved AutoSendTextSelector with local state management and accessibility attributes.
- Replaced Switch components with ToggleSwitch in various Speech and TTS components for consistency.
- Added aria-labelledby attributes to Dropdown components for better accessibility.
- Updated translation.json to include new localization keys and improved existing ones.
- Enhanced Slider component to support aria attributes for better accessibility.
* 🔧 fix: Enhance user feedback for API key operations with success and error messages
* 🔧 fix: Update aria-labels in Avatar component for improved localization and accessibility
* 🔧 fix: Refactor handleFile and handleDrop functions for improved readability and maintainability
* 📎 feat: Direct Provider Attachment Support for Multimodal Content
* 📑 feat: Anthropic Direct Provider Upload (#9072)
* feat: implement Anthropic native PDF support with document preservation
- Add comprehensive debug logging throughout PDF processing pipeline
- Refactor attachment processing to separate image and document handling
- Create distinct addImageURLs(), addDocuments(), and processAttachments() methods
- Fix critical bugs in stream handling and parameter passing
- Add streamToBuffer utility for proper stream-to-buffer conversion
- Remove api/agents submodule from repository
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: remove out of scope formatting changes
* fix: stop duplication of file in chat on end of response stream
* chore: bring back file search and ocr options
* chore: localize upload to provider string in file menu
* refactor: change createMenuItems args to fit new pattern introduced by anthropic-native-pdf-support
* feat: add cache point for pdfs processed by anthropic endpoint since they are unlikely to change and should benefit from caching
* feat: combine Upload Image into Upload to Provider since they both perform direct upload and change provider upload icon to reflect multimodal upload
* feat: add citations support according to docs
* refactor: remove redundant 'document' check since documents are handled properly by formatMessage in the agents repo now
* refactor: change upload logic so anthropic endpoint isn't exempted from normal upload path using Agents for consistency with the rest of the upload logic
* fix: include width and height in return from uploadLocalFile so images are correctly identified when going through an AgentUpload in addImageURLs
* chore: remove client specific handling since the direct provider stuff is handled by the agent client
* feat: handle documents in AgentClient so no need for change to agents repo
* chore: removed unused changes
* chore: remove auto generated comments from OG commit
* feat: add logic for agents to use direct to provider uploads if supported (currently just anthropic)
* fix: reintroduce role check to fix render error because of undefined value for Content Part
* fix: actually fix render bug by using proper isCreatedByUser check and making sure our mutation of formattedMessage.content is consistent
---------
Co-authored-by: Andres Restrepo <andres@thelinuxkid.com>
Co-authored-by: Claude <noreply@anthropic.com>
📁 feat: Send Attachments Directly to Provider (OpenAI) (#9098)
* refactor: change references from direct upload to direct attach to better reflect functionality
since we are just using base64 encoding strategy now rather than Files/File API for sending our attachments directly to the provider, the upload nomenclature no longer makes sense. direct_attach better describes the different methods of sending attachments to providers anyways even if we later introduce direct upload support
* feat: add upload to provider option for openai (and agent) ui
* chore: move anthropic pdf validator over to packages/api
* feat: simple pdf validation according to openai docs
* feat: add provider agnostic validatePdf logic to start handling multiple endpoints
* feat: add handling for openai specific documentPart formatting
* refactor: move require statement to proper place at top of file
* chore: add in openAI endpoint for the rest of the document handling logic
* feat: add direct attach support for azureOpenAI endpoint and agents
* feat: add pdf validation for azureOpenAI endpoint
* refactor: unify all the endpoint checks with isDocumentSupportedEndpoint
* refactor: consolidate Upload to Provider vs Upload image logic for clarity
* refactor: remove anthropic from anthropic_multimodal fileType since we support multiple providers now
🗂️ feat: Send Attachments Directly to Provider (Google) (#9100)
* feat: add validation for google PDFs and add google endpoint as a document supporting endpoint
* feat: add proper pdf formatting for google endpoints (requires PR #14 in agents)
* feat: add multimodal support for google endpoint attachments
* feat: add audio file svg
* fix: refactor attachments logic so multi-attachment messages work properly
* feat: add video file svg
* fix: allows for followup questions of uploaded multimodal attachments
* fix: remove incorrect final message filtering that was breaking Attachment component rendering
fix: manualy rename 'documents' to 'Documents' in git since it wasn't picked up due to case insensitivity in dir name
fix: add logic so filepicker for a google agent has proper filetype filtering
🛫 refactor: Move Encoding Logic to packages/api (#9182)
* refactor: move audio encode over to TS
* refactor: audio encoding now functional in LC again
* refactor: move video encode over to TS
* refactor: move document encode over to TS
* refactor: video encoding now functional in LC again
* refactor: document encoding now functional in LC again
* fix: extend file type options in AttachFileMenu to include 'google_multimodal' and update dependency array to include agent?.provider
* feat: only accept pdfs if responses api is enabled for openai convos
chore: address ESLint comments
chore: add missing audio mimetype
* fix: type safety for message content parts and improve null handling
* chore: reorder AttachFileMenuProps for consistency and clarity
* chore: import order in AttachFileMenu
* fix: improve null handling for text parts in parseTextParts function
* fix: remove no longer used unsupported capability error message for file uploads
* fix: OpenAI Direct File Attachment Format
* fix: update encodeAndFormatDocuments to support OpenAI responses API and enhance document result types
* refactor: broaden providers supported for documents
* feat: enhance DragDrop context and modal to support document uploads based on provider capabilities
* fix: reorder import statements for consistency in video encoding module
---------
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
* 🔧 chore: Update @librechat/agents to v2.4.84 in package.json and package-lock.json
* feat: Serper as new scraperProvider for Web Search and add firecrawlVersion support
* fix: TWebSearchKeys and ensure unique API keys extraction
* chore: Add build:packages script to streamline package builds
- Added a new function `deleteDocumentsWithoutUserField` to remove documents lacking the user field from the specified MeiliSearch index.
- Integrated this function into the `ensureFilterableAttributes` method to clean up orphaned documents when existing messages or conversations are found without a user field.
🔧 feat: Enhance Index Synchronization Logic
- Updated `ensureFilterableAttributes` to return an object indicating whether settings were updated and if orphaned documents were found.
- Integrated orphaned document cleanup directly into the index synchronization process without forcing a full re-sync unless settings were updated.
- Improved logging for clarity on index configuration updates and orphaned document handling.
🔧 feat: Improve Flow State Management in Index Synchronization
- Refactored flow state management logic to ensure cleanup occurs after synchronization, regardless of success or error.
- Enhanced logging for flow state cleanup to provide better visibility into the synchronization process.
- Streamlined the structure of the index synchronization function for improved readability.
* fix: update @librechat/agents to v2.4.83 to handle reasoning edge case encountered with GLM models
* feat: GLM Context Window & Pricing Support
* feat: Add support for glm4 model in token values and tests
* chore: linting for `loadCustomConfig`
* refactor: decouple CDN init and variable/health checks from AppService
* refactor: move AppService to packages/data-schemas
* chore: update AppConfig import path to use data-schemas
* chore: update JsonSchemaType import path to use data-schemas
* refactor: update UserController to import webSearchKeys and redefine FunctionTool typedef
* chore: remove AppService.js
* refactor: update AppConfig interface to use Partial<TCustomConfig> and make paths and fileStrategies optional
* refactor: update checkConfig function to accept Partial<TCustomConfig>
* chore: fix types
* refactor: move handleRateLimits to startup checks as is an effect
* test: remove outdated rate limit tests from AppService.spec and add new handleRateLimits tests in checks.spec
* ⚙️ chore: Resolve Build Warning and `keyvMongo` types
* 🔄 chore: Update mongodb version to ^6.14.2 in package.json and package-lock.json
* chore: remove @langchain/openai dep
* 🔄 refactor: Change log level from warn to debug for missing endpoint config
* 🔄 refactor: Improve temp chat expiration date calculation in tests and implementation
* initialize servers sequentially
* adjust for exported properties that are not nullable anymore
* use underscore separator
* mock with set
* customize init timeout via env var
* refactor for readability, use loaded conns for tool functions
* address PR comments
* clean up fire-and-forget
* fix tests
* Refactor: Moved Redis cache infra logic into `packages/api`
- Moved cacheFactory and redisClients from `api/cache` into `packages/api/src/cache` so that features in `packages/api` can use cache without importing backward from the backend.
- Converted all moved files into TS with proper typing.
- Created integration tests to run against actual Redis servers for redisClients and cacheFactory.
- Added a GitHub workflow to run integration tests for the cache feature.
- Bug fix: keyvRedisClient now implements the PING feature properly.
* chore: consolidate imports in getLogStores.js
* chore: reorder imports
* chore: re-add fs-extra as dev dep.
* chore: reorder imports in cacheConfig.ts, cacheFactory.ts, and keyvMongo.ts
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🧹 chore: Update logger imports to use @librechat/data-schemas across multiple files and remove unused sleep function from queue.js (#9930)
* chore: Replace local isEnabled utility with @librechat/api import across multiple files, update test files
* chore: Replace local logger import with @librechat/data-schemas logger in countTokens.js and fork.js
* chore: Update logs volume path in docker-compose.yml to correct directory
* chore: import order of isEnabled in static.js
* ✨ v0.8.0
* 🔧 chore: Update config version to 1.3.0
* 🔧 chore: Bump @librechat/api version to 1.4.1
* 🔧 chore: Update @librechat/client version to 0.3.1
* 🔧 chore: Bump librechat-data-provider version to 0.8.020
* 🔧 chore: Bump @librechat/data-schemas version to 0.0.23
* Add support for extra secrets and config maps in helm deployment template
* expose single env field in values field instead of extra secret and config map fields
* a small fix
* initialize servers sequentially
* adjust for exported properties that are not nullable anymore
* use underscore separator
* mock with set
* customize init timeout via env var
* feat: Add new Claude models to sharedAnthropicModels list
* chore: use correct claude aliases for default list
* chore: update deepseek model rates for accuracy
* chore: update @librechat/agents dependency to version 2.4.82
* chore: move domain related functions to `packages/api`
* fix: isEmailDomainAllowed for case-insensitive domain matching
- Added tests to validate case-insensitive matching for email domains in various scenarios.
- Updated isEmailDomainAllowed function to convert email domains to lowercase for consistent comparison.
- Improved handling of null/undefined entries in allowedDomains.
* ci: Mock isEmailDomainAllowed in samlStrategy tests
- Added a mock implementation for isEmailDomainAllowed to return true in samlStrategy tests, ensuring consistent behavior during test execution.
* ci: Update import of isEmailDomainAllowed in ldapStrategy tests
- Changed the import of isEmailDomainAllowed from the domains service to the api package for consistency and to reflect recent refactoring.
* fix: Prevent MCPSelect from rendering when not pinned and no values are available
* fix: Exclude 'pinned' keys from timestamped storage cleanup logic
* fix: Safeguard MCPSelect rendering by adding optional chaining for mcpValues
Add ability to configure hostAliases in Helm chart to redirect traffic to proxy servers or custom endpoints via /etc/hosts entries.
Co-authored-by: Feng Lu <feng.lu@kindredgroup.com>
* refactor: move `loadOCRConfig` from `packages/data-provider` to `packages/api` and return `undefined` if not explicitly configured
* fix: loadOCRConfig import from @librechat/api
* refactor: update defaultTextMimeTypes to support virtually all file types for text parsing
* fix: improve OCR capability check and error message for unsupported file types
* ci: remove unnecessary ocr expectation from AppService test
* 🌐 feat: OpenRouter Web Search
- Added tests for handling web_search parameter with OpenRouter in various scenarios.
- Implemented logic to manage web_search in modelOptions and addParams/dropParams.
- Ensured correct configuration of llmConfig and modelKwargs for OpenRouter, including handling of plugins.
- Improved overall integration of OpenRouter with OpenAI API, ensuring expected behavior across different configurations.
* chore: bump @librechat/agents to v2.4.81
- Added tests to validate behavior of web_search parameter in getOpenAIConfig function.
- Implemented logic to handle web_search in addParams and dropParams, ensuring correct precedence and behavior.
- Ensured web_search does not appear in modelKwargs or llmConfig when not applicable.
- Improved overall configuration management for OpenAI API integration.
- Fixed a bug in reinitMCPServer where a user connection was created for an app-level server whenever this server is reinitialized
- Made MCPManager.getUserConnection to return an error if the connection is app-level
- Add MCPManager.getConnection to return either an app connection or a user connection based on the serverName
- Made MCPManager.appConnections public to avoid unnecessary wrapper methods.
* 🕵️ feat: Enhance Index Sync and MeiliSearch filtering for User Field
- Implemented `ensureFilterableAttributes` function to configure MeiliSearch indexes for messages and conversations to filter by user.
- Updated sync logic to trigger a full re-sync if the user field is missing or index settings are modified.
- Adjusted search queries in Conversation and Message models to include user filtering.
- Ensured 'user' field is marked as filterable in MongoDB schema for both messages and conversations.
This update improves data integrity and search capabilities by ensuring user-related data is properly indexed and retrievable.
* fix: message processing in Search component to use linear list and not tree
* feat: Implement user filtering in MeiliSearch for shared links
* refactor: Optimize message search retrieval by batching database calls
* chore: Update MeiliSearch parameters type to use SearchParams for improved type safety
* add use of immutable claims to identify user object
* fix semicolons
* update email attribute on change
* replace ternary expressions
* fix semicolon
* chore: add typing
* chore: reorder fields in `findOpenIDUser`
* refactor: optimize user lookup logic in `findOpenIDUser` function to minimize database roundtrips
* refactor: integrate findOpenIDUser for improved user retrieval in refreshController
* refactor: improve error logging for invalid refresh tokens in refreshController
* ci: mock findUser correctly in openidStrategy tests
* test: add unit tests for findOpenIDUser function to enhance user retrieval logic
---------
Co-authored-by: Joachim Keltsch <joachim.keltsch@daimlertruck.com>
This PR adds DNS configuration support to the LibreChat Helm chart, enabling users to redirect traffic to proxy servers or use custom DNS settings.
## What's Changed
- Added dnsPolicy and dnsConfig fields to deployment.yaml template
- Added DNS configuration options to values.yaml with comprehensive examples
- Created documentation and example configurations
## Use Cases
- Redirect AI service traffic (AWS Bedrock, OpenAI, etc.) to proxy servers
- Use corporate DNS servers for name resolution
- Control traffic routing through custom DNS configurations
- Enforce traffic through security gateways
## Configuration Example
```yaml
dnsPolicy: "None"
dnsConfig:
nameservers:
- "10.0.0.10" # Custom DNS server for redirections
searches:
- "svc.cluster.local"
options:
- name: ndots
value: "2"
```
## Testing Results
✅ Successfully tested with Docker Compose environment
✅ DNS resolution correctly redirects to configured IPs
✅ HTTP requests properly routed to proxy servers
✅ Tested with multiple domains (AWS Bedrock, OpenAI, SageMaker)
Test output:
- bedrock-runtime.us-east-1.amazonaws.com -> 172.25.0.10 ✓
- api.openai.com -> 172.25.0.10 ✓
- sagemaker-runtime.us-east-1.amazonaws.com -> 172.25.0.10 ✓
All DNS redirects working correctly with proxy server receiving traffic.
## Documentation
- Added comprehensive DNS_CONFIGURATION.md guide
- Included examples for common use cases
- Provided troubleshooting steps
## Backward Compatibility
This change is fully backward compatible. If dnsPolicy and dnsConfig are not specified, the default Kubernetes DNS behavior is maintained.
Fixes #[issue_number]
Co-authored-by: LibreChat User <user@example.com>
* feat: support multiple roles in OPENID_REQUIRED_ROLE
- Allow comma-separated roles in OPENID_REQUIRED_ROLE environment variable
- User needs ANY of the specified roles to login (OR logic)
- Maintain backward compatibility with single role configuration
- Add comprehensive test coverage for multiple role scenarios
* Add tests
* Fix linter
* Add missing closing brace
* Add new line
* Simplify tests
* Refresh OpenID verify callback in tests
* Fix OpenID spec and resolve linting errors
* test: Add backward compatibility test for single required role in OpenID strategy
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
- Update MongoDB chart dependency from v16.3.0 to v16.5.45
- Add explicit containerPort configuration with fallback to service.port
- Standardize port references in health probes to use explicit port numbers
- Add targetPort and containerPort fields to service configuration
- Include service type options as inline comment for better clarity
These changes improve the Helm chart's port management flexibility and
bring the MongoDB dependency up to date with the latest stable version.
Co-authored-by: Jerum Hubbert <jerum.hubbert@scientificgames.com>
* refactor: Remove unused imports and consolidate ephemeral agent logic
* refactor: Side Panel agent handling to account for ephemeral agents for UI
* refactor: Replace Constants.EPHEMERAL_AGENT_ID checks with isEphemeralAgent utility for consistency
* ci: AgentPanel tests with additional mock configurations and utility functions
* chore: Improve logging format for initial flow state creation
* refactor: MCP Tool Management with Improved Auth Handling and State Management
- Updated `CustomUserVarsSection` to include optional localization for placeholder text.
- Refactored `MCPToolSelectDialog` to streamline tool addition and management, including improved handling of authentication data.
- Introduced a new `addToolsToForm` function to encapsulate logic for adding tools to the form state.
- Enhanced `useRemoveMCPTool` hook to simplify tool removal logic and ensure proper state updates.
- Added loading state management for custom variable saving to improve user experience.
* refactor: Enhance MCP Tool Removal Logic and Integrate Toast Notifications
- Updated `MCPToolSelectDialog` to utilize the new `removeTool` function from the `useRemoveMCPTool` hook for improved tool removal handling.
- Refactored `useRemoveMCPTool` to accept options for toast notifications, allowing for more flexible user feedback during tool removal.
- Removed the previous inline tool removal logic to streamline the component's code and improve maintainability.
* refactor: Enhance user plugins mutation to invalidate MCP auth values on uninstall
* refactor: Replace refetchQueries with invalidateQueries for improved cache management
* chore: remove unused i18n key
* refactor: Implement gradual backoff polling for oauth connection status with timeout handling
* refactor: Enhance OAuth polling with gradual backoff and timeout handling; update reconnection tracking
* refactor: reconnection timeout behavior in OAuthReconnectionManager and OAuthReconnectionTracker
- Implement tests to verify reconnection timeout handling, including tracking of reconnection states and cleanup of timed-out entries.
- Enhance existing methods in OAuthReconnectionManager and OAuthReconnectionTracker to support timeout checks and cleanup logic.
- Ensure proper handling of multiple servers with different timeout periods and edge cases for active states.
* chore: remove comment
* refactor: Enforce strict 3-minute OAuth timeout with updated polling intervals and improved timeout handling
* refactor: Remove unused polling logic and prevent duplicate polling for servers in MCP server manager
* refactor: Update localization key for no memories message in MemoryViewer
* refactor: Improve MCP tool initialization by handling server failures
- Introduced a mechanism to track failed MCP servers, preventing retries for unavailable servers.
- Added logging for failed tool creation attempts to enhance debugging and monitoring.
* refactor: Update reconnection timeout to enforce a strict 3-minute limit
* ci: Update reconnection timeout tests to reflect a strict 3-minute limit
* ci: Update reconnection timeout tests to enforce a strict 3-minute limit
* chore: Remove unused MCP connection timeout message
🔄 refactor: Optimize MCP Tool Initialization
fix: update tool caching to use separated mcp logic
refactor: Replace `req.user` with `userId` in MCP handling functions
refactor: Replace `req` parameter with `userId` in file search tool functions
fix: Update user connection parameter to use object format in reinitMCPServer
refactor: Simplify MCP tool creation logic and improve handling of tool configurations to avoid capturing too much in closures
refactor: ensure MCP available tools are fetched from cache only when needed
* fix: axios response logging for text parsing, remove console logging, remove jsdoc
* refactor: error logging in logAxiosError function to handle various error types with type guards
* refactor: enhance text parsing with improved error handling and async file reading
* refactor: replace synchronous file reading with asynchronous methods for improved performance and memory management
* ci: update tests
* fix: increment tag counters when forking/duplicating conversations
- Add bulkIncrementTagCounts to update existing tag counts in bulk
- Integrate tag count updates into importBatchBuilder.saveBatch() using Promise.all
- Update frontend mutations to directly update cache instead of invalidating queries
- Optimize bulkIncrementTagCounts to skip unnecessary database queries
Fixes issue where forked/duplicated conversations with bookmarks would not increment
tag counters, leading to negative counts when bookmarks were later removed.
* chore: reorder import statements for clarity in fork.spec.js
* chore: Update documentation for formatToolContent function, remove JSDoc types and duplicate comments
* chore: fix type errors due to attachment.filename in Attachment component
* bug: updating so text doesn't delete
* fix: preserve user input when typing during AI response
Previously, form.reset() would clear any text the user started typing while waiting for AI response. Now checks if textarea has new content before resetting, preventing text loss and improving UX.
* chore: revert useSubmitMessage changes
* fix: reduce debounce time for input handling in auto-save
* fix: improve debounce handling for auto-save input to enhance user experience
---------
Co-authored-by: Megan Greenberg <mgreenberg@networkninja.com>
* fix: respect server's token endpoint auth methods for MCP OAuth refresh
Previously, LibreChat always used Basic Auth when refreshing OAuth tokens if a
client_secret was present. This caused issues with servers (like FastMCP) that
only support client_secret_post. Now properly checks and respects the server's
advertised token_endpoint_auth_methods_supported.
Fixes token refresh failures with error: "refresh_token.client_id: Field required"
* chore: remove MCP OAuth URL Logging
* fix: correctly build conversation template and preset for chats starting from marketplace
* test: enhance AgentDetail tests with additional localization and conversation mocks
- Updated MCPServersRegistry to correctly process serverInstructions when provided as a string "true", allowing it to fetch instructions from the server.
- Added a new utility function `isEnabled` to determine if serverInstructions should trigger a fetch.
- Introduced comprehensive tests to validate the behavior for different serverInstructions configurations, ensuring both string "true" and boolean true fetch from the server while custom strings remain unchanged.
🎯 This enhancement improves the flexibility and correctness of server instruction handling in the MCPServersRegistry.
* WIP: conversion of `ocr` to `context`
* refactor: make `primeResources` backwards-compatible for `ocr` tool_resources
* refactor: Convert legacy `ocr` tool resource to `context` in agent updates
- Implemented conversion logic to replace `ocr` with `context` in both incoming updates and existing agent data.
- Merged file IDs and files from `ocr` into `context` while ensuring deduplication.
- Updated tools array to reflect the change from `ocr` to `context`.
* refactor: Enhance context file handling in agent processing
- Updated the logic for managing context files by consolidating file IDs from both `ocr` and `context` resources.
- Improved backwards compatibility by ensuring that context files are correctly populated and handled.
- Simplified the iteration over context files for better readability and maintainability.
* refactor: Enhance tool_resources handling in primeResources
- Added tests to verify the deletion behavior of tool_resources fields, ensuring original objects remain unchanged.
- Implemented logic to delete `ocr` and `context` fields after fetching and re-categorizing files.
- Preserved context field when the context capability is disabled, ensuring correct behavior in various scenarios.
* refactor: Replace `ocrEnabled` with `contextEnabled` in AgentConfig
* refactor: Adjust legacy tool handling order for improved clarity
* refactor: Implement OCR to context conversion functions and remove original conversion logic in update agent handling
* refactor: Move contextEnabled declaration to maintain consistent order in capabilities
* refactor: Update localization keys for file context to improve clarity and accuracy
* chore: Update localization key for file context information to improve clarity
- Implemented `getAgents` function to retrieve multiple agent documents based on search parameters.
- Updated `fileAccess` middleware to utilize `getAgents` instead of `getAgent` for improved file access checks.
- Added comprehensive tests for file access middleware, covering various scenarios including user permissions and agent ownership.
* refactor: agent tool permissions to support ephemeral agent settings
* ci: rename render tests and correct typing for `useAgentToolPermissions` hook
* refactor: implement `DragDropContext` to minimize effect of `useChatContext` in `DragDropModal`
- Added isEphemeralAgent function to streamline checks for ephemeral agents.
- Updated logic in useAgentToolPermissions to utilize the new function for determining tool access.
- Introduced comprehensive tests for useAgentToolPermissions covering various scenarios including ephemeral agents, regular agents with tools, and edge cases.
* 💻 feat: Add proxy configuration support for Mistral OCR API requests
* refactor: Implement proxy support for Mistral API requests using HttpsProxyAgent
* 🔃 fix: Token Refresh in Browser Only, Redirect on Refresh Failure
* chore: Update import for SearchResultData and fix FormattedToolResponse type build warning
* ✂️ refactor: use artifacts and callbacks to pass UI resources
* chore: imports
* refactor: Update UIResource type imports and definitions across components and tests
* refactor: Update ToolCallInfo test data structure and enhance TAttachment type definition
---------
Co-authored-by: Samuel Path <samuel.path@shopify.com>
* 🌍 i18n: Update translation.json with latest translations
* Update drag and drop tooltip text
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: Optimize Email Domain Validation in OpenID, SAML, and Social Login Strategies
- Implemented email domain validation for user authentication in OpenID and SAML strategies, ensuring only allowed domains are processed.
- Adjusted error messages for clarity and consistency across authentication methods.
- Refactored social login to validate email domains before checking for existing users, improving registration flow.
* refactor: Email Domain Validation in LDAP and Social Login Strategies
* 🔧 refactor: Centralize Collection Existence Checks for Permissions Migration
* Replace individual collection existence checks with a unified function `ensureRequiredCollectionsExist` in the database utility module.
* Update migration scripts for agents and prompts to utilize the new function, ensuring all required collections are verified for existence in a single call.
* Remove redundant collection existence logic from migration files, improving code maintainability and clarity.
* chore: import order in migration scripts
* 🔧 test: Update Token Test Cases for Realistic Scenarios
* Changed email in test data to 'user1-alt@example.com' for a more realistic scenario.
* Clarified expectation comment for token retrieval to indicate it finds the only matching token based on criteria.
* Remove unused STATIC_CONFIG and LIBRECHAT_YAML_CONFIG cache keys.
These cache keys were identified as dead code - they were being written to but never read from anywhere in the codebase after a recent refactor:
- STATIC_CONFIG was used as a cache namespace that stored configuration data
- LIBRECHAT_YAML_CONFIG was the key used within that namespace to store parsed YAML config
- The cache.set() operation in loadCustomConfig.js stored the config but no cache.get() operations retrieved it
- Configuration data is already handled through other mechanisms without caching
* # removed tests regarding cache
* don't require conversation for bookmark button
* wrap marketplace component so it can correctly use context hooks
* chore: re-order import statement for MarketplaceProvider
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
- This allows use APP_CONFIG in FORCED_IN_MEMORY_CACHE_NAMESPACES
- Remove the complexity of nested namespace (e.g. we no longer have to worry about the prefix of every role key)
* 📬 refactor: Improved Rendering and Localization for Drag & Drop Files
- Refactored DragDropOverlay to use memoization and props for active state management.
- Updated the overlay to always render, reducing mount/unmount overhead.
- Improved user experience with localized text for drag-and-drop instructions.
- Enhanced file handling logic in useDragHelpers for better performance and clarity.
* fix: agent data retrieval in drag helper
* fix: ChatGPT import logic breaks message graph when it encounters a system message
- Implemented `findNonSystemParent` to maintain parent-child relationships by skipping system messages.
- Added a test case to ensure system messages do not disrupt the conversation flow during import.
* fix: ChatGPT import, correct sender for user messages with GPT-4 model
* fix: Enhance model name extraction for assistant messages in import process
- Updated sender assignment logic to dynamically extract model names from model slugs, improving accuracy for various GPT models.
- Added comprehensive tests to validate the extraction and formatting of model names from different model slugs, ensuring robustness in the import functionality.
* Added functionality to process OAuth configuration within the MCP environment.
* Implemented handling for string values in OAuth settings, ensuring proper processing of environment variables.
* Maintained original structure for non-string values to preserve existing configurations.
* refactor: modularize openai llm config logic into new getOpenAILLMConfig function (#9412)
* ✈️ refactor: Migrate Anthropic's getLLMConfig to TypeScript (#9413)
* refactor: move tokens.js over to packages/api and update imports
* refactor: port tokens.js to typescript
* refactor: move helpers.js over to packages/api and update imports
* refactor: port helpers.js to typescript
* refactor: move anthropic/llm.js over to packages/api and update imports
* refactor: port anthropic/llm.js to typescript with supporting types in types/anthropic.ts and updated tests in llm.spec.js
* refactor: move llm.spec.js over to packages/api and update import
* refactor: port llm.spec.js over to typescript
* 📝 Add Prompt Parameter Support for Anthropic Custom Endpoints (#9414)
feat: add anthropic llm config support for openai-like (custom) endpoints
* fix: missed compiler / type issues from addition of getAnthropicLLMConfig
* refactor: update tokens.ts to export constants and functions, enhance type definitions, and adjust default values
* WIP: first pass, decouple `llmConfig` from `configOptions`
* chore: update import path for OpenAI configuration from 'llm' to 'config'
* refactor: enhance type definitions for ThinkingConfig and update modelOptions in AnthropicConfigOptions
* refactor: cleanup type, introduce openai transform from alt provider
* chore: integrate removeNullishValues in Google llmConfig and update OpenAI exports
* chore: bump version of @librechat/api to 1.3.5 in package.json and package-lock.json
* refactor: update customParams type in OpenAIConfigOptions to use TConfig['customParams']
* refactor: enhance transformToOpenAIConfig to include fromEndpoint and improve config extraction
* refactor: conform userId field for anthropic/openai, cleanup anthropic typing
* ci: add backward compatibility tests for getOpenAIConfig with various endpoints and configurations
* ci: replace userId with user in clientOptions for getLLMConfig
* test: add Azure OpenAI endpoint tests for various configurations in getOpenAIConfig
* refactor: defaultHeaders retrieval for prompt caching for anthropic-based custom endpoint (litellm)
* test: add unit tests for getOpenAIConfig with various Anthropic model configurations
* test: enhance Anthropic compatibility tests with addParams and dropParams handling
* chore: update @librechat/agents dependency to version 2.4.78 in package.json and package-lock.json
* chore: update @librechat/agents dependency to version 2.4.79 in package.json and package-lock.json
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: freq. and pres. penalty use camelcase
* ci: OpenAI Configuration Tests
* ci: Enhance OpenAI Configuration Tests with Azure and Custom Endpoint Scenarios
* Added integration tests for OpenAI and Azure configurations simulating various initialization scenarios.
* Updated OpenAIConfigOptions to allow null values for reverseProxyUrl and proxy.
* Improved handling of reasoning parameters in tests for both OpenAI and Azure setups.
* Ensured robust error handling for missing API keys and malformed configurations.
* Optimized performance for large parameter sets in configuration.
* test: Add comprehensive integration tests for Anthropic LLM configuration
* Introduced real usage integration tests for various Anthropic endpoint configurations, including handling of proxy and reverse proxy setups.
* Implemented model-specific scenarios for Claude-3.7 and web search functionality.
* Enhanced error handling for missing user IDs and large parameter sets.
* Validated parameter logic, including default values, boundary conditions, and type handling for numeric and array parameters.
* Ensured proper exclusion of system options from model options and maintained expected behavior across different model variations.
* feat: added support for custom JINA_API_URL
* fixed tests
* chore: Update @librechat/agents dependency to version 2.4.77 in package-lock.json and package.json files
* fix: Update Jina API URL to use environment variable in configuration files
* Refactor AppService, web.ts, and config.ts to replace hardcoded Jina API URL with an environment variable placeholder.
* Ensure consistency across tests and configuration for Jina API URL.
* chore: alphabetical order translation.json
* fix: alphabetical order
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* Refactor deleteTokens to use an array of conditions for querying, ensuring only specified fields are considered for deletion.
* Add error handling to prevent accidental deletion when no query parameters are provided.
* Update AuthService to match the new deleteTokens signature by passing an object instead of a string for email.
* 🔑 refactor: `fileStrategy` for OpenID, SAML, and Social logins
* ci: Update Apple strategy tests to use correct isEnabled import and enhance handleExistingUser call
* Make file search citations conditional
* refactor: improve permission handling to avoid redundant checks by including it in artifact
* chore: reorder imports for better organization and clarity
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🔧 fix: Enhance OpenID token handling with user ID for image path validation
* 🔧 fix: Change logger level to error for user info fetch failure and remove redundant info log in OpenID user lookup
* 🔧 refactor: Remove validateImageRequest from middleware exports and enhance validation logic in validateImageRequest.js
* Removed validateImageRequest from the middleware index.
* Improved error handling and validation checks in validateImageRequest.js, including handling of OpenID tokens, URL length, and malformed URLs.
* Updated tests in validateImages.spec.js to cover new validation scenarios and edge cases.
* ✨ fix: Refactor theme handling to use isDark utility across components
* 🔧 fix: Update package client version to 0.2.8 and adjust theme import path in ThemeSelector component
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* refactor: MCP UI Separation for Agents (Dustin WIP)
feat: separate MCPs into their own lists away from tools + actions and add the status indicator functionality from chat to their dropdown ui
fix: spotify mcp was not persisting on agent creation
feat: show disconnected saved servers and their tools in agent mcp list in created agents
fix: select-all regression fixed (caused by deleting tools we were drawing from for rendering list)
fix: dont show all mcps, only those installed in agent in list
feat: separate ToolSelectDialog for MCPServerTools
fix: uninitialized mcp servers not showing as added in toolselectdialog
refactor: reduce looping in AgentPanelContext for categorizing groups and mcps
refactor: split ToolSelectDialog and MCPToolSelectDialog functionality (still needs customization for custom user vars)
chore: address ESLint comments
chore: address ESLint comments
feat: one-click initialization on MCP servers in agent builder
fix: stop propagation triggering reinit on caret click
refactor: split uninitialized MCPs component from initialized MCPs
feat: new mcp tool select dialog ui with custom user vars
feat: show initialization state for CUV configurable MCPs too
chore: remove unused localization string
fix: deselecting all tools caused a re-render
fix: remove subtools so removal from MCPToolSelectDialog works more consistently
feat: added servers have all tools enabled by default
feat: mcp server list now alphabetical to prevent annoying ui behavior of servers jumping around depending on tool selection
fix: filter out placeholder group mcp tools from any actual tool calls / definitions
feat: indicator now takes you to config dialog for uninitialized servers
feat: show previously configured mcp servers that are now missing from the yaml
feat: select all enabled by default on first add to mcp server list
chore: address ESLint comments
* refactor: MCP UI Separation for Agents (Danny WIP)
chore: remove use of `{serverName}_mcp_{serverName}`
chore: import order
WIP: separate component concerns
refactor: streamline agent mcp tools
refactor: unify MCP server handling and improve tool visibility logic, remove unnecessary normalization or sorting, remove nesting button, make variable names clear
refactor: rename mcpServerIds to mcpServerNames for clarity and consistency across components
refactor: remove groupedMCPTools and toolToServerMap, streamline MCP server handling in context and components to effectively utilize mcpServersMap
refactor: optimize tool selection logic by replacing array includes with Set for improved performance
chore: add error logging for failed auth URL parsing in ToolCall component
refactor: enhance MCP tool handling by improving server name management and updating UI elements for better clarity
* refactor: decouple connection status from useMCPServerManager with useMCPConnectionStatus
* fix: improve MCP tool validation logic to handle unconfigured servers
* chore: enhance log message clarity for MCP server disconnection in updateUserPluginsController
* refactor: simplify connection status extraction in useMCPConnectionStatus hook
* refactor: improve initializing UX
* chore: replace string literal with ResourceType constant in useResourcePermissions
* refactor: cleanup code, remove redundancies, rename variables for clarity
* chore: add back filtering and sorting for mcp tools dialog
* refactor: initializeServer to return response and early return
* refactor: enhance server initialization logic and improve UI for OAuth interaction
* chore: clarify warning message for unconfigured MCP server in handleTools
* refactor: prevent CustomUserVarsSection from submitting tools dialog form
* fix: nested button of button issue in UninitializedMCPTool
* feat: add functionality to revoke custom user variables in MCPToolSelectDialog
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🔧 fix: Ensure loading state is correctly set when files are empty or in progress
* 🔧 fix: Update ephemeral agent state on file upload error for execute code tool resource
* 🔧 fix: Reset ephemeral agent state for tool when authentication fails
* refactor: Pass conversation prop to FileFormChat and AttachFileChat components
* refactor: resolve request-based headers for custom endpoints right before LLM request
* ci: clarify request-based header resolution in initializeClient test
* refactor: useMCPSelect
- Add useGetMCPTools to use in useMCPSelect and elsewhere hooks for fetching MCP tools
- remove memoized key
- remove use of `useChatContext` and require conversationId as prop
* feat: Add MCPPanelContext and integrate conversationId as prop for useMCPSelect across components
- Introduced MCPPanelContext to manage conversationId state.
- Updated MCPSelect, MCPSubMenu, and MCPConfigDialog to accept conversationId as a prop.
- Modified ToolsDropdown and BadgeRow to pass conversationId to relevant components.
- Refactored MCPPanel to utilize MCPPanelProvider for context management.
* fix: remove nested ternary in ServerInitializationSection
- Replaced conditional operator with if-else statements for better readability in determining button text based on server initialization state and reinitialization status.
* refactor: wrap setValueWrap in useCallback for performance optimization
* refactor: streamline useMCPSelect by consolidating storageKey definition
* fix: prevent clearing selections on page refresh by tracking initial load completion
* refactor: simplify concern of useMCPSelect hook
* refactor: move ConfigFieldDetail interface to common types for better reusability, isolate usage of `useGetMCPTools`
* refactor: integrate mcpServerNames into BadgeRowContext and update ToolsDropdown and MCPSelect components
* 🔧 fix: TTS and STT Services to use AppConfig
- Updated `getProviderSchema` and `getProvider` methods to accept an optional `appConfig` parameter, allowing for more flexible configuration retrieval.
- Improved error handling by ensuring that the app configuration is checked before accessing TTS and STT schemas.
- Refactored `processTextToSpeech` and `streamAudio` methods to utilize the new `appConfig` parameter for better clarity and maintainability.
* feat: Cumulative Transcription Support for STT External
* style: fix medium-sized styling for admin settings dialogs
- Added useRef to maintain existing text during audio recording.
- Updated setText to prepend existing text to new transcriptions.
- Modified handleStartRecording and handleStopRecording to manage existing text state.
- Improved spinner icon styling for better visibility.
- Added support for a minimum password length defined by the MIN_PASSWORD_LENGTH environment variable.
- Updated login, registration, and reset password forms to utilize the configured minimum length.
- Enhanced validation schemas to reflect the new minimum password length requirement.
- Included tests to ensure the minimum password length functionality works as expected.
* added REDIS_USE_ALTERNATIVE_DNS_LOOKUP env variable to modify redis connection by adding dnsLookup
this is required when connecting to elasticache for ioredis
see "Special Note: Aws Elasticache Clusters with TLS" on this webpage: https://www.npmjs.com/package/ioredis
* added REDIS_USE_ALTERNATIVE_DNS_LOOKUP env variable to modify redis connection by adding dnsLookup
this is required when connecting to elasticache for ioredis
see "Special Note: Aws Elasticache Clusters with TLS" on this webpage: https://www.npmjs.com/package/ioredis
---------
Co-authored-by: Marc Amick <MarcAmick@jhu.edu>
* feat: move buildTree function for message hierarchy to data provider
* refactor: consolidate buildTree import from utils to data provider
* fix: correct string interpolation in messages function, which caused message search requests to fail
* 🪶 feat: Add Support for Uploading Plaintext Files
feat: delineate between OCR and text handling in fileConfig field of config file
- also adds support for passing in mimetypes as just plain file extensions
feat: add showLabel bool to support future synthetic component DynamicDropdownInput
feat: add new combination dropdown-input component in params panel to support file type token limits
refactor: move hovercard to side to align with other hovercards
chore: clean up autogenerated comments
feat: add delineation to file upload path between text and ocr configured filetypes
feat: add token limit checks during file upload
refactor: move textParsing out of ocrEnabled logic
refactor: clean up types for filetype config
refactor: finish decoupling DynamicDropdownInput from fileTokenLimits
fix: move image token cost function into file to fix circular dependency causing unittest to fail and remove unused var for linter
chore: remove out of scope code following review
refactor: make fileTokenLimit conform to existing styles
chore: remove unused localization string
chore: undo changes to DynamicInput and other strays
feat: add fileTokenLimit to all provider config panels
fix: move textParsing back into ocr tool_resource block for now so that it doesn't interfere with other upload types
* 📤 feat: Add RAG API Endpoint Support for Text Parsing (#8849)
* feat: implement RAG API integration for text parsing with fallback to native parsing
* chore: remove TODO now that placeholder and fllback are implemented
* ✈️ refactor: Migrate Text Parsing to TS (#8892)
* refactor: move generateShortLivedToken to packages/api
* refactor: move textParsing logic into packages/api
* refactor: reduce nesting and dry code with createTextFile
* fix: add proper source handling
* fix: mock new parseText and parseTextNative functions in jest file
* ci: add test coverage for textParser
* 💬 feat: Add Audio File Support to Upload as Text (#8893)
* feat: add STT support for Upload as Text
* refactor: move processAudioFile to packages/api
* refactor: move textParsing from utils to files
* fix: remove audio/mp3 from unsupported mimetypes test since it is now supported
* ✂️ feat: Configurable File Token Limits and Truncation (#8911)
* feat: add configurable fileTokenLimit default value
* fix: add stt to fileConfig merge logic
* fix: add fileTokenLimit to mergeFileConfig logic so configurable value is actually respected from yaml
* feat: add token limiting to parsed text files
* fix: add extraction logic and update tests so fileTokenLimit isnt sent to LLM providers
* fix: address comments
* refactor: rename textTokenLimiter.ts to text.ts
* chore: update form-data package to address CVE-2025-7783 and update package-lock
* feat: use default supported mime types for ocr on frontend file validation
* fix: should be using logger.debug not console.debug
* fix: mock existsSync in text.spec.ts
* fix: mock logger rather than every one of its function calls
* fix: reorganize imports and streamline file upload processing logic
* refactor: update createTextFile function to use destructured parameters and improve readability
* chore: update file validation to use EToolResources for improved type safety
* chore: update import path for types in audio processing module
* fix: update file configuration access and replace console.debug with logger.debug for improved logging
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
* feat: Add support to SubDirectory hosting
* fix: address linting and failing test
* fix: browser context validation
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* WIP: app.locals refactoring
WIP: appConfig
fix: update memory configuration retrieval to use getAppConfig based on user role
fix: update comment for AppConfig interface to clarify purpose
🏷️ refactor: Update tests to use getAppConfig for endpoint configurations
ci: Update AppService tests to initialize app config instead of app.locals
ci: Integrate getAppConfig into remaining tests
refactor: Update multer storage destination to use promise-based getAppConfig and improve error handling in tests
refactor: Rename initializeAppConfig to setAppConfig and update related tests
ci: Mock getAppConfig in various tests to provide default configurations
refactor: Update convertMCPToolsToPlugins to use mcpManager for server configuration and adjust related tests
chore: rename `Config/getAppConfig` -> `Config/app`
fix: streamline OpenAI image tools configuration by removing direct appConfig dependency and using function parameters
chore: correct parameter documentation for imageOutputType in ToolService.js
refactor: remove `getCustomConfig` dependency in config route
refactor: update domain validation to use appConfig for allowed domains
refactor: use appConfig registration property
chore: remove app parameter from AppService invocation
refactor: update AppConfig interface to correct registration and turnstile configurations
refactor: remove getCustomConfig dependency and use getAppConfig in PluginController, multer, and MCP services
refactor: replace getCustomConfig with getAppConfig in STTService, TTSService, and related files
refactor: replace getCustomConfig with getAppConfig in Conversation and Message models, update tempChatRetention functions to use AppConfig type
refactor: update getAppConfig calls in Conversation and Message models to include user role for temporary chat expiration
ci: update related tests
refactor: update getAppConfig call in getCustomConfigSpeech to include user role
fix: update appConfig usage to access allowedDomains from actions instead of registration
refactor: enhance AppConfig to include fileStrategies and update related file strategy logic
refactor: update imports to use normalizeEndpointName from @librechat/api and remove redundant definitions
chore: remove deprecated unused RunManager
refactor: get balance config primarily from appConfig
refactor: remove customConfig dependency for appConfig and streamline loadConfigModels logic
refactor: remove getCustomConfig usage and use app config in file citations
refactor: consolidate endpoint loading logic into loadEndpoints function
refactor: update appConfig access to use endpoints structure across various services
refactor: implement custom endpoints configuration and streamline endpoint loading logic
refactor: update getAppConfig call to include user role parameter
refactor: streamline endpoint configuration and enhance appConfig usage across services
refactor: replace getMCPAuthMap with getUserMCPAuthMap and remove unused getCustomConfig file
refactor: add type annotation for loadedEndpoints in loadEndpoints function
refactor: move /services/Files/images/parse to TS API
chore: add missing FILE_CITATIONS permission to IRole interface
refactor: restructure toolkits to TS API
refactor: separate manifest logic into its own module
refactor: consolidate tool loading logic into a new tools module for startup logic
refactor: move interface config logic to TS API
refactor: migrate checkEmailConfig to TypeScript and update imports
refactor: add FunctionTool interface and availableTools to AppConfig
refactor: decouple caching and DB operations from AppService, make part of consolidated `getAppConfig`
WIP: fix tests
* fix: rebase conflicts
* refactor: remove app.locals references
* refactor: replace getBalanceConfig with getAppConfig in various strategies and middleware
* refactor: replace appConfig?.balance with getBalanceConfig in various controllers and clients
* test: add balance configuration to titleConvo method in AgentClient tests
* chore: remove unused `openai-chat-tokens` package
* chore: remove unused imports in initializeMCPs.js
* refactor: update balance configuration to use getAppConfig instead of getBalanceConfig
* refactor: integrate configMiddleware for centralized configuration handling
* refactor: optimize email domain validation by removing unnecessary async calls
* refactor: simplify multer storage configuration by removing async calls
* refactor: reorder imports for better readability in user.js
* refactor: replace getAppConfig calls with req.config for improved performance
* chore: replace getAppConfig calls with req.config in tests for centralized configuration handling
* chore: remove unused override config
* refactor: add configMiddleware to endpoint route and replace getAppConfig with req.config
* chore: remove customConfig parameter from TTSService constructor
* refactor: pass appConfig from request to processFileCitations for improved configuration handling
* refactor: remove configMiddleware from endpoint route and retrieve appConfig directly in getEndpointsConfig if not in `req.config`
* test: add mockAppConfig to processFileCitations tests for improved configuration handling
* fix: pass req.config to hasCustomUserVars and call without await after synchronous refactor
* fix: type safety in useExportConversation
* refactor: retrieve appConfig using getAppConfig in PluginController and remove configMiddleware from plugins route, to avoid always retrieving when plugins are cached
* chore: change `MongoUser` typedef to `IUser`
* fix: Add `user` and `config` fields to ServerRequest and update JSDoc type annotations from Express.Request to ServerRequest
* fix: remove unused setAppConfig mock from Server configuration tests
* fix: error when updating bookmarks if no query data
* feat: localize bookmark dialog, form labels and validation messages, also improve validation
* feat: add localization for EmptyPromptPreview component and update translation.json
* chore: add missing localizations for static UI text
* chore: update AgentPanelContextType and useGetAgentsConfig to support null configurations
* refactor: update agent categories to support localization and custom properties, improve related typing
* ci: add localization for 'All' category and update tab names in accessibility tests
* chore: remove unused AgentCategoryDisplay component and its tests
* chore: add localization handling for agent category selector
* chore: enhance AgentCard to support localized category labels and add related tests
* chore: enhance i18n unused keys detection to include additional source directories and improve handling for agent category keys
* refactor: Resource Migration Scripts for DocumentDB compatibility
* fix: Correct type annotation for `db` parameter in ensureCollectionExists function
* fix(latex): prevent LaTeX conversion when closing $ is preceded by backtick
When text contained patterns like "$lookup namespace" followed by "`$lookup`",
the regex would match from the first $ to the backtick's $, treating the entire
span as a LaTeX expression. This caused programming constructs to be incorrectly
converted to double dollars.
- Added negative lookbehind (?<!`) to single dollar regex
- Prevents matching when closing $ immediately follows a backtick
- Fixes issues with inline code blocks containing $ symbols
* fix(latex): detect currency amounts with 4+ digits without commas
The currency regex pattern \d{1,3} only matched amounts with 1-3 initial digits,
causing amounts like $1157.90 to be interpreted as LaTeX instead of currency.
This resulted in text like "$1157.90 (text) + $500 (text) = $1657.90" being
incorrectly converted to a single LaTeX expression.
- Changed pattern from \d{1,3} to \d+ to match any number of initial digits
- Now properly escapes $1000, $10000, $123456, etc. without requiring commas
- Maintains support for comma-formatted amounts like $1,234.56
* fix(latex): support currency with unlimited decimal places
The currency regex limited decimal places to 1-2 digits (\.\d{1,2}), which
failed to properly escape amounts with more precision like cryptocurrency
values ($0.00001234), gas prices ($3.999), or exchange rates ($1.23456).
- Changed decimal pattern from \.\d{1,2} to \.\d+
- Now supports any number of decimal places
- Handles edge cases like scientific calculations and high-precision values
* fix: available tools retrieval with correct mcp caching and conversion
* test: Enhance PluginController tests with MCP tool mocking and conversion
* refactor: Simplify PluginController tests by removing unused mocks and enhancing test clarity
* feat: Add directEndpoint option to OpenAIConfigOptions and update fetch logic to override /chat/completions URL
* feat: Add directEndpoint support to fetchModels and update loadConfigModels logic
* chore: import paths for isEnabled and logger in title.js
* ⛔ fix: `AbortSignal` Cleanup Logic for New Chats
* test: Add `isNewConvo` parameter to onStart expectation in BaseClient tests
Fixes "Cannot read properties of undefined (reading 'key')" error in parameter panels by filtering out null/undefined values before mapping operations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
* decouple MCP dialog from BadgeRowContext
* chore: import order and style according to guidelines
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
* 📦 chore: Bump `@librechat/api` to v1.3.3
* 📦 chore: Bump `librechat-data-provider` to v0.8.003
* 📦 chore: Bump `@librechat/data-schemas` to v0.0.18
* 📦 chore: Bump `@librechat/client` to v0.2.6
* 📦 chore: Update workflow name for `librechat-data-provider` and add manual dispatch
* 📦 chore: Update Node.js version to 20 in data provider workflow
* feat: Add conversation ID support to custom endpoint headers
- Add LIBRECHAT_CONVERSATION_ID to customUserVars when provided
- Pass conversation ID to header resolution for dynamic headers
- Add comprehensive test coverage
Enables custom endpoints to access conversation context using {{LIBRECHAT_CONVERSATION_ID}} placeholder.
* fix: filter out unresolved placeholders from headers (thanks @MrunmayS)
* feat: add support for request body placeholders in custom endpoint headers
- Add {{LIBRECHAT_BODY_*}} placeholders for conversationId, parentMessageId, messageId
- Update tests to reflect new body placeholder functionality
* refactor resolveHeaders
* style: minor styling cleanup
* fix: type error in unit test
* feat: add body to other endpoints
* feat: add body for mcp tool calls
* chore: remove changes that unnecessarily increase scope after clarification of requirements
* refactor: move http.ts to packages/api and have RequestBody intersect with Express request body
* refactor: processMCPEnv now uses single object argument pattern
* refactor: update processMCPEnv to use 'options' parameter and align types across MCP connection classes
* feat: enhance MCP connection handling with dynamic request headers to pass request body fields
---------
Co-authored-by: Gopal Sharma <gopalsharma@gopal.sharma1>
Co-authored-by: s10gopal <36487439+s10gopal@users.noreply.github.com>
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
* fix: register openId the strategy if setupOpenId succeeded
* chore: linting and update imports
* refactor: extract OpenID configuration into a separate function
---------
Co-authored-by: Denis <denis.sheremetov@gmail.com>
* ✨ feat: Add support for enabling Redis cluster configuration
* ✨ feat: Enhance Redis client initialization to support cluster configuration without multiple URIs
* ✨ feat: Add tests for USE_REDIS_CLUSTER configuration and validation
* 🐞 fix: Remove unnecessary blank line in cacheConfig tests
* adding beta header context-1m-2025-08-07 to claude sonnet 4 to increase contact window to 1M tokens
* adding context-1m beta header to test cases
* ci: Update Anthropic `getLLMConfig` tests and headers for model variations
- Refactored test cases to ensure proper handling of model variations for 'claude-sonnet-4'.
- Cleaned up unused mock implementations in tests for better clarity and performance.
* refactor: regex in header retrieval for 'claude-sonnet-4' models
* refactor: default tokens for 'claude-sonnet-4' to `1,000,000`
* refactor: add token value retrieval and pattern matching to model tests
---------
Co-authored-by: Dirk Petersen <no-reply@nowhere.com>
* refactor: `packages/api` build scripts for better inline debugging
* refactor: Explicitly select secure fields as no longer returned by default, exclude backupCodes from user data retrieval in authentication and 2FA processes
* refactor: Backup Codes UI to not expect backup codes, only regeneration
* refactor: Ensure secure fields are deleted from user data in getUserController
- Deleted setBalanceConfig middleware and its associated file.
- Introduced createSetBalanceConfig factory function to create middleware for synchronizing user balance settings.
- Updated auth and oauth routes to use the new balance configuration middleware.
- Added comprehensive tests for the new balance middleware functionality.
- Updated package versions and dependencies in package.json and package-lock.json.
- Added balance types and updated middleware index to export new balance middleware.
* refactor: Introduce ModelSelectorChatContext and integrate with ModelSelector
* fix: agents handling in ModelSelector to show expected agents if user has marketplace access
* chore: fix mock typing in packages/api tests
* chore: improve imports, type handling and method signatures for MCPServersRegistry
* chore: use enum in migration scripts
* chore: ParsedServerConfig type to enhance server configuration handling
* feat: Implement agent permissions migration check and logging
* feat: Integrate migration checks into server initialization process
* feat: Add prompt permissions migration check and logging to server initialization
* chore: move prompt formatting functions to dedicated prompts dir
feat: Refactor prompt and prompt group schemas; move types to separate file
feat: Implement paginated access to prompt groups with filtering and public visibility
refactor: Add PromptGroups context provider and integrate it into relevant components
refactor: Optimize filter change handling and query invalidation in usePromptGroupsNav hook
refactor: Simplify context usage in FilterPrompts and GroupSidePanel components
- Added MarketplaceAdminSettings component for managing marketplace permissions.
- Updated roles.js to include marketplace permissions in the API.
- Refactored interface.js to streamline marketplace permissions handling.
- Enhanced Marketplace component to integrate admin settings.
- Updated localization files to include new marketplace-related keys.
- Added new API endpoint for updating marketplace permissions in data-service.
feat: Enhance CategoryTabs and Marketplace components for better responsiveness and navigation
feat: Refactor AgentCard and AgentGrid components for improved layout and accessibility
feat: Implement animated category transitions in AgentMarketplace and update NewChat component layout
feat: Refactor UI components for improved styling and accessibility in sharing dialogs
refactor: remove GenericManagePermissionsDialog and GrantAccessDialog components
- Deleted GenericManagePermissionsDialog and GrantAccessDialog components to streamline sharing functionality.
- Updated ManagePermissionsDialog to utilize AccessRolesPicker directly.
- Introduced UnifiedPeopleSearch for improved people selection experience.
- Enhanced PublicSharingToggle with InfoHoverCard for better user guidance.
- Adjusted AgentPanel to change error status to warning for duplicate agent versions.
- Updated translations to include new keys for search and access management.
feat: Add responsive design for SelectedPrincipalsList and improve layout in GenericGrantAccessDialog
feat: Enhance styling in SelectedPrincipalsList and SearchPicker components for improved UI consistency
feat: Improve PublicSharingToggle component with enhanced styling and accessibility features
feat: Introduce InfoHoverCard component and refactor enums for better organization
feat: Implement infinite scroll for agent grids and enhance performance
- Added `useInfiniteScroll` hook to manage infinite scrolling behavior in agent grids.
- Integrated infinite scroll functionality into `AgentGrid` and `VirtualizedAgentGrid` components.
- Updated `AgentMarketplace` to pass the scroll container to the agent grid components.
- Refactored loading indicators to show a spinner instead of a "Load More" button.
- Created `VirtualizedAgentGrid` component for optimized rendering of agent cards using virtualization.
- Added performance tests for `VirtualizedAgentGrid` to ensure efficient handling of large datasets.
- Updated translations to include new messages for end-of-results scenarios.
chore: Remove unused permission-related UI localization keys
ci: Update Agent model tests to handle duplicate support_contact updates
- Modified tests to ensure that updating an agent with the same support_contact does not create a new version and returns successfully.
- Enhanced verification for partial changes in support_contact, confirming no new version is created when content remains the same.
chore: Address ESLint, clean up unused imports and improve prop definitions in various components
ci: fix tests
ci: update tests
chore: remove unused search localization keys
- Refactored `getListAgentsByAccess` to streamline query construction for accessible agents.
- Added comprehensive security tests for `getListAgentsByAccess` and `getListAgentsHandler` to ensure proper access control and filtering based on user permissions.
- Enhanced test coverage for various scenarios, including pagination, category filtering, and handling of non-existent IDs.
WIP: Role as Permission Principal Type
WIP: add user role check optimization to user principal check, update type comparisons
WIP: cover edge cases for string vs ObjectId handling in permission granting and checking
chore: Update people picker access middleware to use PrincipalType constants
feat: Enhance people picker access control to include roles permissions
chore: add missing default role schema values for people picker perms, cleanup typing
feat: Enhance PeoplePicker component with role-specific UI and localization updates
chore: Add missing `VIEW_ROLES` permission to role schema
- Replaced string literals for principal models ('User', 'Group') with the new PrincipalModel enum across various models, services, and tests to enhance type safety and consistency.
- Updated permission handling in multiple files to utilize the PrincipalModel enum, improving maintainability and reducing potential errors.
- Ensured all relevant tests reflect these changes to maintain coverage and functionality.
- Replaced string literals for principal types ('user', 'group', 'public') with the new PrincipalType enum across various models, services, and tests for improved type safety and consistency.
- Updated permission handling in multiple files to utilize the PrincipalType enum, enhancing maintainability and reducing potential errors.
- Ensured all relevant tests reflect these changes to maintain coverage and functionality.
- Refactor tests to use PromptGroup roles instead of Project roles.
- Initialize models and seed default roles in test setup.
- Update error handling for non-existent resource types.
- Ensure proper cleanup of test data while retaining seeded roles.
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids, rename enums to PascalCase
refactor: organize Sharing/Agent components, improve type safety for resource types and access role ids
chore: move sharing related components to dedicated "Sharing" directory
chore: remove PublicSharingToggle component and update index exports
chore: move non-sidepanel agent components to `~/components/Agents`
chore: move AgentCategoryDisplay component with tests
chore: remove commented out code
refactor: change PERMISSION_BITS from const to enum for better type safety
refactor: reorganize imports in GenericGrantAccessDialog and update index exports for hooks
refactor: update type definitions to use ACCESS_ROLE_IDS for improved type safety
refactor: remove unused canAccessPromptResource middleware and related code
refactor: remove unused prompt access roles from createAccessRoleMethods
refactor: update resourceType in AclEntry type definition to remove unused 'prompt' value
refactor: introduce ResourceType enum and update resourceType usage across data provider files for improved type safety
refactor: update resourceType usage to ResourceType enum across sharing and permissions components for improved type safety
refactor: standardize resourceType usage to ResourceType enum across agent and prompt models, permissions controller, and middleware for enhanced type safety
refactor: update resourceType references from PROMPT_GROUP to PROMPTGROUP for consistency across models, middleware, and components
refactor: standardize access role IDs and resource type usage across agent, file, and prompt models for improved type safety and consistency
chore: add typedefs for TUpdateResourcePermissionsRequest and TUpdateResourcePermissionsResponse to enhance type definitions
chore: move SearchPicker to PeoplePicker dir
refactor: implement debouncing for query changes in SearchPicker for improved performance
chore: fix typing, import order for agent admin settings
fix: agent admin settings, prevent agent form submission
refactor: rename `ACCESS_ROLE_IDS` to `AccessRoleIds`
refactor: replace PermissionBits with PERMISSION_BITS
refactor: replace PERMISSION_BITS with PermissionBits
feat: Implement prompt permissions management and access control middleware
fix: agent deletion process to remove associated permissions and ACL entries
fix: Import Permissions for enhanced access control in GrantAccessDialog
feat: use PromptGroup for access control
- Added migration script for PromptGroup permissions, categorizing groups into global view access and private groups.
- Created unit tests for the migration script to ensure correct categorization and permission granting.
- Introduced middleware for checking access permissions on PromptGroups and prompts via their groups.
- Updated routes to utilize new access control middleware for PromptGroups.
- Enhanced access role definitions to include roles specific to PromptGroups.
- Modified ACL entry schema and types to accommodate PromptGroup resource type.
- Updated data provider to include new access role identifiers for PromptGroups.
feat: add generic access management dialogs and hooks for resource permissions
fix: remove duplicate imports in FileContext component
fix: remove duplicate mongoose dependency in package.json
feat: add access permissions handling for dynamic resource types and add promptGroup roles
feat: implement centralized role localization and update access role types
refactor: simplify author handling in prompt group routes and enhance ACL checks
feat: implement addPromptToGroup functionality and update PromptForm to use it
feat: enhance permission handling in ChatGroupItem, DashGroupItem, and PromptForm components
chore: rename migration script for prompt group permissions and update package.json scripts
chore: update prompt tests
style: AccessRolesPicker to use DropdownPopup, theming, import order, localization
refactor: Update localization keys for Agent Marketplace in NewChat component, remove duplicate key
style: Adjust layout and font size in NewChat component for Agent Marketplace button
style: theming in AgentGrid
style: Update theming and text colors across Agent components for improved consistency
chore: import order
style: Replace Dialog with OGDialog and update content components in AgentDetail
refactor: Simplify AgentDetail component by removing dropdown menu and replacing it with a copy link button
style: Enhance scrollbar visibility and layout in AgentMarketplace and CategoryTabs components
style: Adjust layout in AgentMarketplace component by removing unnecessary padding from the container
style: Refactor layout in AgentMarketplace component by reorganizing hero section and sticky wrapper for improved structure with collapsible header effect
style: Improve responsiveness and layout in AgentMarketplace component by adjusting header visibility and modifying container styles based on screen size
fix: Update localization key for no categories message in CategoryTabs component and corresponding test
style: Add className prop to OpenSidebar component for improved styling flexibility and update Header to utilize it for responsive design
style: Enhance layout and scrolling behavior in CategoryTabs component by adding scroll snap properties and adjusting class names for improved user experience
style: Update AgentGrid component layout and skeleton structure for improved visual consistency and responsiveness
bugfix: Enhance Agent and AgentCategory schemas with new fields for category, support contact, and promotion status
refactored and moved agent category methods and schema to data-schema package
🔧 fix: Merge and Rebase Conflicts
- Move AgentCategory from api/models to @packages/data-schemas structure
- Add schema, types, methods, and model following codebase conventions
- Implement auto-seeding of default categories during AppService startup
- Update marketplace controller to use new data-schemas methods
- Remove old model file and standalone seed script
refactor: unify agent marketplace to single endpoint with cursor pagination
- Replace multiple marketplace routes with unified /marketplace endpoint
- Add query string controls: category, search, limit, cursor, promoted, requiredPermission
- Implement cursor-based pagination replacing page-based system
- Integrate ACL permissions for proper access control
- Fix ObjectId constructor error in Agent model
- Update React components to use unified useGetMarketplaceAgentsQuery hook
- Enhance type safety and remove deprecated useDynamicAgentQuery
- Update tests for new marketplace architecture
-Known issues:
see more button after category switching + Unit tests
feat: add icon property to ProcessedAgentCategory interface
- Add useMarketplaceAgentsInfiniteQuery and useGetAgentCategoriesQuery to client/src/data-provider/Agents/
- Replace manual pagination in AgentGrid with infinite query pattern
- Update imports to use local data provider instead of librechat-data-provider
- Add proper permission handling with PERMISSION_BITS.VIEW/EDIT constants
- Improve agent access control by adding requiredPermission validation in backend
- Remove manual cursor/state management in favor of infinite query built-ins
- Maintain existing search and category filtering functionality
refactor: consolidate agent marketplace endpoints into main agents API and improve data management consistency
- Remove dedicated marketplace controller and routes, merging functionality into main agents v1 API
- Add countPromotedAgents function to Agent model for promoted agents count
- Enhance getListAgents handler with marketplace filtering (category, search, promoted status)
- Move getAgentCategories from marketplace to v1 controller with same functionality
- Update agent mutations to invalidate marketplace queries and handle multiple permission levels
- Improve cache management by updating all agent query variants (VIEW/EDIT permissions)
- Consolidate agent data access patterns for better maintainability and consistency
- Remove duplicate marketplace route definitions and middleware
selected view only agents injected in the drop down
fix: remove minlength validation for support contact name in agent schema
feat: add validation and error messages for agent name in AgentConfig and AgentPanel
fix: update agent permission check logic in AgentPanel to simplify condition
Fix linting WIP
Fix Unit tests WIP
ESLint fixes
eslint fix
refactor: enhance isDuplicateVersion function in Agent model for improved comparison logic
- Introduced handling for undefined/null values in array and object comparisons.
- Normalized array comparisons to treat undefined/null as empty arrays.
- Added deep comparison for objects and improved handling of primitive values.
- Enhanced projectIds comparison to ensure consistent MongoDB ObjectId handling.
refactor: remove redundant properties from IAgent interface in agent schema
chore: update localization for agent detail component and clean up imports
ci: update access middleware tests
chore: remove unused PermissionTypes import from Role model
ci: update AclEntry model tests
ci: update button accessibility labels in AgentDetail tests
refactor: update exhaustive dep. lint warning
🔧 fix: Fixed agent actions access
feat: Add role-level permissions for agent sharing people picker
- Add PEOPLE_PICKER permission type with VIEW_USERS and VIEW_GROUPS permissions
- Create custom middleware for query-aware permission validation
- Implement permission-based type filtering in PeoplePicker component
- Hide people picker UI when user lacks permissions, show only public toggle
- Support granular access: users-only, groups-only, or mixed search modes
refactor: Replace marketplace interface config with permission-based system
- Add MARKETPLACE permission type to handle marketplace access control
- Update interface configuration to use role-based marketplace settings (admin/user)
- Replace direct marketplace boolean config with permission-based checks
- Modify frontend components to use marketplace permissions instead of interface config
- Update agent query hooks to use marketplace permissions for determining permission levels
- Add marketplace configuration structure similar to peoplePicker in YAML config
- Backend now sets MARKETPLACE permissions based on interface configuration
- When marketplace enabled: users get agents with EDIT permissions in dropdown lists (builder mode)
- When marketplace disabled: users get agents with VIEW permissions in dropdown lists (browse mode)
🔧 fix: Redirect to New Chat if No Marketplace Access and Required Agent Name Placeholder (#8213)
* Fix: Fix the redirect to new chat page if access to marketplace is denied
* Fixed the required agent name placeholder
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
chore: fix tests, remove unnecessary imports
refactor: Implement permission checks for file access via agents
- Updated `hasAccessToFilesViaAgent` to utilize permission checks for VIEW and EDIT access.
- Replaced project-based access validation with permission-based checks.
- Enhanced tests to cover new permission logic and ensure proper access control for files associated with agents.
- Cleaned up imports and initialized models in test files for consistency.
refactor: Enhance test setup and cleanup for file access control
- Introduced modelsToCleanup array to track models added during tests for proper cleanup.
- Updated afterAll hooks in test files to ensure all collections are cleared and only added models are deleted.
- Improved consistency in model initialization across test files.
- Added comments for clarity on cleanup processes and test data management.
chore: Update Jest configuration and test setup for improved timeout handling
- Added a global test timeout of 30 seconds in jest.config.js.
- Configured jest.setTimeout in jestSetup.js to allow individual test overrides if needed.
- Enhanced test reliability by ensuring consistent timeout settings across all tests.
refactor: Implement file access filtering based on agent permissions
- Introduced `filterFilesByAgentAccess` function to filter files based on user access through agents.
- Updated `getFiles` and `primeFiles` functions to utilize the new filtering logic.
- Moved `hasAccessToFilesViaAgent` function from the File model to permission services, adjusting imports accordingly
- Enhanced tests to ensure proper access control and filtering behavior for files associated with agents.
fix: make support_contact field a nested object rather than a sub-document
refactor: Update support_contact field initialization in agent model
- Removed handling for empty support_contact object in createAgent function.
- Changed default value of support_contact in agent schema to undefined.
test: Add comprehensive tests for support_contact field handling and versioning
refactor: remove unused avatar upload mutation field and add informational toast for success
chore: add missing SidePanelProvider for AgentMarketplace and organize imports
fix: resolve agent selection race condition in marketplace HandleStartChat
- Set agent in localStorage before newConversation to prevent useSelectorEffects from auto-selecting previous agent
fix: resolve agent dropdown showing raw ID instead of agent info from URL
- Add proactive agent fetching when agent_id is present in URL parameters
- Inject fetched agent into agents cache so dropdowns display proper name/avatar
- Use useAgentsMap dependency to ensure proper cache initialization timing
- Prevents raw agent IDs from showing in UI when visiting shared agent links
Fix: Agents endpoint renamed to "My Agent" for less confusion with the Marketplace agents.
chore: fix ESLint issues and Test Mocks
ci: update permissions structure in loadDefaultInterface tests
- Refactored permissions for MEMORY and added new permissions for MARKETPLACE and PEOPLE_PICKER.
- Ensured consistent structure for permissions across different types.
feat: support_contact validation to allow empty email strings
WIP: pre-granular-permissions commit
feat: Add category and support contact fields to Agent schema and UI components
Revert "feat: Add category and support contact fields to Agent schema and UI components"
This reverts commit c43a52b4c9.
Fix: Update import for renderHook in useAgentCategories.spec.tsx
fix: Update icon rendering in AgentCategoryDisplay tests to use empty spans
refactor: Improve category synchronization logic and clean up AgentConfig component
refactor: Remove unused UI flow translations from translation.json
feat: agent marketplace features
🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804)
* chore: Remove eslint-plugin-perfectionist from dependencies
* 🚌 fix: MCP Runtime Errors while Initializing
* chore: Bump @librechat/api version to 1.3.1
* chore: import order
* chore: import order
- Fix grammar in translations README: 'if has not been ran' 'if it has not been run'
- Fix spacing in JSDoc comments: 'at theend' 'at the end' (2 instances)
* fix: social login provider crossover
* feat: Enhance OpenID login handling and add tests for provider validation
* refactor: authentication error handling to use ErrorTypes.AUTH_FAILED enum
* refactor: update authentication error handling in LDAP and SAML strategies to use ErrorTypes.AUTH_FAILED enum
* ci: Add validation for login with existing email and different provider in SAML strategy
chore: Add logging for existing users with different providers in LDAP, SAML, and Social Login strategies
- Updated `handleExistingUser` function to improve avatar handling logic, including checks for manual flags and null/undefined avatars.
- Introduced a new test suite for `handleExistingUser` covering various scenarios, ensuring robust functionality for avatar updates in both local and non-local storage contexts.
* fix: localization string had unused template var
* fix: add normalizeHttpError to hopefully stop UI hangs when an error is returned in UserController
- Ensures updateUserPluginsController always returns valid HTTP status codes instead of undefined
- Add normalizeHttpError() helper to safely extract status/message from errors
- Default to 400 status code when Error.status is undefined/invalid
* refactor: move normalizeHttpError to packages/api
* 🛣️ fix: Remove Title Tokens Limit for GPT-5 Models
* 🛣️ fix: Remove max_completion_tokens from modelKwargs when maxTokens is disabled
* chore: Add test-image* to .gitignore for CI/CD data
* WIP: Verbosity OpenAI Parameter
* 🔧 chore: remove unused import of extractEnvVariable from parsers.ts
* ✨ feat: add comprehensive tests for getOpenAIConfig and enhance verbosity handling
* fix: Handling for maxTokens in GPT-5+ models and add corresponding tests
* feat: Implement GPT-5+ model handling in processMemory function
* ✨ feat: Enhance Tooltip component with HTML support and styling improvements
* ✨ feat: Integrate DOMPurify for HTML sanitization in Tooltip component
* fix: add refetchQueries on connection success so ToolSelectDialog doesn't require hard refresh
* fix: change hook so we only query connection status when mcpServers are configured
* fix: change refetchQueries to invalidateQueries for tools after server connection update
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* ✨ feat: Add OpenID audience parameter support in authorization requests
* Updated .env.example to include OPENID_AUDIENCE variable for configuration.
* Enhanced openidStrategy to set the audience parameter in authorization requests if specified, improving OpenID integration.
* Update .env.example
* Update openidStrategy.js
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* feat: Update client version to 0.2.2 and add animation styles for popovers and tooltips
* refactor: Remove focus outline styles from Dropdown component
* feat: Update client version to 0.2.3 and add Select component export
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* chore: Handle optional token_endpoint in OAuth metadata discovery
* chore: Simplify permission typing logic in checkAccess function
* feat: Implement `deleteMistralFile` function and integrate file cleanup in `uploadMistralOCR`
* 🌍 i18n: Add Tibetan and Ukrainian languages to localization
* feat: Update language selector to include Tibetan and Ukrainian options
* feat: Add translation files for Tibetan and Ukrainian languages
* chore: Update English translation.json with new language keys
* docs: Create localization guide for adding new languages
* Update README.md
* refactor: Enhance MCP components with improved UI elements and localization updates
* refactor: Clean up MCP components by removing unused imports and improving layout
* refactor: Update server status badge styling for improved UI consistency
* refactor: Move group up a level so 'X' and background highlight occur at same time for cancellation button
* refactor: Remove unused translation keys from the localization file
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
Now prioritizes preferred_username claim, then the nonstandard
username claim, then email.
Removed given_name as a possible username choice to avoid exposing users’ first names as
usernames.
Updated openidStrategy.spec.js to reflect the new claim order.
Fixed mock OpenID server behavior where preferred_username was always
hardcoded, causing test failures.
Adjusted OpenID setup test to align with new username parameter
behavior.
* fix: add OAuth flow back in to success state
* feat: disable server clicks during initialization to prevent spam
* fix: correct new tab behavior for OAuth between one-click and normal initialization flows
* fix: stop polling on error during oauth (was infinite popping toasts because we didn't clear interval)
* fix: cleanupServerState should be called after successful cancelOauth, not before
* fix: change from completeFlow to failFlow to avoid stale client IDs on OAuth after cancellation
* fix: add logic to differentiate between cancelled and failed flows when checking status for indicators (so error triangle indicator doesn't show up on cancellaiton)
* Use discoverAuthorizationServerMetadata instead of discoverMetadata
Uses the discoverAuthorizationServerMetadata function from the upstream
TS SDK. This has the advantage of falling back to OIDC discovery
metadata if the OAuth discovery metadata doesn't exist which is the case
with e.g. keycloak.
* chore: import order
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* feat: add OAuth servers to conditional rendering logic for MCPPanel in SideNav
* feat: add startup flag check to conditional rendering logic
* fix: correct improper handling of failure state in reinitialize endpoint
* fix: change MCP config components to better handle servers without customUserVars
- removes the subtle reinitialize button from config components of servers without customUserVars or OAuth
- adds a placeholder message for components where servers have no customUserVars configured
* style: swap CustomUserVarsSection and ServerInitializationSection positions
* style: fix coloring for light mode and align more with existing design patterns
* chore: remove extraneous comments
* chore: reorder imports and `isEnabled` from api package
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: render issues in PromptForm by decoupling nested dependencies as a result of @librechat/client components
* fix: MemoryViewer flicker by moving EditMemoryButton and DeleteMemoryButton outside of rendering
* fix: CategorySelector to use DropdownPopup for improved mobile compatibility
* chore: imports
- Replaced HttpsProxyAgent with ProxyAgent from undici for improved proxy handling in DALLE3.js and OpenAIImageTools.js.
- Updated fetchOptions to use dispatcher for proxy configuration.
- Added new test suite for DALLE3 to verify proxy configuration behavior based on environment variables.
ToolsDropdown uses a menu library that passes refs to submenu items. Function components can't receive refs by default though, so we get "Function components cannot be given refs" warnings in the console. React.forwardRef() allows them to properly handle ref forwarding by wrapping the component and attaching the ref to the outer div element.
* ✨ feat: Enhance MCP Connection Status Management
- Introduced new functions to retrieve and manage connection status for multiple MCP servers, including OAuth flow checks and server-specific status retrieval.
- Refactored the MCP connection status endpoints to support both all servers and individual server queries.
- Replaced the old server initialization hook with a new `useMCPServerManager` hook for improved state management and handling of multiple OAuth flows.
- Updated the MCPPanel component to utilize the new context provider for better state handling and UI updates.
- Fixed a number of UI bugs when initializing servers
* 🗣️ i18n: Remove unused strings from translation.json
* refactor: move helper functions out of the route module into mcp service file
* ci: add tests for newly added functions in mcp service file
* fix: memoize setMCPValues to avoid render loop
* 📦 feat: Add Radio component
* 📦 feat: Integrate localization for 'No options available' message in Radio component
* 📦 feat: Bump version to 0.2.0 in package.json
* 📦 feat: Update client package version to 0.2.0 in package-lock.json
* feat: init @librechat/client
* feat: Add common types and interfaces for accessibility, agents, artifacts, assistants, and tools
* feat: Add jotai as a peer dependency
* fix build client package
* feat: cleanup unused types from common/index.ts
- Remove 104 unused type exports from packages/client/src/common/index.ts
- Keep only 7 actually used exports (93% reduction)
- Add cleanup script with enhanced import pattern detection
- Support both named imports and namespace imports (* as t)
- Create automatic backups and comprehensive documentation
- Maintain type safety with build verification
- No breaking changes to existing code
Kept exports:
- TShowToast, Option, OptionWithIcon, DropdownValueSetter
- MentionOption, NotificationSeverity, MenuItemProps
Scripts: cleanup-common-types-safe.js, README-CLEANUP.md
* fix: cleanup
* fix: package; refactor: tsconfig
* feat: add back `recoil`
* fix: move dependencies to peerDependencies in client package
* feat: add @librechat/client as a dependency in package.json and package-lock.json
* feat: update client package configuration and dependencies
- Added new dependencies for Rollup plugins and updated existing ones in package.json and package-lock.json.
- Introduced a new Rollup configuration file for building the client package.
- Refactored build scripts to include a dedicated build command for the client.
- Updated TypeScript configuration for improved module resolution and type declaration output.
- Integrated a Toast component from the client package into the main App component.
* feat: enhance Rollup configuration for client package
- Updated terser plugin settings to preserve directives like 'use client'.
- Added custom warning handler to ignore "use client" directive warnings during the build process.
* chore: rename package/client build script command
* feat: update client package dependencies and Rollup configuration
- Added rollup-plugin-postcss to package.json and updated package-lock.json.
- Enhanced Rollup configuration to include postcss plugin for CSS handling.
- Updated index.ts to export all components from the components directory for better modularity.
* feat: add client package directory to update configuration
- Included the 'client' package directory in the update.js configuration to ensure it is recognized during updates.
* feat: export Toast component in client package
- Added export for the Toast component in index.ts to enhance modularity and accessibility of components.
* feat: /client transition to @librechat/client
* chore: fixed formatting issues
* fix: update peer dependencies in @librechat/client to prevent bundling them
* fix: correct useSprings implementation in SplitText component
* fix: circular dependencies in DataTable
* fix: add remaining peer dependencies and match actual versions previously used in `client/package.json`
* fix: correct frontend:ci script to include client package build
* chore: enhance unused package detection for @librechat/client and improve dependency extraction
* fix: add missing peer dependency for @radix-ui/react-collapsible
* chore: include "packages/client" in unused i18next keys detection
* test: update AgentFooter tests to use document.querySelector for spinner checks
test: mock window.matchMedia in setupTests.js for consistent test environment
* feat: add react-hook-form dependency and update FormInput component to use its types
* chore: linting
* refactor: remove unused defaultSelectedValues prop from MCPSelect and MultiSelect components
* chore: linting
* feat: update GitHub Actions workflow to publish @librechat/client
* chore: update GitHub Actions workflow to install and build data-provider and client dependencies
* chore: add missing @testing-library/react dependency to client package
* chore: update tsconfig.json to exclude additional test files
* chore: fix build issues, resolve latest LC changes
* chore: move MCP components outside of `~/components/ui`
* feat: implement dynamic theme system with environment variable support and Tailwind CSS integration
* chore: remove unnecessary logging of sttExternal and ttsExternal in Speech component
* chore: squashed cleanup commits
chore: move @tanstack/react-virtual to dependencies and remove recoil from package.json
chore: move dependencies to peerDependencies in package.json
feat: update package.json and rollup.config.js to include jotai and enhance bundling configuration
feat: update package.json and rollup.config.js to include jotai and enhance bundling configuration
refactor: reorganize exports in index.ts for improved clarity
refactor: remove unused types and interfaces from common files
refactor: update peer dependencies and improve component typings
- Removed duplicate peer dependencies from package.json and organized them.
- Updated rollup.config.js to disable TypeScript checking during the build process.
- Modified AnimatedTabs component to use React.ReactNode for label and content types, and added TypeScript workarounds for compatibility.
- Enhanced Label and Separator components to accept an optional className prop and improved prop spreading.
- Updated Slider component to include an optional className prop and refined prop handling for better type safety.
refactor: clean up client workflow and update package dependencies
refactor: update package dependencies and improve PostCSS and Rollup configurations
chore: bump version to 0.1.2 in package.json
chore: bump client version to 0.1.2 in package-lock.json
chore: bump client version to 0.1.3 and update dependencies
chore: bump client version to 0.1.4 and update @react-spring dependencies
chore: update package version to 0.1.5 and adjust peer dependencies
- Bump version in package.json from 0.1.4 to 0.1.5.
- Update peer dependency for @tanstack/react-query to allow version 5.0.0.
- Add @tanstack/react-table and @tanstack/react-virtual as dependencies.
- Update various dependencies to their latest compatible versions.
- Simplify postcss.config.js by removing unnecessary options.
- Clean up rollup.config.js by removing ignored PostCSS warnings.
- Update CheckboxButton component to cast icon as React JSX element.
- Adjust Combobox component's class names for better styling.
- Change DropdownPopup component to use React's namespace import.
- Modify InputOTP component to use 'any' type for OTPInputContext.
- Ensure displayLabel and value in ModelParameters are converted to strings.
- Update MultiSearch component's placeholder to ensure it's a string.
- Cast selectIcon in MultiSelect as React JSX element for consistency.
- Update OGDialogTemplate to cast selectText as React JSX element.
- Initialize animationRef in PixelCard with undefined for clarity.
- Add TypeScript ignore comments in Select and SelectDropDown components for Radix UI type conflicts.
- Ensure title in SelectDropDown is a string and adjust rendering of options.
- Update useLocalize hook to cast options as any for compatibility.
refactor: code structure; chore: translations cleanup
chore: remove unused imports and clean up code in NewChat component
refactor: enhance Menu component to support custom render functions for menu items
style: update itemClassName in ToolsDropdown for improved UI consistency
fix: merge conflicts
chore: update @radix-ui/react-accordion to version 1.2.11
* refactor: remove unnecessary TypeScript type assertions in AnimatedTabs, Label, Separator, and Slider components
* feat: enhance theme system with localStorage persistence and new theme atoms
* chore: bump version of @librechat/client to 0.1.7
* chore: fix ci/cd warnings/errors related to linting and unused localization keys
* chore: update dependencies for class-variance-authority, clsx, and match-sorter
* chore: bump @librechat/client to v0.1.8
* feat: add utility colors for theme customization and remove unused tailwindConfig
* v0.1.9
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* 📦 chore: Remove `keyv` from peerDependencies in package.json and package-lock.json for data-schemas
* refactor: replace traverse import with custom object-traverse utility for better control and error handling during logging
* chore(data-schemas): bump version to 0.0.15 and remove unused dependencies
* refactor: optimize message construction in debugTraverse
* chore: update Node.js version to 20.x in data-schemas workflow
* 🐛 fix: Fix import error causing temporary chats to still display in sidebar
* refactor: Update import path for `getCustomConfig` in Conversation and Message models
* chore: eslint warnings
* ci: add tests for Conversation and Message models
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
- Refactored MCPSelect and MCPSubMenu components to utilize a new custom hook, `useMCPServerManager`, for improved state management and server initialization logic.
- Added functionality to handle simultaneous MCP server initialization requests, including cancellation and user notifications.
- Updated translation files to include new messages for initialization cancellation.
- Improved the configuration dialog handling for MCP servers, streamlining the user experience when managing server settings.
* 📱 refactor: Redis Client Error Logging and Ping only when Ready
* chore: intellisense for warning comment for Keyv Redis client regarding prefix support
* ✨ feat: Add support for forced in-memory cache keys configuration
* refactor: Update cache keys to use uppercase constants and moved cache for `librechat.yaml` into its own cache namespace (STATIC_CONFIG) and with a more descriptive key (LIBRECHAT_YAML_CONFIG)
* refactor: prefer `agent.model` (user-facing value) over `agent.model_parameters.model` to ensure Azure mapping
* chore: update @librechat/agents to version 2.4.68 to use new default title prompt for completion title method
* chore: update version to v0.7.9 across all relevant files
* 🔧 chore: bump @librechat/api version to 1.2.9
* 🔧 chore: update @librechat/data-schemas version to 0.0.12
* 🔧 chore: bump librechat-data-provider version to 0.7.902
- Updated StreamableHTTPOptionsSchema to accept "http" alongside "streamable-http".
- Enhanced isStreamableHTTPOptions function to handle both types and validate URLs accordingly.
- Added tests to ensure correct processing of "http" type options and rejection of websocket URLs.
* ✨ feat: Add connection status endpoint for MCP servers
- Implemented a new endpoint to retrieve the connection status of all MCP servers without disconnecting idle connections.
- Enhanced MCPManager class with a method to get all user-specific connections.
* feat: add silencer arg to loadCustomConfig function to conditionally print config details
- Modified loadCustomConfig to accept a printConfig parameter that allows me to prevent the entire custom config being printed every time it is called
* fix: new status endpoint actually works now, changes to manager.ts to support it
- Updated the connection status endpoint to utilize Maps for app and user connections, rather than incorrectly treating them as objects.
- Introduced a new method + variable in MCPManager to track servers requiring OAuth discovered at startup.
- Stopped OAuth flow from continuing once detected during startup for a new connection
* refactor: Remove hasAuthConfig since we can get that on the frontend without needing to use the endpoint
* feat: Add MCP connection status query and query key for new endpoint
- Introduced a new query hook `useMCPConnectionStatusQuery` to fetch the connection status of MCP servers.
- Added request in data-service
- Defined the API endpoint for retrieving MCP connection status in api-endpoints.ts.
- Defined new types for MCP connection status responses in the types module.
- Added mcpConnectionStatus key
* feat: Enhance MCPSelect component with connection status and server configuration
- Added connection status handling for MCP servers using the new `useMCPConnectionStatusQuery` hook.
- Implemented logic to display appropriate status icons based on connection state and authentication configuration.
- Updated the server selection logic to utilize configured MCP servers from the startup configuration.
- Refactored the rendering of configuration buttons and status indicators for improved user interaction.
* refactor: move MCPConfigDialog to its own MCP subdir in ui and update import
* refactor: silence loadCustomConfig in status endpoint
* feat: Add optional pluginKey parameter to getUserPluginAuthValue
* feat: Add MCP authentication values endpoint and related queries
- Implemented a new endpoint to check authentication value flags for specific MCP servers, returning boolean indicators for each custom user variable.
- Added a corresponding query hook `useMCPAuthValuesQuery` to fetch authentication values from the frontend.
- Defined the API endpoint for retrieving MCP authentication values in api-endpoints.ts.
- Updated data-service to include a method for fetching MCP authentication values.
- Introduced new types for MCP authentication values responses in the types module.
- Added a new query key for MCP authentication values.
* feat: Localize MCPSelect component status labels and aria attributes
- Updated the MCPSelect component to use localized strings for connection status labels and aria attributes, enhancing accessibility and internationalization support.
- Added new translation keys for various connection states in the translation.json file.
* feat: Implement filtered MCP values selection based on connection status in MCPSelect
- Added a new `filteredSetMCPValues` function to ensure only connected servers are selectable in the MCPSelect component.
- Updated the rendering logic to visually indicate the connection status of servers by adjusting opacity.
- Enhanced accessibility by localizing the aria-label for the configuration button.
* feat: Add CustomUserVarsSection component for managing user variables
- Introduced a new `CustomUserVarsSection` component to allow users to configure custom variables for MCP servers.
- Integrated localization for user interface elements and added new translation keys for variable management.
- Added functionality to save and revoke user variables, with visual indicators for set/unset states.
* feat: Enhance MCPSelect and MCPConfigDialog with improved state management and UI updates
- Integrated `useQueryClient` to refetch queries for tools, authentication values, and connection status upon successful plugin updates in MCPSelect.
- Simplified plugin key handling by directly using the formatted plugin key in save and revoke operations.
- Updated MCPConfigDialog to include server status indicators and improved dialog content structure for better user experience.
- Added new translation key for active status in the localization files.
* feat: Enhance MCPConfigDialog with dynamic server status badges and localization updates
- Added a helper function to render status badges based on the connection state of the MCP server, improving user feedback on connection status.
- Updated the localization files to include new translation keys for connection states such as "Connecting" and "Offline".
- Refactored the dialog to utilize the new status rendering function for better code organization and readability.
* feat: Implement OAuth handling and server initialization in MCP reinitialize flow
- Added OAuth handling to the MCP reinitialize endpoint, allowing the server to capture and return OAuth URLs when required.
- Updated the MCPConfigDialog to include a new ServerInitializationSection for managing server initialization and OAuth flow.
- Enhanced the user experience by providing feedback on server status and OAuth requirements through localized messages.
- Introduced new translation keys for OAuth-related messages in the localization files.
- Refactored the MCPSelect component to remove unused authentication configuration props.
* feat: Make OAuth actually work / update after OAuth link authorized
- Improved the handling of OAuth flows in the MCP reinitialize process, allowing for immediate return when OAuth is initiated.
- Updated the UserController to extract server names from plugin keys for better logging and connection management.
- Enhanced the MCPSelect component to reflect authentication status based on OAuth requirements.
- Implemented polling for OAuth completion in the ServerInitializationSection to improve user feedback during the connection process.
- Refactored MCPManager to support new OAuth flow initiation logic and connection handling.
* refactor: Simplify MCPPanel component and enhance server status display
- Removed unused imports and state management related to user plugins and server reinitialization.
- Integrated connection status handling directly into the MCPPanel for improved user feedback.
- Updated the rendering logic to display server connection states with visual indicators.
- Refactored the editing view to utilize new components for server initialization and custom user variables management.
* chore: remove comments
* chore: remove unused translation key for MCP panel
* refactor: Rename returnOnOAuthInitiated to returnOnOAuth for clarity
* refactor: attempt initialize on server click
* feat: add cancel OAuth flow functionality and related UI updates
* refactor: move server status icon logic into its own component
* chore: remove old localization strings (makes more sense for icon labels to just use configure stirng since thats where it leads to)
* fix: fix accessibility issues with MCPSelect
* fix: add missing save/revoke mutation logic to MCPPanel
* styling: add margin to checkmark in MultiSelect
* fix: add back in customUserVars check to hide gear config icon for servers without customUserVars
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
* fix: resource parameter undefined TypeError in log
* chore: Add missing FILE_SEARCH permission type to IRole interface
* chore: Bump version of @librechat/data-schemas to 0.0.11
* fix: Ensure resource is defined and handle potential null values in OAuth flow
* ✨ feat: Add MCP Reinitialization to MCPPanel
- Refactored tool caching to include user-specific tools in various service files.
- Refactored MCPManager class for clarity
- Added a new endpoint for reinitializing MCP servers, allowing for dynamic updates of server configurations.
- Enhanced the MCPPanel component to support server reinitialization with user feedback.
* 🔃 refactor: Simplify Plugin Deduplication and Clear Cache Post-MCP Initialization
- Replaced manual deduplication of tools with the dedicated `filterUniquePlugins` function for improved readability.
- Added back cache clearing for tools after MCP initialization to ensure fresh data is used.
- Removed unused exports from `PluginController.js` to clean up the codebase.
* 🏗️ refactor: Extract reasoning key logic into separate function
* refactor: Ensure `overrideProvider` is always defined in `getProviderConfig` result, and only used in `initializeAgent` if different from `agent.provider`
* feat: new title configuration options across services
- titlePrompt
- titleEndpoint
- titlePromptTemplate
- new "completion" titleMethod (new default)
* chore: update @librechat/agents and conform openai version to prevent SDK errors
* chore: add form-data package as a dependency and override to v4.0.4 to address CVE-2025-7783
* feat: add support for 'all' endpoint configuration in AppService and corresponding tests
* refactor: replace HttpsProxyAgent with ProxyAgent from undici for improved proxy handling in assistant initialization
* chore: update frontend review workflow to limit package paths to data-provider
* chore: update backend review workflow to include all package paths
* refactor: Move draft-related utilities to a new `drafts.ts` file
* refactor: auto-save draft logic to use new get/set functions
* fix: Ensure `getDraft` properly decodes stored draft values
* fix: Handle edge case where stream is cancelled before any response, which creates a blank page
* 📦 chore: bump `compression` from 1.7.4 to 1.8.1
* chore: bump `express-session` to v1.18.2
* chore: update `connect-redis` from v7.1.0 to v8.1.0
* chore: update import for `connect-redis` to use named export due to v8.0.0 breaking change
- Added firecrawlOptions configuration field to librechat.yaml
- Refactored web.ts to live in packages/api rather than data-provider
- Updated imports from web.ts to reflect new location
- Added firecrawlOptions to FirecrawlConfig interface
- Added firecrawlOptions to authResult of loadWebSearchAuth so it gets properly passed to agents to be built into firecrawl payload
- Added tests for firecrawlOptions to web.spec.ts
- Updated the logic to auto-enable the Responses API when web search is enabled, specifically for OpenAI, Azure, and Custom endpoints.
- Added import for EModelEndpoint to facilitate endpoint compatibility checks.
* wip: first pass content strings
* 📦 chore: update @langchain/core to v0.3.62 for data-provider dev dep.
* 📦 chore: bump @langchain/core to v0.3.62 for api dep.
* 📦 chore: move @langchain/core to peerDependencies in package.json and package-lock.json
* fix: update formatContentStrings to create HumanMessage directly from formatted content
* chore: import order
* 🕒 refactor: Use Legacy Content for Custom Endpoints to Improve Compatibility
- Also applies to Azure serverless endpoints from AI Foundry
* chore: move useLegacyContent condition before early return
* fix: Ensure useLegacyContent is set only when options are available
* 🌊 feat: Add Disable Streaming Option in Configuration
- Introduced a new setting to disable streaming responses in openAI, Azure, and custom endpoint parameter panels.
- Updated translation files to include labels and descriptions for the disable streaming feature.
- Modified relevant schemas and parameter settings to support the new disable streaming functionality.
* 🔧 fix: disableStreaming state not persisting when returning to a conversation
- Added disableStreaming field to the IPreset interface and conversationPreset.
- Moved toggles and sliders around for nicer left-right UI split in parameters panel.
- Removed old reference to 'grounding' ub conversationPreset (now web_search) and added web_search to IPreset.
* fix: Add `isRegenerate` flag to chat payload to avoid saving temporary response IDs
* fix: Remove unused `isResubmission` flag
* ci: Add tests for responseMessageId regeneration logic in BaseClient
* Fix scanning of the uploaded images folder on startup
* Re-write tests to pass linting
* Disable image output gzip scan by default
* Add `ENABLE_IMAGE_OUTPUT_GZIP_SCAN` to `.env.example`
Implements permission validation before allowing agent avatar uploads. Only admins, the agent's author, or users of collaborative agents can modify avatars. Also improves error handling by checking for agent existence upfront and simplifies avatar update logic.
Co-authored-by: Sai Nihas <sai.nihas@shopify.com>
- Added Constants import in PluginController for better organization.
- Renamed cachedTools to cachedToolsArray for clarity in PluginController.
- Ensured getCachedTools returns an empty object if no tools are found.
- Cleared tools array cache after MCP initialization in initializeMCP for consistency.
* fix: false flagging object as empty object when it has `additionalProperties` field
* 🔧 fix: Implement $ref resolution in JSON Schema handling
* 🔧 fix: Resolve JSON Schema references before conversion to Zod
* chore: move zod logic packages/api
* 🔧 fix: Handle optional arguments in `useParseArgs` and improve tool call condition
* chore: Remove math plugins from `MarkdownLite`
* ✨ feat: Add Error Boundary to Markdown Component for Enhanced Error Handling
- Introduced `MarkdownErrorBoundary` to catch and display errors during Markdown rendering.
- Updated the `Markdown` component to utilize the new error boundary, improving user experience by handling rendering issues gracefully.
* Revert "chore: Remove math plugins from `MarkdownLite`"
This reverts commit d393099d52.
* ✨ feat: Introduce MarkdownErrorBoundary for improved error handling in Markdown components
* refactor: include most markdown elements in error boundary fallback, aside from problematic plugins
* feat: Enhance loadServiceKey to support stringified JSON input
* chore: Update GOOGLE_SERVICE_KEY_FILE_PATH to GOOGLE_SERVICE_KEY_FILE for consistency
- Introduced new violation scores for TTS, STT, Fork, Import, and File Upload actions in the .env.example file.
- Updated logViolation function to accept a score parameter, allowing for dynamic severity levels based on the action type.
- Modified limiters for Fork, Import, Message, STT, TTS, Tool Call, and File Upload to utilize the new violation scores when logging violations.
* Updated the PATCH /memories/:key endpoint to allow key changes while ensuring no duplicate keys exist.
* Improved error handling in MemoryCreateDialog and MemoryEditDialog for key validation and duplication scenarios.
* Added a new translation for memory key validation error in translation.json.
* 🔧 refactor: Improve Google Key Handling in `loadAsyncEndpoints`
- Enhanced logic to check if GOOGLE_KEY is provided, including user-provided checks.
- Updated service key loading mechanism to only attempt loading if GOOGLE_KEY is not provided.
- Added error logging for service key loading failures.
* 🔧 refactor: Enhance service key loading logic in `initializeClient`
* chore: bump @librechat/agents to v2.4.56
* chore: bump @librechat/api version to 1.2.6
* fix: initialize reasoningKey to 'reasoning_content' in createRun function
- Updated the Google configuration and related schemas to replace 'grounding' with 'web_search' for consistency.
- Adjusted the logic in the getGoogleConfig function to reflect the new naming convention.
- Ensured all references in parameter settings and conversation schemas are updated accordingly.
* chore: bump @librechat/agents to ^2.4.54 for anthropic web search support
* WIP: hardcoded web search tool usage
* feat: Implement web search functionality in Anthropic integration
- Updated parameters panel to include web search for anthropic models.
- Updated necessary schemas to accomodate toggle functionality
* chore: Set default web search option to false in anthropicSettings
* refactor: Rename webSearch to web_search for consistency across settings and schemas
* chore: bump @librechat/agents to v2.4.55
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
* 🔍 feat: Add SearXNG Web Search support and enhance ApiKeyDialog
- Updated WebSearch component to include authentication data for web search functionality so it won't show badge after being revoked
- Refactored ApiKeyDialog to streamline provider, scraper, and reranker selection with new InputSection component
- Added support for SearXNG as a search provider and updated translation files accordingly
- Improved form handling in useAuthSearchTool to accommodate new API keys and URLs
* 📜 chore: remove unused i18next key
* 📦 chore: address comments (swap API key and URL fields in SearXNG config, change input fields to 'text' from 'password'
* 📦 chore: make URL fields go first in ApiKeyDialog
* chore: bump @librechat/agents to v2.4.52
* ci: update webSearch configuration to include searxng fields in AppService.spec.js
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* chore: Improve error logging for fetching conversations, and use new TS packages for utils
* feat: Implement fork limiters for conversation forking requests
* chore: error message for conversation index deletion to clarify syncing behavior
* feat: Enhance error handling for forking with rate limit message
* refactor: Add validation schemas for agent creation and updates
* fix: Ensure author validation is applied in correct order for agent update handler
* ci: Add comprehensive unit tests for agent creation and update handlers with mass assignment protection
* fix: add missing web_search tool in system tools configuration
* feat: add useAgentCapabilities hook to manage agent capabilities
* refactor: move agents and endpoints configuration to AgentPanel context provider
* refactor: implement useGetAgentsConfig hook for consolidated agents and endpoints management
* refactor: enhance ToolsDropdown to utilize agent capabilities and streamline dropdown item rendering
* chore: reorder return values in useAgentCapabilities for improved clarity
* refactor: enhance agent capabilities handling in AttachFileMenu and update file handling logic to allow capabilities to be used for non-agents endpoints
* 🔧 fix: Update type annotations in useEventHandlers for better type safety
* 🔧 refactor: `useToolToggle` for improved localStorage synchronization and allow string/falsy values for setting to storage
* ✨ feat: Implement Artifacts badge to BadgeRow with toggle options and UI components
- Added Artifacts component to manage artifacts state and options.
- Introduced ArtifactsSubMenu for additional settings related to artifacts.
- Integrated artifacts functionality into BadgeRow and ToolsDropdown components.
- Updated localStorage handling for artifacts state persistence.
- Enhanced localization for artifacts-related strings in translation files.
- Refactored Agent model to include artifacts in the ephemeral agent response.
* fix: set ephemeral agent state for conversation on finalization
* chore: remove beta settings dialog tab
* refactor: improve Ephemeral Agent statefulness
* fix: update setValue parameter to use 'value' instead of 'isChecked' in CheckboxButton
* refactor: update color classes for Artifact toggle and order of dropdown components
* chore: remove unused i18n localization
* 🔍 feat: Introduce Web Search Functionality for OpenAI API
- Added a new web_search parameter to enable web search capabilities in the OpenAI configuration.
- Updated the DynamicSlider component for improved styling.
- Enhanced the useSetIndexOptions hook to auto-enable the Responses API when web search is activated.
- Modified relevant schemas, types, and translation files to support the new web search feature.
* chore: remove comments
* refactor: tool handling in initializeAgent for better clarity and functionality and reflection of openai features
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* ✨ feat: Add Google Search Grounding Feature and Update Agent Tool Initialization
- Introduced a new grounding option in the Google configuration to enable real-time web search results.
- Updated the agent initialization to concatenate additional tools from options.
- Enhanced translation files to include descriptions for the new grounding feature.
- Modified relevant schemas and parameter settings to support the grounding functionality.
* 🔑 chore: Update @librechat/agents dependency to version 2.4.50
* ✅ fix: Ensure tools array is initialized before concatenation in initializeAgent function
* chore: Update version of librechat-data-provider to 0.7.899 and add GOOGLE_TOOL_CONFLICT error type
* fix: Adjust label class for better text wrapping in DynamicSwitch component
* fix: Handle Google tool conflict error and update error messages in translation
* fix: Restore grounding setting in googleCol2 configuration
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* Fixes https://github.com/danny-avila/LibreChat/issues/8099 in correctly setting up proxy support
- fixes the openid Strategy
- fixes the openid jwt strategy (jwksRsa fetching in a proxy environment)
Signed-off-by: Regli Daniel <daniel.regli1@sanitas.com>
* Fixes https://github.com/danny-avila/LibreChat/issues/8099 in correctly setting up proxy support
- properly formatted
Signed-off-by: Regli Daniel <1daniregli@gmail.com>
---------
Signed-off-by: Regli Daniel <daniel.regli1@sanitas.com>
Signed-off-by: Regli Daniel <1daniregli@gmail.com>
Co-authored-by: schnaker85 <1daniregligmail.com>
* 🐛 fix: Enhance provider validation and error handling in getProviderConfig function
* WIP: edit text part
* refactor: Allow updating of both TEXT and THINK content types in message updates
* WIP: first pass, save & submit
* chore: remove legacy generation user message field
* feat: merge edited content
* fix: update placeholder and description for bedrock setting
* fix: remove unsupported warning message for AI resubmission
* chore: update @librechat/agents to v2.4.47
* WIP: temporary auto-toggle responses api for o1/o3-pro
* feat: Enable Responses API for OpenAI models
- Updated the OpenAI client initialization to check for the useResponsesApi parameter in model options.
- Added translations for enabling the Responses API in the UI.
- Introduced useResponsesApi parameter in data provider settings and schemas.
- Updated relevant schemas to include useResponsesApi for conversation and preset configurations.
* refactor: Remove useResponsesApi check from OpenAI client initialization and update translation for Responses API
- Removed the check for useResponsesApi in the OpenAI client initialization.
- Updated the translation for enabling the Responses API to clarify its functionality.
* chore: update @librechat/agents dependency to version 2.4.48
* chore: update @librechat/agents dependency to version 2.4.49
* chore: linting
* chore: linting
* feat: Enhance DynamicSlider and validation for enumMappings
- Added support for enumMappings in DynamicSlider to display values correctly based on enum settings.
- Implemented validation for enumMappings in the generate function to ensure all options have corresponding mappings.
- Added tests for handling empty string options and incomplete enumMappings in the generate.spec.ts file.
* feat: Enhance DynamicSlider localization support
- Added localization handling for mapped values in DynamicSlider when using enumMappings.
- Updated the logic to check if the mapped value is a localization key and return the localized string if applicable.
- Adjusted dependencies in useCallback hooks to include localize for proper functionality.
* feat: Add reasoning summary and effort options to OpenAI configuration and UI
* feat: Add enumMappings for ImageDetail options in parameter settings
* style: Improve styling for DynamicSlider component labels and inputs
* chore: Update reasoning effort description and parameter order for OpenAI params
---------
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
* Implemented new uploadGoogleVertexMistralOCR function for processing OCR using Google Vertex AI.
* Added vertexMistralOCRStrategy to handle file uploads.
* Updated FileSources and OCRStrategy enums to include vertexai_mistral_ocr.
* Introduced helper functions for JWT creation and Google service account configuration loading.
* refactor: access control logic to TypeScript
* chore: Change EndpointURLs to a constant object for improved type safety
* 🐛 fix: Enhance agent access control by adding skipAgentCheck functionality
* 🐛 fix: Add endpointFileConfig prop to AttachFileMenu and update file handling logic
* 🐛 fix: Update tool handling logic to support optional groupedTools and improve null checks, add dedicated tool dialog for Assistants
* chore: Export Accordion component from UI index for improved modularity
* feat: Add ActivePanelContext for managing active panel state across components
* chore: Replace string IDs with EModelEndpoint constants for assistants and agents in useSideNavLinks
* fix: Integrate access checks for agent creation and deletion routes in actions.js
* feat: Add configurable retention period for temporary chats
* Addressing eslint errors
* Fix: failing test due to missing registration
* Update: variable name and use hours instead of days for chat retention
* Addressing comments
* chore: fix import order in Conversation.js
* chore: import order in Message.js
* chore: fix import order in config.ts
* chore: move common methods to packages/api to reduce potential for circular dependencies
* refactor: update temp chat retention config type to Partial<TCustomConfig>
* refactor: remove unused config variable from AppService and update loadCustomConfig tests with logger mock
* refactor: handle model undefined edge case by moving Session model initialization inside methods
---------
Co-authored-by: Rakshit Tiwari <rak1729e@gmail.com>
* feat: support thinking budget parameter for Gemini 2.5 series (#6949, #7542)
https://ai.google.dev/gemini-api/docs/thinking#set-budget
* refactor: update thinking budget minimum value to -1 for dynamic thinking
- see: https://ai.google.dev/gemini-api/docs/thinking#set-budget
* chore: bump @librechat/agents to v2.4.43
* refactor: rename LLMConfigOptions to OpenAIConfigOptions for clarity and consistency
- Updated type definitions and references in initialize.ts, llm.ts, and openai.ts to reflect the new naming convention.
- Ensured that the OpenAI configuration options are consistently used across the relevant files.
* refactor: port Google LLM methods to TypeScript Package
* chore: update @librechat/agents version to 2.4.43 in package-lock.json and package.json
* refactor: update thinking budget description for clarity and adjust placeholder in parameter settings
* refactor: enhance googleSettings default value for thinking budget to support dynamic adjustment
* chore: update @librechat/agents to v2.4.44 for Vertex Dynamic Thinking workaround
* refactor: rename google config function, update `createRun` types, use `reasoning` as `reasoningKey` for Google
* refactor: simplify placeholder handling in DynamicInput component
* refactor: enhance thinking budget description for clarity and allow automatic decision by setting to "-1"
* refactor: update text styling in OptionHover component for improved readability
* chore: update @librechat/agents dependency to v2.4.46 in package.json and package-lock.json
* chore: update @librechat/api version to 1.2.5 in package.json and package-lock.json
* refactor: enhance `clientOptions` handling by filtering `omitTitleOptions`, add `json` field for Google models
---------
Co-authored-by: ciffelia <15273128+ciffelia@users.noreply.github.com>
* Enhanced existing tests for the `resolveHeaders` function to cover all user field placeholders and messy scenarios.
* Added basic integration tests for custom endpoints initialization file
* 🔧 fix: enhance client options handling in AgentClient and set default recursion limit
- Updated the recursion limit to default to 25 if not specified in agentsEConfig.
- Enhanced client options in AgentClient to include model parameters such as apiKey and anthropicApiUrl from agentModelParams.
- Updated requestOptions in the anthropic endpoint to use reverseProxyUrl as anthropicApiUrl.
* Enhance LLM configuration tests with edge case handling
* chore add return type annotation for getCustomEndpointConfig function
* fix: update modelOptions handling to use optional chaining and default to empty object in multiple endpoint initializations
* chore: update @librechat/agents to version 2.4.42
* refactor: streamline agent endpoint configuration and enhance client options handling for title generations
- Introduced a new `getProviderConfig` function to centralize provider configuration logic.
- Updated `AgentClient` to utilize the new provider configuration, improving clarity and maintainability.
- Removed redundant code related to endpoint initialization and model parameter handling.
- Enhanced error logging for missing endpoint configurations.
* fix: add abort handling for image generation and editing in OpenAIImageTools
* ci: enhance getLLMConfig tests to verify fetchOptions and dispatcher properties
* fix: use optional chaining for endpointOption properties in getOptions
* fix: increase title generation timeout from 25s to 45s, pass `endpointOption` to `getOptions`
* fix: update file filtering logic in getToolFilesByIds to ensure text field is properly checked
* fix: add error handling for empty OCR results in uploadMistralOCR and uploadAzureMistralOCR
* fix: enhance error handling in file upload to include 'No OCR result' message
* chore: update error messages in uploadMistralOCR and uploadAzureMistralOCR
* fix: enhance filtering logic in getToolFilesByIds to include context checks for OCR resources to only include files directly attached to agent
---------
Co-authored-by: Matt Burnett <matt.burnett@shopify.com>
* 🔧 fix: Adjust typography and border styles for improved readability in markdown components
* 🔧 fix: Enhance code block styling in markdown for better visibility and consistency
* 🔧 fix: Adjust margins and line heights for improved readability in markdown elements
* 🔧 fix: Adjust spacing for horizontal rules in markdown for improved consistency
* 🔧 fix: Refactor DialogImage component for improved quality styling and layout consistency
* 🔧 fix: Enhance zoom and pan functionality in DialogImage component with improved controls and user experience
* 🔧 fix: Improve zoom and pan functionality in DialogImage component with enhanced controls and reset zoom feature
* new env variable for mcp label
* 🔄 refactor: Update MCPSelect placeholderText to draw from interface section of librechat.yaml rather than .env
* 🧹 chore: extract mcpServers schema for better maintainability
* 🔄 refactor: Update MCPSelect and useMCPSelect to utilize TPlugin type for better type consistency
* 🔄 refactor: Pass placeholder from startupConfig to MCPSubMenu for improved localization
* 🔄 refactor: Integrate startupConfig into BadgeRowContext and related components for enhanced configuration management
---------
Co-authored-by: mwbrandao <mariana.brandao@nos.pt>
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🔧 refactor: move `processMCPEnv` from `librechat-data-provider` and move to `@librechat/api`
* 🔧 refactor: Update resolveHeaders import paths
* 🔧 refactor: Enhance resolveHeaders to support user and custom variables
- Updated resolveHeaders function to accept user and custom user variables for placeholder replacement.
- Modified header resolution in multiple client and controller files to utilize the enhanced resolveHeaders functionality.
- Added comprehensive tests for resolveHeaders to ensure correct processing of user and custom variables.
* 🔧 fix: Update user ID placeholder processing in env.ts
* 🔧 fix: Remove arguments passing this.user rather than req.user
- Updated multiple client and controller files to call resolveHeaders without the user parameter
* 🔧 refactor: Enhance processUserPlaceholders to be more readable / less nested
* 🔧 refactor: Update processUserPlaceholders to pass all tests in mpc.spec.ts and env.spec.ts
* chore: remove legacy ChatGPTClient
* chore: remove LLM initialization code
* chore: initial deprecation removal of `gptPlugins`
* chore: remove cohere-ai dependency from package.json and package-lock.json
* chore: update brace-expansion to version 2.0.2 and add license information
* chore: remove PluginsClient test file
* chore: remove legacy
* ci: remove deprecated sendMessage/getCompletion/chatCompletion tests
---------
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
* refactor(buildEndpointOption): Improve error logging in middleware, consolidate `isAgents` builder logic, remove adding `modelsConfig` to `endpointOption`
* refactor: parameter extraction and organization in agent services, minimize redundancy of shared fields across objects, make clear distinction of parameters processed uniquely by LibreChat vs LLM Provider Configs
* refactor(createPayload): streamline all endpoints to agent route
* fix: add `modelLabel` to response sender options for agent initialization
* chore: correct log message context in EditController abort controller cleanup
* chore: remove unused abortRequest hook
* chore: remove unused addToCache module and its dependencies
* refactor: remove AskController and related routes, update endpoint URLs (now all streamlined to agents route)
* chore: remove unused bedrock route and its related imports
* refactor: simplify response sender logic for Google endpoint
* chore: add `modelDisplayLabel` handling for agents endpoint
* feat: add file search capability to ephemeral agents, update code interpreter selection based of file upload, consolidate main upload menu for all endpoints
* feat: implement useToolToggle hook for managing tool toggle state, refactor CodeInterpreter and WebSearch components to utilize new hook
* feat: add ToolsDropdown component to BadgeRow for enhanced tool options
* feat: introduce BadgeRowContext and BadgeRowProvider for managing conversation state, refactor related components to utilize context
* feat: implement useMCPSelect hook for managing MCP selection state, refactor MCPSelect component to utilize new hook
* feat: enhance BadgeRowContext with MCPSelect and tool toggle functionality, refactor related components to utilize updated context and hooks
* refactor: streamline useToolToggle hook by integrating setEphemeralAgent directly into toggle logic and removing redundant setValue function
* refactor: consolidate codeApiKeyForm and searchApiKeyForm from CodeInterpreter and WebSearch to utilize new context properties
* refactor: update CheckboxButton to support controlled state and enhance ToolsDropdown with permission-based toggles for web search and code interpreter
* refactor: conditionally render CheckboxButton in CodeInterpreter and WebSearch components for improved UI responsiveness
* chore: add jotai dependency to package.json and package-lock.json
* chore: update brace-expansion package to version 2.0.2 in package-lock.json due to CVE-2025-5889
* Revert "chore: add jotai dependency to package.json and package-lock.json"
This reverts commit 69b6997396.
* refactor: add pinning functionality to CodeInterpreter and WebSearch components, and enhance ToolsDropdown with pin toggle for web search and code interpreter
* chore: move MCPIcon to correct location, remove duplicate
* fix: update MCP import to use type-only import from librechat-data-provider
* feat: implement MCPSubMenu component and integrate pinning functionality into ToolsDropdown
* fix: cycling to submenu by using parent menu context
* feat: add FileSearch component and integrate it into BadgeRow and ToolsDropdown
* chore: import order
* chore: remove agent specific logic that would block functionality for streamlined endpoints
* chore: linting for `createContextHandlers`
* chore: ensure ToolsDropdown doesn't show up for agents
* chore: ensure tool resource is selected when dragged to UI
* chore: update file search behavior to simulate legacy functionality
* feat: ToolDialogs with multiple trigger references, add settings to tool dropdown
* refactor: simplify web search and code interpreter settings checks
* chore: simplify local storage key for pinned state in useToolToggle
* refactor: reinstate agent check in AttachFileChat component, as individual providers will ahve different file configurations
* ci: increase timeout for MongoDB connection in Agent tests
* chore: update peer dependency for @librechat/agents to version 2.4.41
* 🔧 chore: proxy handling in OpenAI endpoint to use undici
* 🔧 chore: update @anthropic-ai/sdk to version 0.52.0 and refactor proxy handling to use undici
* 🔧 chore: update globIgnores in vite.config.ts to exclude index.html from caching
* 🔧 ci: update proxy handling in getLLMConfig to use fetchOptions and ProxyAgent
* 🔧 chore: refactor proxy handling in Anthropic and OpenAI clients to use fetchOptions
* refactor: agent initialization to streamline model parameters and resendFiles handling
* chore: update @google/generative-ai to version 0.24.0
* fix: Use mutable version of conversation in useChatFunctions
* fix: Use cloneDeep for conversation in useChatFunctions to ensure immutability
---------
Co-authored-by: lucioperca <lucioperca@users.noreply.github.com>
* 🗝️ feat: Per-User Credentials for MCP Servers
chore: add aider to gitignore
feat: fill custom variables to MCP server
feat: replace placeholders with custom user MCP variables
feat: handle MCP install/uninstall (uses pluginauths)
feat: add MCP custom variables dialog to MCPSelect
feat: add MCP custom variables dialog to the side panel
feat: do not require to fill MCP credentials for in tools dialog
feat: add translations keys (en+cs) for custom MCP variables
fix: handle LIBRECHAT_USER_ID correctly during MCP var replacement
style: remove unused MCP translation keys
style: fix eslint for MCP custom vars
chore: move aider gitignore to AI section
* feat: Add Plugin Authentication Methods to data-schemas
* refactor: Replace PluginAuth model methods with new utility functions for improved code organization and maintainability
* refactor: Move IPluginAuth interface to types directory for better organization and update pluginAuth schema to use the new import
* refactor: Remove unused getUsersPluginsAuthValuesMap function and streamline PluginService.js; add new getPluginAuthMap function for improved plugin authentication handling
* chore: fix typing for optional tools property with GenericTool[] type
* chore: update librechat-data-provider version to 0.7.88
* refactor: optimize getUserMCPAuthMap function by reducing variable usage and improving server key collection logic
* refactor: streamline MCP tool creation by removing customUserVars parameter and enhancing user-specific authentication handling to avoid closure encapsulation
* refactor: extract processSingleValue function to streamline MCP environment variable processing and enhance readability
* refactor: enhance MCP tool processing logic by simplifying conditions and improving authentication handling for custom user variables
* ci: fix action tests
* chore: fix imports, remove comments
* chore: remove non-english translations
* fix: remove newline at end of translation.json file
---------
Co-authored-by: Aleš Kůtek <kutekales@gmail.com>
* ✨ feat: Enhance Agent Panel with Tool Grouping
* 🧰 feat: Added support for grouping tools in the Agent Panel, allowing for better organization and management of related tools.
* 💡 feat: Added hovercards for tools belonging to a group which display their tool descriptions when their help icon is hovered over.
* 🧹 chore: Updated the AgentPanelContext to include grouped tools and their metadata.
* 🔨 refactor: Refactored AgentConfig and AgentTool components to utilize the new tool structure and enhance rendering logic.
* 🔍 feat: Improved the ToolSelectDialog to filter and display tools based on user input, including searching for tools within a group, and limits viewport height to prevent overflowing vertically on smaller screens.
This update enhances the overall functionality and usability of the Agent Panel, making it easier for users to interact with tools.
* Potential fix for code scanning alert no. 6217: Disallow unused variables
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: Agent tool type mismatches
* fix: accessibility issues and mcp tool overflow issue
* fix: enhance keyboard accessibility and prevent event propagation in AgentTool
* chore: WIP types
* chore: address comments and fix accordian collapse bug
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: Markdown LaTeX processing
- Added micromark-extension-llm-math as a dependency in package.json and package-lock.json.
- Updated Vite configuration to alias micromark-extension-math.
- Modified Markdown components to use singleDollarTextMath: false for improved LaTeX rendering.
- Refactored latex utility functions to enhance LaTeX processing and escaping mechanisms.
* chore: linting of `EditTextPart`
* fix: handle key up to initiate edit of latest user message by adding id prop to Edit Message HoverButton
* chore: linting in Artifact component
* refactor: enhance LaTeX preprocessing functionality
- Updated `preprocessLaTeX` to improve handling of currency and LaTeX expressions.
- Introduced optimized regex patterns for better performance.
- Added support for escaping mhchem commands and handling code blocks.
- Enhanced tests for various LaTeX scenarios, including currency and special characters.
- Refactored existing tests to align with new preprocessing logic.
* chore: filter out false positives in unused packages workflow
- Added a grep command to exclude the micromark-extension-llm-math package from the list of unused dependencies in the GitHub Actions workflow.
* fix: Add null check for SelectedTTS in MessageAudio component to prevent rendering issues
* fix: image download browser compatibility with error handling and fallback mechanism
- Updated the downloadImage function to use fetch for improved reliability and added error handling.
- Implemented a fallback to the original download method in case of fetch failure.
- Ensured the download link uses a blob URL for better compatibility with various image types.
* chore: Update @modelcontextprotocol/sdk to version 1.12.3 in package.json and package-lock.json
- Bump version of @modelcontextprotocol/sdk to 1.12.3 to incorporate recent updates.
- Update dependencies for ajv and cross-spawn to their latest versions.
- Add ajv as a new dependency in the sdk module.
- Include json-schema-traverse as a new dependency in the sdk module.
* feat: @librechat/auth
* feat: Add crypto module exports to auth package
- Introduced a new crypto module by creating index.ts in the crypto directory.
- Updated the main index.ts of the auth package to export from the new crypto module.
* feat: Update package dependencies and build scripts for auth package
- Added @librechat/auth as a dependency in package.json and package-lock.json.
- Updated build scripts to include the auth package in both frontend and bun build processes.
- Removed unused mongoose and openid-client dependencies from package-lock.json for cleaner dependency management.
* refactor: Migrate crypto utility functions to @librechat/auth
- Replaced local crypto utility imports with the new @librechat/auth package across multiple files.
- Removed the obsolete crypto.js file and its exports.
- Updated relevant services and models to utilize the new encryption and decryption methods from @librechat/auth.
* feat: Enhance OAuth token handling and update dependencies in auth package
* chore: Remove Token model and TokenService due to restructuring of OAuth handling
- Deleted the Token.js model and TokenService.js, which were responsible for managing OAuth tokens.
- This change is part of a broader refactor to streamline OAuth token management and improve code organization.
* refactor: imports from '@librechat/auth' to '@librechat/api' and add OAuth token handling functionality
* refactor: Simplify logger usage in MCP and FlowStateManager classes
* chore: fix imports
* feat: Add OAuth configuration schema to MCP with token exchange method support
* feat: FIRST PASS Implement MCP OAuth flow with token management and error handling
- Added a new route for handling OAuth callbacks and token retrieval.
- Integrated OAuth token storage and retrieval mechanisms.
- Enhanced MCP connection to support automatic OAuth flow initiation on 401 errors.
- Implemented dynamic client registration and metadata discovery for OAuth.
- Updated MCPManager to manage OAuth tokens and handle authentication requirements.
- Introduced comprehensive logging for OAuth processes and error handling.
* refactor: Update MCPConnection and MCPManager to utilize new URL handling
- Added a `url` property to MCPConnection for better URL management.
- Refactored MCPManager to use the new `url` property instead of a deprecated method for OAuth handling.
- Changed logging from info to debug level for flow manager and token methods initialization.
- Improved comments for clarity on existing tokens and OAuth event listener setup.
* refactor: Improve connection timeout error messages in MCPConnection and MCPManager and use initTimeout for connection
- Updated the connection timeout error messages to include the duration of the timeout.
- Introduced a configurable `connectTimeout` variable in both MCPConnection and MCPManager for better flexibility.
* chore: cleanup MCP OAuth Token exchange handling; fix: erroneous use of flowsCache and remove verbose logs
* refactor: Update MCPManager and MCPTokenStorage to use TokenMethods for token management
- Removed direct token storage handling in MCPManager and replaced it with TokenMethods for better abstraction.
- Refactored MCPTokenStorage methods to accept parameters for token operations, enhancing flexibility and readability.
- Improved logging messages related to token persistence and retrieval processes.
* refactor: Update MCP OAuth handling to use static methods and improve flow management
- Refactored MCPOAuthHandler to utilize static methods for initiating and completing OAuth flows, enhancing clarity and reducing instance dependencies.
- Updated MCPManager to pass flowManager explicitly to OAuth handling methods, improving flexibility in flow state management.
- Enhanced comments and logging for better understanding of OAuth processes and flow state retrieval.
* refactor: Integrate token methods into createMCPTool for enhanced token management
* refactor: Change logging from info to debug level in MCPOAuthHandler for improved log management
* chore: clean up logging
* feat: first pass, auth URL from MCP OAuth flow
* chore: Improve logging format for OAuth authentication URL display
* chore: cleanup mcp manager comments
* feat: add connection reconnection logic in MCPManager
* refactor: reorganize token storage handling in MCP
- Moved token storage logic from MCPManager to a new MCPTokenStorage class for better separation of concerns.
- Updated imports to reflect the new token storage structure.
- Enhanced methods for storing, retrieving, updating, and deleting OAuth tokens, improving overall token management.
* chore: update comment for SYSTEM_USER_ID in MCPManager for clarity
* feat: implement refresh token functionality in MCP
- Added refresh token handling in MCPManager to support token renewal for both app-level and user-specific connections.
- Introduced a refreshTokens function to facilitate token refresh logic.
- Enhanced MCPTokenStorage to manage client information and refresh token processes.
- Updated logging for better traceability during token operations.
* chore: cleanup @librechat/auth
* feat: implement MCP server initialization in a separate service
- Added a new service to handle the initialization of MCP servers, improving code organization and readability.
- Refactored the server startup logic to utilize the new initializeMCP function.
- Removed redundant MCP initialization code from the main server file.
* fix: don't log auth url for user connections
* feat: enhance OAuth flow with success and error handling components
- Updated OAuth callback routes to redirect to new success and error pages instead of sending status messages.
- Introduced `OAuthSuccess` and `OAuthError` components to provide user feedback during authentication.
- Added localization support for success and error messages in the translation files.
- Implemented countdown functionality in the success component for a better user experience.
* fix: refresh token handling for user connections, add missing URL and methods
- add standard enum for system user id and helper for determining app-lvel vs. user-level connections
* refactor: update token handling in MCPManager and MCPTokenStorage
* fix: improve error logging in OAuth authentication handler
* fix: concurrency issues for both login url emission and concurrency of oauth flows for shared flows (same user, same server, multiple calls for same server)
* fix: properly fail shared flows for concurrent server calls and prevent duplication of tokens
* chore: remove unused auth package directory from update configuration
* ci: fix mocks in samlStrategy tests
* ci: add mcpConfig to AppService test setup
* chore: remove obsolete MCP OAuth implementation documentation
* fix: update build script for API to use correct command
* chore: bump version of @librechat/api to 1.2.4
* fix: update abort signal handling in createMCPTool function
* fix: add optional clientInfo parameter to refreshTokensFunction metadata
* refactor: replace app.locals.availableTools with getCachedTools in multiple services and controllers for improved tool management
* fix: concurrent refresh token handling issue
* refactor: add signal parameter to getUserConnection method for improved abort handling
* chore: JSDoc typing for `loadEphemeralAgent`
* refactor: update isConnectionActive method to use destructured parameters for improved readability
* feat: implement caching for MCP tools to handle app-level disconnects for loading list of tools
* ci: fix agent test
* 🔧 fix: Enhance user deletion script to allow deep deletion of related data
* 🔧 fix: Update user deletion script to confirm deep deletion of transaction history
* 🔧 fix: Refactor user deletion script to use graceful exit and ensure deep deletion of related data
* Update config/delete-user.js
is a good idea
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* chore: Update import for isEnabled utility in convoAccess middleware
* refactor: Migrate Share functionality to new methods structure in `@librechat/data-schemas`
- Deleted the old Share.js model and moved its functionality to a new share.ts file within the data-schemas package.
- Updated imports across the codebase to reflect the new structure.
- Enhanced error handling and logging in shared link operations.
- Introduced TypeScript types for shared links and related operations to improve type safety and maintainability.
* chore: Update promptGroupSchema validation with typing
* fix: error handling and logging in createSharedLink
* fix: don't allow empty shared link or shared link without messages
* ci: add tests for shared link methods
* chore: Bump version of @librechat/data-schemas to 0.0.9 in package.json and package-lock.json
* chore: Add nanoid as peer dependency
- Introduced `nanoid` as a dependency in `package.json` and `package-lock.json`.
- Replaced UUID generation with `nanoid` for creating unique conversation and message IDs in share methods tests.
* 🧹 chore: Remove Comments and Cleanup base64 handling for Azure Mistral OCR
* chore: Remove unnecessary await from MCP instructions formatting in AgentClient
* ci: Update document_url regex in MistralOCR tests to support PDF format
* feat: add MCP Panel to Agent Builder
- Add MCP server panel and configuration UI
- Implement MCP input forms and tool lists
- Add MCP icon and metadata support
- Integrate MCP with agent configuration
- Add localization support for MCP features
- Refactor components for better reusability
- Update types and add MCP-related mutations
- Fix small issues with Actions and AgentSelect
- Refactor AgentPanelSwitch and related components to use new
AgentPanelContext to reduce prop drilling
* chore: import order
* chore: clean up import statements and unused var in ActionsPanel component
* refactor: AgentPanelContext with actions query, remove unnecessary `actions` state
- Added actions query using `useGetActionsQuery` to fetch actions based on the current agent ID.
- Removed now unused `setActions` state and related logic from `AgentPanelContext` and `AgentPanelSwitch` components.
- Updated `AgentPanelContextType` to reflect the removal of `setActions`.
* chore: re-order import statements in AgentConfig component
* chore: re-order import statements in ModelPanel component
* chore: update ModelPanel props to consolidated props to avoid passing unnecessary props
* chore: update import statements in Providers index file to include ToastProvider and AgentPanelContext exports
* chore: clean up import statements in VersionPanel component
* refactor: streamline AgentConfig and AgentPanel components
- Consolidated props in AgentConfig to only include necessary fields.
- Updated AgentPanel to remove unused state and props, enhancing clarity and maintainability.
- Reorganized import statements for better structure and readability.
* refactor: replace default agent form values with utility function
- Updated AgentsProvider, AgentPanel, AgentSelect, and DeleteButton components to use getDefaultAgentFormValues utility function instead of directly importing defaultAgentFormValues.
- Enhanced the initialization of agent forms by incorporating localStorage values for model and provider in the new utility function.
* chore: comment out rendering MCPSection
---------
Co-authored-by: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
* 👁️ feat: Add Azure Mistral OCR strategy and endpoint integration
This commit introduces a new OCR strategy named 'azure_mistral_ocr', allowing the use of a Mistral OCR endpoint deployed on Azure. The configuration, schemas, and file upload strategies have been updated to support this integration, enabling seamless OCR processing via Azure-hosted Mistral services.
* 🗑️ chore: Clean up .gitignore by removing commented-out uncommon directory name
* chore: remove unused vars
* refactor: Move createAxiosInstance to packages/api/utils and update imports
- Removed the createAxiosInstance function from the config module and relocated it to a new utils module for better organization.
- Updated import paths in relevant files to reflect the new location of createAxiosInstance.
- Added tests for createAxiosInstance to ensure proper functionality and proxy configuration handling.
* chore: move axios helpers to packages/api
- Added logAxiosError function to @librechat/api for centralized error logging.
- Updated imports across various files to use the new logAxiosError function.
- Removed the old axios.js utility file as it is no longer needed.
* chore: Update Jest moduleNameMapper for improved path resolution
- Added a new mapping for '~/' to resolve module paths in Jest configuration, enhancing import handling for the project.
* feat: Implement Mistral OCR API integration in TS
* chore: Update MistralOCR tests based on new imports
* fix: Enhance MistralOCR configuration handling and tests
- Introduced helper functions for resolving configuration values from environment variables or hardcoded settings.
- Updated the uploadMistralOCR and uploadAzureMistralOCR functions to utilize the new configuration resolution logic.
- Improved test cases to ensure correct behavior when mixing environment variables and hardcoded values.
- Mocked file upload and signed URL responses in tests to validate functionality without external dependencies.
* feat: Enhance MistralOCR functionality with improved configuration and error handling
- Introduced helper functions for loading authentication configuration and resolving values from environment variables.
- Updated uploadMistralOCR and uploadAzureMistralOCR functions to utilize the new configuration logic.
- Added utility functions for processing OCR results and creating error messages.
- Improved document type determination and result aggregation for better OCR processing.
* refactor: Reorganize OCR type imports in Mistral CRUD file
- Moved OCRResult, OCRResultPage, and OCRImage imports to a more logical grouping for better readability and maintainability.
* feat: Add file exports to API and create files index
* chore: Update OCR types for enhanced structure and clarity
- Redesigned OCRImage interface to include mandatory fields and improved naming conventions.
- Added PageDimensions interface for better representation of page metrics.
- Updated OCRResultPage to include dimensions and mandatory images array.
- Refined OCRResult to include document annotation and usage information.
* refactor: use TS counterpart of uploadOCR methods
* ci: Update MistralOCR tests to reflect new OCR result structure
* chore: Bump version of @librechat/api to 1.2.3 in package.json and package-lock.json
* chore: Update CONFIG_VERSION to 1.2.8
* chore: remove unused sendEvent function from config module (now imported from '@librechat/api')
* chore: remove MistralOCR service files and tests (now in '@librechat/api')
* ci: update logger import in ModelService tests to use @librechat/data-schemas
---------
Co-authored-by: arthurolivierfortin <arthurolivier.fortin@gmail.com>
* ✨ feat: Implement speech settings initialization and update settings handling
* 🔧 fix: Ensure setters reference is included in useEffect dependencies for speech settings initialization
* chore: Update setter reference in useSpeechSettingsInit for improved type safety
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
- Enhanced the OAuth callback and action creation processes to include the `token_exchange_method` parameter.
- Updated the `TokenService` to handle different token exchange methods, allowing for either 'default_post' or 'basic_auth_header' approaches.
- Improved the handling of access tokens and refresh tokens based on the specified exchange method.
* fix: `primeResources` to Prevent Duplicate Files Across Sources
- Added multiple test cases to ensure that the `primeResources` function correctly handles duplicate files from OCR and attachments, including scenarios with shared files, files without IDs, and duplicates within attachments.
- Implemented logic to categorize files into appropriate tool resources while preventing duplicates across different categories.
- Enhanced error handling and ensured that unique files are returned in the final attachments array.
* fix: Update ToolService to handle single OCR tool case (no loaded tool necessary)
* refactor: Add skipVersioning option to updateAgent for isolated updates
- for now, mainly concerns sharing/unsharing of agents
* chore: Update translation for shared agent message in UI
* chore: linting in mcp.spec.ts
* chore: linting in mcp.ts
* feat(mcp): support dynamic user field placeholders in MCP environment variables
- Added user object handling in MCP options, allowing for dynamic user field processing in environment variables, headers, and URLs.
- Updated `processMCPEnv` to utilize user fields for more flexible configurations.
* chore: update backend review workflow to include unit tests for @librechat/data-schemas
* feat: Enhance OpenID Strategy with Debug Logging and Header Management
- Added detailed logging for OpenID requests and responses when debug mode is enabled.
- Introduced helper functions for safely logging sensitive data and headers.
- Updated OpenID strategy to handle non-standard WWW-Authenticate headers in responses.
- Refactored proxy configuration handling for improved clarity and logging.
* refactor: MemoryViewer Layout with Conditional Justification
- Updated the MemoryViewer component to conditionally apply justification styles based on memory data and access permissions.
- Introduced utility function `cn` for cleaner class name management in the component.
* refactor: Update OpenID Strategy to use Global Fetch
* refactor: Add undici for customFetch request handling in OpenID strategy
* fix: Export 'files' module in utils index
* chore: Add node-fetch dependency for openid image download
* ci: Add comprehensive tests for multer configuration and file handling
- Introduced a new test suite for multer configuration, covering storage destination and filename generation.
- Implemented tests for file filtering, ensuring only valid JSON files are accepted.
- Added error handling tests for edge cases and vulnerabilities, including handling empty field names and malformed filenames.
- Integrated real configuration testing with actual fileConfig and custom endpoints.
- Enhanced UUID generation tests to ensure uniqueness and cryptographic security.
* chore: Improve proxy configuration logging in customFetch function
* fix: Improve logging for non-standard WWW-Authenticate header in customFetch function
* 🧠 feat: User Memories for Conversational Context
chore: mcp typing, use `t`
WIP: first pass, Memories UI
- Added MemoryViewer component for displaying, editing, and deleting user memories.
- Integrated data provider hooks for fetching, updating, and deleting memories.
- Implemented pagination and loading states for better user experience.
- Created unit tests for MemoryViewer to ensure functionality and interaction with data provider.
- Updated translation files to include new UI strings related to memories.
chore: move mcp-related files to own directory
chore: rename librechat-mcp to librechat-api
WIP: first pass, memory processing and data schemas
chore: linting in fileSearch.js query description
chore: rename librechat-api to @librechat/api across the project
WIP: first pass, functional memory agent
feat: add MemoryEditDialog and MemoryViewer components for managing user memories
- Introduced MemoryEditDialog for editing memory entries with validation and toast notifications.
- Updated MemoryViewer to support editing and deleting memories, including pagination and loading states.
- Enhanced data provider to handle memory updates with optional original key for better management.
- Added new localization strings for memory-related UI elements.
feat: add memory permissions management
- Implemented memory permissions in the backend, allowing roles to have specific permissions for using, creating, updating, and reading memories.
- Added new API endpoints for updating memory permissions associated with roles.
- Created a new AdminSettings component for managing memory permissions in the frontend.
- Integrated memory permissions into the existing roles and permissions schemas.
- Updated the interface to include memory settings and permissions.
- Enhanced the MemoryViewer component to conditionally render admin settings based on user roles.
- Added localization support for memory permissions in the translation files.
feat: move AdminSettings component to a new position in MemoryViewer for better visibility
refactor: clean up commented code in MemoryViewer component
feat: enhance MemoryViewer with search functionality and improve MemoryEditDialog integration
- Added a search input to filter memories in the MemoryViewer component.
- Refactored MemoryEditDialog to accept children for better customization.
- Updated MemoryViewer to utilize the new EditMemoryButton and DeleteMemoryButton components for editing and deleting memories.
- Improved localization support by adding new strings for memory filtering and deletion confirmation.
refactor: optimize memory filtering in MemoryViewer using match-sorter
- Replaced manual filtering logic with match-sorter for improved search functionality.
- Enhanced performance and readability of the filteredMemories computation.
feat: enhance MemoryEditDialog with triggerRef and improve updateMemory mutation handling
feat: implement access control for MemoryEditDialog and MemoryViewer components
refactor: remove commented out code and create runMemory method
refactor: rename role based files
feat: implement access control for memory usage in AgentClient
refactor: simplify checkVisionRequest method in AgentClient by removing commented-out code
refactor: make `agents` dir in api package
refactor: migrate Azure utilities to TypeScript and consolidate imports
refactor: move sanitizeFilename function to a new file and update imports, add related tests
refactor: update LLM configuration types and consolidate Azure options in the API package
chore: linting
chore: import order
refactor: replace getLLMConfig with getOpenAIConfig and remove unused LLM configuration file
chore: update winston-daily-rotate-file to version 5.0.0 and add object-hash dependency in package-lock.json
refactor: move primeResources and optionalChainWithEmptyCheck functions to resources.ts and update imports
refactor: move createRun function to a new run.ts file and update related imports
fix: ensure safeAttachments is correctly typed as an array of TFile
chore: add node-fetch dependency and refactor fetch-related functions into packages/api/utils, removing the old generators file
refactor: enhance TEndpointOption type by using Pick to streamline endpoint fields and add new properties for model parameters and client options
feat: implement initializeOpenAIOptions function and update OpenAI types for enhanced configuration handling
fix: update types due to new TEndpointOption typing
fix: ensure safe access to group parameters in initializeOpenAIOptions function
fix: remove redundant API key validation comment in initializeOpenAIOptions function
refactor: rename initializeOpenAIOptions to initializeOpenAI for consistency and update related documentation
refactor: decouple req.body fields and tool loading from initializeAgentOptions
chore: linting
refactor: adjust column widths in MemoryViewer for improved layout
refactor: simplify agent initialization by creating loadAgent function and removing unused code
feat: add memory configuration loading and validation functions
WIP: first pass, memory processing with config
feat: implement memory callback and artifact handling
feat: implement memory artifacts display and processing updates
feat: add memory configuration options and schema validation for validKeys
fix: update MemoryEditDialog and MemoryViewer to handle memory state and display improvements
refactor: remove padding from BookmarkTable and MemoryViewer headers for consistent styling
WIP: initial tokenLimit config and move Tokenizer to @librechat/api
refactor: update mongoMeili plugin methods to use callback for better error handling
feat: enhance memory management with token tracking and usage metrics
- Added token counting for memory entries to enforce limits and provide usage statistics.
- Updated memory retrieval and update routes to include total token usage and limit.
- Enhanced MemoryEditDialog and MemoryViewer components to display memory usage and token information.
- Refactored memory processing functions to handle token limits and provide feedback on memory capacity.
feat: implement memory artifact handling in attachment handler
- Enhanced useAttachmentHandler to process memory artifacts when receiving updates.
- Introduced handleMemoryArtifact utility to manage memory updates and deletions.
- Updated query client to reflect changes in memory state based on incoming data.
refactor: restructure web search key extraction logic
- Moved the logic for extracting API keys from the webSearchAuth configuration into a dedicated function, getWebSearchKeys.
- Updated webSearchKeys to utilize the new function for improved clarity and maintainability.
- Prevents build time errors
feat: add personalization settings and memory preferences management
- Introduced a new Personalization tab in settings to manage user memory preferences.
- Implemented API endpoints and client-side logic for updating memory preferences.
- Enhanced user interface components to reflect personalization options and memory usage.
- Updated permissions to allow users to opt out of memory features.
- Added localization support for new settings and messages related to personalization.
style: personalization switch class
feat: add PersonalizationIcon and align Side Panel UI
feat: implement memory creation functionality
- Added a new API endpoint for creating memory entries, including validation for key and value.
- Introduced MemoryCreateDialog component for user interface to facilitate memory creation.
- Integrated token limit checks to prevent exceeding user memory capacity.
- Updated MemoryViewer to include a button for opening the memory creation dialog.
- Enhanced localization support for new messages related to memory creation.
feat: enhance message processing with configurable window size
- Updated AgentClient to use a configurable message window size for processing messages.
- Introduced messageWindowSize option in memory configuration schema with a default value of 5.
- Improved logic for selecting messages to process based on the configured window size.
chore: update librechat-data-provider version to 0.7.87 in package.json and package-lock.json
chore: remove OpenAPIPlugin and its associated tests
chore: remove MIGRATION_README.md as migration tasks are completed
ci: fix backend tests
chore: remove unused translation keys from localization file
chore: remove problematic test file and unused var in AgentClient
chore: remove unused import and import directly for JSDoc
* feat: add api package build stage in Dockerfile for improved modularity
* docs: reorder build steps in contributing guide for clarity
* Removed agent_ids exclusion from version comparison in the Agent model.
* Added tests to ensure agent_ids changes trigger new version creation and handle duplicates correctly.
* Enhanced existing tests to validate agent_ids alongside other fields and preserve history.
* fix: apply mongoMeili when models are created to use main runtime mongoose
* chore: update @librechat/data-schemas version to 0.0.8
* refactor: remove unused useDebounceCodeBlock
* fix: ensure setter function is stable and handle numeric conversion in useDebouncedInput
* refactor: replace useCallback with useMemo for stable debounced function in useDebouncedInput
* fix: add undefined password check in local user authentication
* fix: edge case - issue deleting user when no conversations in deleteUserController
* feat: Integrate Mailgun API for email sending functionality
* fix: undefined SESSION_EXPIRY handling and add tests
* fix: update import path for isEnabled utility in azureUtils.js to resolve circular dep.
* 🔧 chore: fix ESLint warnings in AdminSettings
* fix: DropdownPopup for BookmarkMenu being affected by recent Header change
* fix: Replace button with OGDialogClose for proper dialog closing
* chore: linting in google client initialization
* chore: linting in getLLMConfig function
* chore: update @librechat/agents to version 2.4.38 to support Google GenAI Custom Headers
* Simplify version creation logic in updateAgent function
* Add comprehensive tests for agent functionality including version history, action metadata generation, and loading agents
- Introduced tests for generating consistent hashes for action metadata.
- Implemented tests for loading agents with various scenarios including null and non-existent IDs.
- Added edge case tests for agent creation, updates, and error handling.
- Ensured proper handling of ephemeral agents and their associated functionalities.
* Enhance tests for Agent model functionality
- Updated test structure for Agent resource file operations, improving organization and readability.
- Added comprehensive tests for handling concurrent file additions and removals, ensuring data integrity.
- Implemented edge case tests for agent creation and resource file management, including scenarios with non-existent agents.
- Enhanced error handling in tests to cover various failure scenarios, ensuring robustness in agent operations.
* optimize tests
* feat[a11y]: add solid left border to improve visibility in LLM's submenu items.
* 🎨 style: Update CustomMenuItem class for improved border visibility
---------
Co-authored-by: Derek Jackson <derek_jackson@harvard.edu>
* 🔧 refactor: Improve Error Handling and UI Consistency in Auth Components
* 🔧 refactor: Email Templates
* 🔧 refactor: Enhance LoginForm with loading state and spinner
* 🔧 refactor: Replace button elements with Button component and enhance UI consistency across Auth forms
* 🔧 fix: Update ProgressText and ToolCall components for improved error handling and localization
* 🔧 chore: Format ESLint configuration for improved readability and remove unused rule
* 🔧 refactor: Simplify ProgressText component logic for better readability and maintainability
* 🔧 refactor: Update ProgressText and ToolCall components for improved layout consistency
* 🔧 refactor: Simplify icon rendering in TTS components and enhance button rendering logic in HoverButtons
* 🔧 refactor: Update placeholder logic in VariableForm component to simply use variable name
* fix: .docx. .pptx Mistral OCR Error with `image_limit=0`
* chore: Update deploy workflow to include conditions for successful dev branch deployment and streamline deployment steps
* ci: Set image_limit to 0 in MistralOCR service tests for consistent behavior
* refactor: move model definitions and database-related methods to packages/data-schemas
* ci: update tests due to new DB structure
fix: disable mocking `librechat-data-provider`
feat: Add schema exports to data-schemas package
- Introduced a new schema module that exports various schemas including action, agent, and user schemas.
- Updated index.ts to include the new schema exports for better modularity and organization.
ci: fix appleStrategy tests
fix: Agent.spec.js
ci: refactor handleTools tests to use MongoMemoryServer for in-memory database
fix: getLogStores imports
ci: update banViolation tests to use MongoMemoryServer and improve session mocking
test: refactor samlStrategy tests to improve mock configurations and user handling
ci: fix crypto mock in handleText tests for improved accuracy
ci: refactor spendTokens tests to improve model imports and setup
ci: refactor Message model tests to use MongoMemoryServer and improve database interactions
* refactor: streamline IMessage interface and move feedback properties to types/message.ts
* refactor: use exported initializeRoles from `data-schemas`, remove api workspace version (this serves as an example of future migrations that still need to happen)
* refactor: update model imports to use destructuring from `~/db/models` for consistency and clarity
* refactor: remove unused mongoose imports from model files for cleaner code
* refactor: remove unused mongoose imports from Share, Prompt, and Transaction model files for cleaner code
* refactor: remove unused import in Transaction model for cleaner code
* ci: update deploy workflow to reference new Docker Dev Branch Images Build and add new workflow for building Docker images on dev branch
* chore: cleanup imports
* feat: working started for feedback implementation.
TODO:
- needs some refactoring.
- needs some UI animations.
* feat: working rate functionality
* feat: works now as well to reader the already rated responses from the server.
* feat: added the option to give feedback in text (optional)
* feat: added Dismiss option `x` to the `FeedbackTagOptions`
* ✨ feat: Add rating and ratingContent fields to message schema
* 🔧 chore: Bump version to 0.0.3 in package.json
* ✨ feat: Enhance feedback localization and update UI elements
* 🚀 feat: Implement feedback tagging system with thumbs up/down options
* 🚀 feat: Add data-provider package to unused i18n keys detection
* 🎨 style: update HoverButtons' style
* 🎨 style: Update HoverButtons and Fork components for improved styling and visibility
* 🔧 feat: Implement feedback system with rating and content options
* 🔧 feat: Enhance feedback handling with improved rating toggle and tag options
* 🔧 feat: Integrate toast notifications for feedback submission and clean up unused state
* 🔧 feat: Remove unused feedback tag options from translation file
* ✨ refactor: clean up Feedback component and improve HoverButtons structure
* ✨ refactor: remove unused settings switches for auto scroll, hide side panel, and user message markdown
* refactor: reorganize import order
* ✨ refactor: enhance HoverButtons and Fork components with improved styles and animations
* ✨ refactor: update feedback response phrases for improved user engagement
* ✨ refactor: add CheckboxOption component and streamline fork options rendering
* Refactor feedback components and logic
- Consolidated feedback handling into a single Feedback component, removing FeedbackButtons and FeedbackTagOptions.
- Introduced new feedback tagging system with detailed tags for both thumbs up and thumbs down ratings.
- Updated feedback schema to include new tags and improved type definitions.
- Enhanced user interface for feedback collection, including a dialog for additional comments.
- Removed obsolete files and adjusted imports accordingly.
- Updated translations for new feedback tags and placeholders.
* ✨ refactor: update feedback handling by replacing rating fields with feedback in message updates
* fix: add missing validateMessageReq middleware to feedback route and refactor feedback system
* 🗑️ chore: Remove redundant fork option explanations from translation file
* 🔧 refactor: Remove unused dependency from feedback callback
* 🔧 refactor: Simplify message update response structure and improve error logging
* Chore: removed unused tests.
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* 🔧 chore: Update navigateFallbackDenylist in Vite config to include API routes
* 🔧 fix: Update redirect_uri in createActionTool to use DOMAIN_SERVER instead of DOMAIN_CLIENT
* 🔧 feat: Enhance Agent Versioning with Action Metadata Hashing
- Added support for generating a hash of action metadata to detect changes and manage agent versioning.
- Updated `updateAgent` function to include an optional `forceVersion` parameter for version creation.
- Modified `isDuplicateVersion` to compare action metadata hashes.
- Updated related tests to validate new versioning behavior with action changes.
- Refactored agent update logic to ensure proper tracking of user updates and version history.
* 🚀 feat: Implement Auto-Refill Settings for Balance
* 🎨 feat: add `copy-tex` to improve copying KaTeX (#7308)
When selecting equations and using copy paste, uses the correct latex code.
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
* 🔃 refactor: `AgentFooter` to conditionally render buttons based on `activePanel` (#7306)
* 🚀 feat: Add `Cloudflare Turnstile` support (#5987)
* 🚀 feat: Add @marsidev/react-turnstile dependency to package.json and package-lock.json
* 🚀 feat: Integrate Cloudflare Turnstile configuration support in AppService and add schema validation
* 🚀 feat: Implemented Cloudflare Turnstile integration in Login and Registration forms
* 🚀 feat: Enhance AppService tests with additional mocks and configuration setups
* 🚀 feat: Comment out outdated config version warning tests in AppService.spec.js
* 🚀 feat: Remove outdated warning tests and add new checks for environment variables and API health
* 🔧 test: Update AppService.spec.js to use expect.anything() for paths validation
* 🔧 test: Refactor AppService.spec.js to streamline mocks and enhance clarity
* 🔧 chore: removed not needed test
* Potential fix for code scanning alert no. 5638: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5629: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5642: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update turnstile.js
* Potential fix for code scanning alert no. 5634: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5646: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5647: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5764: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5765: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* 🖼️ feat: Tool Call and Loading UI Refresh, Image Resize Config (#7086)
* ✨ feat: Enhance Spinner component with customizable properties and improved animation
* 🔧 fix: Replace Loader with Spinner in RunCode component and update FilePreview to use Spinner for progress indication
* ✨ feat: Refactor icons in CodeProgress and CancelledIcon components; enhance animation and styling in ExecuteCode and ProgressText components
* ✨ feat: Refactor attachment handling in ExecuteCode component; replace individual attachment rendering with AttachmentGroup for improved structure
* ✨ feat: Refactor dialog components for improved accessibility and styling; integrate Skeleton loading state in Image component
* ✨ feat: Refactor ToolCall component to use ToolCallInfo for better structure; replace ToolPopover with AttachmentGroup; enhance ProgressText with error handling and improved UI elements
* 🔧 fix: Remove unnecessary whitespace in ProgressText
* 🔧 fix: Remove unnecessary margin from AgentFooter and AgentPanel components; clean up SidePanel imports
* ✨ feat: Enhance ToolCall and ToolCallInfo components with improved styling; update translations and add warning text color to Tailwind config
* 🔧 fix: Update import statement for useLocalize in ToolCallInfo component; fix: chatform transition
* ✨ feat: Refactor ToolCall and ToolCallInfo components for improved structure and styling; add optimized code block for better output display
* ✨ feat: Implement OpenAI image generation component; add progress tracking and localization for user feedback
* 🔧 fix: Adjust base duration values for image generation; optimize timing for quality settings
* chore: remove unnecessary space
* ✨ feat: Enhance OpenAI image generation with editing capabilities; update localization for progress feedback
* ✨ feat: Add download functionality to images; enhance DialogImage component with download button
* ✨ feat: Enhance image resizing functionality; support custom percentage and pixel dimensions in resizeImageBuffer
* 📊 feat: Improve Helm Chart (#3638)
* Replaced Helm Charts with Blue Atlas Charts
* Fix Workflow
* improve docs
* update gitignore
* Update docs
* change values order, add hpa
* change tls example domain
* Default: Enable liveness and readiness
* chore: bump base chart
* apply requested changes
* add Release fix
* add: error handling
* chore: cleanup and testing
* fix: adjust Chart.yaml
---------
Co-authored-by: hofq <gregorspalme@protonmail.com>
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
* 📜 docs: Unreleased Changelog (#7434)
* action: update Unreleased changelog
* Update CHANGELOG.md
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🛡️ chore: `multer` v2.0.0 for CVE-2025-47935 and CVE-2025-47944 (#7454)
* chore: bump multer to v2.0.0 to resolve CVE-2025-47935 and CVE-2025-47944
* chore: temp. remove helmet dependency to appease unused NPM package workflow
* 🎚️ feat: Custom Parameters (#7342)
* #
* - refactor: simplified getCustomConfig func
* #
* - feature: persist values for parameters with optionType of custom
* #
* - refactor: moved `Parameters/settings.ts` into `data-provider` so that both frontend and backend code can use it.
* - feature: loadCustomConfig can now parse and validate customParams property for `endpoints.custom` in `librechat.yaml`
* # fixed linter
* # removed .strict() in config.ts
* change: added packages/data-provider/src to SOURCE_DIRS for i18n check
* # removed unnecessary lodash imports
* # addressed PR comments
# fixed lint for updated files
* # better import for lodash (w/o relying on tree-shaking)
* 📃 fix: Ensure MCP Resources Pass Name and Description Fields to LLM (#7442)
* 🔗 feat: Support Environment Variables in MCP URL Config (#7424)
* 🦙 chore: Add `llama-4` to Vision Models List (#7433)
* 🔧 fix: File Deletion for Azure Assistants API (#7466)
* 🔬 fix: File Search Request Format (Azure Assistants API) (#7404)
* fix: The request format for file analysis with Azure OpenAI assistants
The request format for file analysis with Azure OpenAI assistants differs from that of OpenAI. This fix updates the API to use attachments instead of file_ids. danny-avila#7379
* chore: ESLint Error
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* 🖼️ chore: Linting & Transition Styling in UI Components (#7467)
* chore: linting
* 🔧 fix: Correctly parse dimensions for image width and height in OpenAIImageGen component
* style: overlay class for DialogImage component to improve visibility
* style: Update transition timing function for PixelCard component to rely on style props
* ✅ fix: Emojis rendering in `SplitText` Animation (#7460)
* 📂 refactor: Improve `FileAttachment` & File Form Deletion (#7471)
* refactor: optional attachment properties for `FileAttachment`
* refactor: update ActionButton to use localized text
* chore: localize text in DataTableFile, add missing translation, imports order, and linting
* chore: linting in DataTable
* fix: integrate Recoil state management for file deletion in DataTableFile
* fix: integrate Recoil state management for file deletion in DataTable
* fix: add temp_file_id to BatchFile type and update deleteFiles logic to properly remove files that are mapped to temp_file_id
* 🌍 i18n: Update translation.json with latest translations (#7468)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* 🦾 feat: Claude-4 Support (#7509)
* refactor: Update AnthropicClient to support Claude model naming changes
* Renamed `isClaude3` to `isClaudeLatest` to accommodate newer Claude models.
* Updated logic to determine if the model is part of the Claude family.
* Adjusted `useMessages` property to reflect the new model naming convention.
* Cleaned up client properties during disposal to match the updated naming.
* feat: Claude-4 Support
* feat: Add Thinking and Prompt caching support for Claude 4
* chore: Update ANTHROPIC_MODELS in .env.example for latest model versions
* 📊 chore: Remove Old Helm Chart (#7512)
Co-authored-by: hofq <gregorspalme@protonmail.com>
* 🪨 feat: Bedrock Support for Claude-4 Reasoning (#7517)
* 🗑️ chore: Update .gitignore to reflect AI-related files
* chore: linting in Bedrock options.js
* 🪨 feat: Bedrock Claude-4 Reasoning
* 🪖 chore: bump helm app version to v0.7.8 (#7524)
- bump helm app version to match the latest
release version
* ⌛ feat: Agent Version History and Management (#7455)
* ✨ feat: Enhance agent update functionality to save current state in versions array
- Updated the `updateAgent` function to push the current agent's state into a new `versions` array when an agent is updated.
- Modified the agent schema to include a `versions` field for storing historical states of agents.
* ✨ feat: Add comprehensive CRUD operations for agents in tests
- Introduced a new test suite for CRUD operations on agents, including create, read, update, and delete functionalities.
- Implemented tests for listing agents by author and updating agent projects.
- Enhanced the agent model to support version history tracking during updates.
- Ensured proper environment variable management during tests.
* ✨ feat: Introduce version tracking for agents and enhance UI components
- Added a `version` property to the agent model to track the number of versions.
- Updated the `getAgentHandler` to include the agent's version in the response.
- Introduced a new `VersionButton` component for navigating to the version panel.
- Created a `VersionPanel` component for displaying version-related information.
- Updated the UI to conditionally render the version button and panel based on the active state.
- Added localization for the new version-related UI elements.
* ✨ i18n: Add "version" translation key across multiple languages
- Introduced the "com_ui_agent_version" translation key in various language files to support version tracking for agents.
- Updated Arabic, Czech, German, English, Spanish, Estonian, Persian, Finnish, French, Hebrew, Hungarian, Indonesian, Italian, Japanese, Korean, Dutch, Polish, Portuguese (Brazil and Portugal), Russian, Swedish, Thai, Turkish, Vietnamese, and Chinese (Simplified and Traditional) translations.
* ✨ feat: Update AgentFooter to conditionally render AdminSettings
- Modified the logic for displaying buttons in the AgentFooter component to only show them when the active panel is the builder.
- Ensured that AdminSettings is displayed only when the user has an admin role and the buttons are visible.
* ✨ feat: Enhance AgentPanelSwitch and VersionPanel for improved agent capabilities
- Updated AgentPanelSwitch to include a new VersionPanel for displaying version-related information.
- Enhanced agentsConfig logic to properly handle agent capabilities.
- Modified VersionPanel to improve structure and localization support.
- Integrated createAgent mutation for future agent creation functionality.
* ✨ feat: Enhance VersionPanel to display agent version history and loading states
- Integrated version fetching logic in VersionPanel to retrieve and display agent version history.
- Added loading and error handling states to improve user experience.
- Updated agent schema to use mixed types for versions, allowing for more flexible version data structures.
- Introduced localization support for version-related UI elements.
* ✨ feat: Update VersionPanel and AgentPanelSwitch to enhance agent selection and version display
- Modified AgentPanelSwitch to pass selectedAgentId to VersionPanel for improved agent context.
- Enhanced VersionPanel to handle multiple timestamp formats and display appropriate messages when no agent is selected.
- Improved structure and readability of the VersionPanel component by adding a helper function for timestamp retrieval.
* ✨ feat: Refactor VersionPanel to utilize localization and improve timestamp handling
- Replaced hardcoded text constants with localization support for various UI elements in VersionPanel.
- Enhanced the timestamp retrieval function to handle errors gracefully and utilize localized messages for unknown dates.
- Improved user feedback by displaying localized messages for agent selection, version errors, and empty states.
* ✨ refactor: Clean up VersionPanel by removing unused code and improving timestamp handling
* ✨ feat: Implement agent version reverting functionality
- Added `revertAgentVersion` method in the Agent model to allow reverting to a previous version of an agent.
- Introduced `revertAgentVersionHandler` in the agents controller to handle requests for reverting agent versions.
- Updated API routes to include a new endpoint for reverting agent versions.
- Enhanced the VersionPanel component to support version restoration with user confirmation and feedback.
- Added localization support for success and error messages related to version restoration.
* ✨ i18n: Add localization for agent version restoration messages
* Simplify VersionPanel by removing unused parameters and enhancing agent ID handling
* Refactor Agent model and VersionPanel component to streamline version data handling
* Update version handling in Agent model and VersionPanel
- Enhanced the Agent model to include an `updatedAt` timestamp when pushing new versions.
- Improved the VersionPanel component to sort versions by the `updatedAt` timestamp for better display order.
- Added a new localization entry for indicating the active version of an agent.
* ✨ i18n: Add localization for active agent version across multiple languages
* ✨ feat: Introduce version management components for agent history
- Added `isActiveVersion` utility to determine the active version of an agent based on various criteria.
- Implemented `VersionContent` and `VersionItem` components to display agent version history, including loading and error states.
- Enhanced `VersionPanel` to integrate new components and manage version context effectively.
- Added comprehensive tests for version management functionalities to ensure reliability and correctness.
* Add unit tests for AgentFooter component
* cleanup
* Enhance agent version update handling and add unit tests for update operators
- Updated the `updateAgent` function to properly handle various update operators ($push, $pull, $addToSet) while maintaining version history.
- Modified unit tests to validate the correct behavior of agent updates, including versioning and tool management.
* Enhance version comparison logic and update tests for artifacts handling
- Modified the `isActiveVersion` utility to include artifacts in the version comparison criteria.
- Updated the `VersionPanel` component to support artifacts in the agent state.
- Added new unit tests to validate artifacts matching scenarios and edge cases in the `isActiveVersion` function.
* Implement duplicate version detection in agent updates and enhance error handling
- Added `isDuplicateVersion` function to check for identical versions during agent updates, excluding certain fields.
- Updated `updateAgent` function to throw an error if a duplicate version is detected, with detailed error information.
- Enhanced the `updateAgentHandler` to return appropriate responses for duplicate version errors.
- Modified client-side error handling to display user-friendly messages for duplicate version scenarios.
- Added comprehensive unit tests to validate duplicate version detection and error handling across various update scenarios.
* Update version title localization to include version number across multiple languages
- Modified the `com_ui_agent_version_title` translation key to include a placeholder for the version number in various language files.
- Enhanced the `VersionItem` component to utilize the updated localization for displaying version titles dynamically.
* Enhance agent version handling and add revert functionality
- Updated the `isDuplicateVersion` function to improve version comparison logic, including special handling for `projectIds` and arrays of objects.
- Modified the `updateAgent` function to streamline version updates and removed unnecessary checks for test environments.
- Introduced a new `revertAgentVersion` function to allow reverting agents to specific versions, with detailed documentation.
- Enhanced unit tests to validate duplicate version detection and revert functionality, ensuring robust error handling and version management.
* fix CI issues
* cleanup
* Revert all non-English translations
* clean up tests
* *️⃣ feat: Reuse OpenID Auth Tokens (#7397)
* feat: integrate OpenID Connect support with token reuse
- Added `jwks-rsa` and `new-openid-client` dependencies for OpenID Connect functionality.
- Implemented OpenID token refresh logic in `AuthController`.
- Enhanced `LogoutController` to handle OpenID logout and session termination.
- Updated JWT authentication middleware to support OpenID token provider.
- Modified OAuth routes to accommodate OpenID authentication and token management.
- Created `setOpenIDAuthTokens` function to manage OpenID tokens in cookies.
- Upgraded OpenID strategy with user info fetching and token exchange protocol.
- Introduced `openIdJwtLogin` strategy for handling OpenID JWT tokens.
- Added caching mechanism for exchanged OpenID tokens.
- Updated configuration to include OpenID exchanged tokens cache key.
- updated .env.example to include the new env variables needed for the feature.
* fix: update return type in downloadImage documentation for clarity and fixed openIdJwtLogin env variables
* fix: update Jest configuration and tests for OpenID strategy integration
* fix: update OpenID strategy to include callback URL in setup
* fix: fix optionalJwtAuth middleware to support OpenID token reuse and improve currentUrl method in CustomOpenIDStrategy to override the dynamic host issue related to proxy (e.g. cloudfront)
* fix: fixed code formatting
* Fix: Add mocks for openid-client and passport strategy in Jest configuration to fix unit tests
* fix eslint errors: Format mock file openid-client.
* ✨ feat: Add PKCE support for OpenID and default handling in strategy setup
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
* 🔎 feat: Native Web Search with Citation References (#7516)
* WIP: search tool integration
* WIP: Add web search capabilities and API key management to agent actions
* WIP: web search capability to agent configuration and selection
* WIP: Add web search capability to backend agent configuration
* WIP: add web search option to default agent form values
* WIP: add attachments for web search
* feat: add plugin for processing web search citations
* WIP: first pass, Citation UI
* chore: remove console.log
* feat: Add AnimatedTabs component for tabbed UI functionality
* refactor: AnimatedTabs component with CSS animations and stable ID generation
* WIP example content
* feat: SearchContext for managing search results apart from MessageContext
* feat: Enhance AnimatedTabs with underline animation and state management
* WIP: first pass, Implement dynamic tab functionality in Sources component with search results integration
* fix: Update class names for improved styling in Sources and AnimatedTabs components
* feat: Improve styling and layout in Sources component with enhanced button and item designs
* feat: Refactor Sources component to integrate OGDialog for source display and improve layout
* style: Update background color in SourceItem and SourcesGroup components for improved visibility
* refactor: Sources component to enhance SourceItem structure and improve favicon handling
* style: Adjust font size of domain text in SourceItem for better readability
* feat: Add localization for citation source and details in CompositeCitation component
* style: add theming to Citation components
* feat: Enhance SourceItem component with dialog support and improved hovercard functionality
* feat: Add localization for sources tab and image alt text in Sources component
* style: Replace divs with spans for better semantic structure in CompositeCitation and Citation components
* refactor: Sources component to use useMemo for tab generation and improve performance
* chore: bump @librechat/agents to v2.4.318
* chore: update search result types
* fix: search results retrieval in ContentParts component, re-render attachments when expected
* feat: update sources style/types to use latest search result structure
* style: enhance Dialog (expanded) SourceItem component with link wrapping and improved styling
* style: update ImageItem component styling for improved title visibility
* refactor: remove SourceItemBase component and adjust SourceItem layout for improved styling
* chore: linting twcss order
* fix: prevent FileAttachment from rendering search attachments
* fix: append underscore to responseMessageId for unique identification to prevent mapping of previous latest message's attachments
* chore: remove unused parameter 'useSpecs' from loadTools function
* chore: twcss order
* WIP: WebSearch Tool UI
* refactor: add limit parameter to StackedFavicons for customizable source display
* refactor: optimize search results memoization by making more granular and separate conerns
* refactor: integrated StackedFavicons to WebSearch mid-run
* chore: bump @librechat/agents to expose handleToolCallChunks
* chore: use typedefs from dedicated file instead of defining them in AgentClient module
* WIP: first pass, search progress results
* refactor: move createOnSearchResults function to a dedicated search module
* chore: bump @librechat/agents to v2.4.320
* WIP: first pass, search results processed UX
* refactor: consolidate context variables in createOnSearchResults function
* chore: bump @librechat/agents to v2.4.321
* feat: add guidelines for web search tool response formatting in loadTools function
* feat: add isLast prop to Part component and update WebSearch logic for improved state handling
* style: update Hovercard styles for improved UI consistency
* feat: export FaviconImage component for improved accessibility in other modules
* refactor: export getCleanDomain function and use FaviconImage in Citation component for improved source representation
* refactor: implement SourceHovercard component for consistency and DRY compliance
* fix: replace <p> with <span> for snippet and title in SourceItem and SourceHovercard for consistency
* style: `not-prose`
* style: remove 'not-prose' class for consistency in SourceItem, Citation, and SourceHovercard components, adjust style classes
* refactor: `imageUrl` on hover and prevent duplicate sources
* refactor: enhance SourcesGroup dialog layout and improve source item presentation
* refactor: reorganize Web Components, save in same directory
* feat: add 'news' refType to refTypeMap for citation sources
* style: adjust Hovercard width for improved layout
* refactor: update tool usage guidelines for improved clarity and execution
* chore: linting
* feat: add Web Search badge with initial permissions and local storage logic
* feat: add webSearch support to interface and permissions schemas
* feat: implement Web Search API key management and localization updates
* feat: refactor Web Search API key handling and integrate new search API key form
* fix: remove unnecessary visibility state from FileAttachment component
* feat: update WebSearch component to use Globe icon and localized search label
* feat: enhance ApiKeyDialog with dropdown for reranker selection and update translations
* feat: implement dropdown menus for engine, scraper, and reranker selection in ApiKeyDialog
* chore: linting and add unknown instead of `any` type
* feat: refactor ApiKeyDialog and useAuthSearchTool for improved API key management
* refactor: update ocrSchema to use template literals for default apiKey and baseURL
* feat: add web search configuration and utility functions for environment variable extraction
* fix: ensure filepath is defined before checking its prefix in useAttachmentHandler
* feat: enhance web search functionality with improved configuration and environment variable extraction for authFields
* fix: update auth type in TPluginAction and TUpdateUserPlugins to use Partial<Record<string, string>>
* feat: implement web search authentication verification and enhance webSearchAuth structure
* feat: enhance ephemeral agent handling with new web search capability and type definition
* feat: enhance isEphemeralAgent function to include web search selection
* feat: refactor verifyWebSearchAuth to improve key handling and authentication checks
* feat: implement loadWebSearchAuth function for improved web search authentication handling
* feat: enhance web search authentication with new configuration options and refactor related types
* refactor: rename search engine to search provider and update related localization keys
* feat: update verifyWebSearchAuth to handle multiple authentication types and improve error handling
* feat: update ApiKeyDialog to accept authTypes prop and remove isUserProvided check
* feat: add tests for extractWebSearchEnvVars and loadWebSearchAuth functions
* feat: enhance loadWebSearchAuth to support specific service checks for providers, scrapers, and rerankers
* fix: update web search configuration key and adjust auth result handling in loadTools function
* feat: add new progress key for repeated web searching and update localization
* chore: bump @librechat/agents to 2.4.322
* feat: enhance loadTools function to include ISO time and improve search tool logging
* feat: update StackedFavicons to handle negative start index and improve citation attribution styling and text
* chore: update .gitignore to categorize AI-related files
* fix: mobile responsiveness of sources/citations hovercards
* feat: enhance source display with improved line clamping for better readability
* chore: bump @librechat/agents to v2.4.33
* feat: add handling for image sources in references mapping
* chore: bump librechat-data-provider version to 0.7.84
* chore: bump @librechat/agents version to 2.4.34
* fix: update auth handling to support multiple auth types in tools and allow key configuration in agent panel
* chore: remove redundant agent attribution text from search form
* fix: web search auth uninstall
* refactor: convert CheckboxButton to a forwardRef component and update setValue callback signature
* feat: add triggerRef prop to ApiKeyDialog components for improved dialog control
* feat: integrate triggerRef in CodeInterpreter and WebSearch components for enhanced dialog management
* feat: enhance ApiKeyDialog with additional links for Firecrawl and Jina API key guidance
* feat: implement web search configuration handling in ApiKeyDialog and add tests for dropdown visibility
* fix: update webSearchConfig reference in config route for correct payload assignment
* feat: update ApiKeyDialog to conditionally render sections based on authTypes and modify loadWebSearchAuth to correctly categorize authentication types
* feat: refactor ApiKeyDialog and related tests to use SearchCategories and RerankerTypes enums and remove nested ternaries
* refactor: move ThinkingButton rendering to improve layout consistency in ContentParts
* feat: integrate search context into Markdown component to conditionally include unicodeCitation plugin
* chore: bump @librechat/agents to v2.4.35
* chore: remove unused 18n key
* ci: add WEB_SEARCH permission testing and update AppService tests for new webSearch configuration
* ci: add more comprehensive tests for loadWebSearchAuth to validate authentication handling and authTypes structure
* chore: remove debugging console log from web.spec.ts to clean up test output
* 🧹 chore: Bump Agents Dependencies (#7525)
* chore: bump langchain dependencies
* chore: bump @librechat/agents to v2.4.36
* chore: bump @librechat/agents to v2.4.37
* refactor: simplify remark plugins in Markdown component with no conditional usage
* 🔧 refactor: Progress Text Localization for Running Tools (#7526)
* 🔧 chore: Bump Data Provider and Custom Config Versions (#7527)
* 🔧 chore: Update CONFIG_VERSION to 1.2.6
* 🔧 chore: Update librechat-data-provider version to 0.7.85
* 👤 feat: Enhance Agent Versioning to Track User Updates (#7523)
* feat: Enhance agent update functionality to track user updates
- Updated `updateAgent` function to accept an `updatingUserId` parameter for tracking who made changes.
- Modified agent versioning to include `updatedBy` field for better audit trails.
- Adjusted related functions and tests to ensure proper handling of user updates and version history.
- Enhanced tests to verify correct tracking of `updatedBy` during agent updates and restorations.
* fix: Refactor import tests for improved readability and consistency
- Adjusted formatting in `importChatGptConvo` test to enhance clarity.
- Updated expected output string in `processAssistantMessage` test to use double quotes for consistency.
- Modified processing time expectation in `processAssistantMessage` test to allow for CI environment variability.
* 🧩 feat: Web Search Config Validations & Clipboard Citation Processing (#7530)
* 🔧 chore: Add missing optional `scraperTimeout` to webSearchSchema
* chore: Add missing optional `scraperTimeout` to web search authentication result
* chore: linting
* feat: Integrate attachment handling and citation processing in message components
- Added `useAttachments` hook to manage message attachments and search results.
- Updated `MessageParts`, `ContentParts`, and `ContentRender` components to utilize the new hook for improved attachment handling.
- Enhanced `useCopyToClipboard` to format citations correctly, including support for composite citations and deduplication.
- Introduced utility functions for citation processing and cleanup.
- Added tests for the new `useCopyToClipboard` functionality to ensure proper citation formatting and handling.
* feat: Add configuration for LibreChat Code Interpreter API and Web Search variables
* fix: Update searchResults type to use SearchResultData for better type safety
* feat: Add web search configuration validation and logging
- Introduced `checkWebSearchConfig` function to validate web search configuration values, ensuring they are environment variable references.
- Added logging for proper configuration and warnings for incorrect values.
- Created unit tests for `checkWebSearchConfig` to cover various scenarios, including valid and invalid configurations.
* docs: Update README to include Web Search feature details
- Added a section for the Web Search feature, highlighting its capabilities to search the internet and enhance AI context.
- Included links for further information on the Web Search functionality.
* ci: Add mock for checkWebSearchConfig in AppService tests
* chore: linting
* feat: Enhance Shared Messages with Web Search UI by adding searchResults prop to SearchContent and MinimalHoverButtons components
* chore: linting
* refactor: remove Meilisearch index sync from importConversations function
* feat: update safeSearch implementation to use SafeSearchTypes enum
* refactor: remove commented-out code in loadTools function
* fix: ensure responseMessageId handles latestMessage ID correctly
* feat: enhance Vite configuration for improved chunking and caching
- Added additional globIgnores for map files in Workbox configuration.
- Implemented high-impact chunking for various large libraries to optimize performance.
- Increased chunkSizeWarningLimit from 1200 to 1500 for better handling of larger chunks.
* refactor: move health check hook to Root, fix bad setState for Temporary state
- Enhanced the `useHealthCheck` hook to initiate health checks only when the user is authenticated.
- Added logic for managing health check intervals and handling window focus events.
- Introduced a new test suite for `useHealthCheck` to cover various scenarios including authentication state changes and error handling.
- Removed the health check invocation from `ChatRoute` and added it to `Root` for global health monitoring.
* fix: update font alias in Vite configuration for correct path resolution
* 🌍 i18n: Update translation.json with latest translations (#7532)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* 🔧 chore: Update data-provider dependencies for typing (#7533)
- Updated dependencies to include @langchain/core and @types/winston in both package-lock.json and data-provider package.json.
* 🔧 fix: Artifacts Display Crash on Close and Max Width (#7540)
* 🔧 chore: Update react-resizable-panels dependency to version 3.0.2 in package.json and package-lock.json
* fix: Simplify order assignment in SidePanel component based on hasArtifacts condition, fixed frontend crash when artifacts are closed
* refactor: Change throttledSaveLayout to use useMemo for improved performance in SidePanelGroup component
* refactor: Update dependencies in SidePanel component's useEffect hooks for improved responsiveness
* 🏷️ refactor: EditPresetDialog UI and Remove `chatGptLabel` from Presets (#7543)
* fix: add necessary dep., remove unnecessary dep from useMentions memoization
* fix: Migrate deprecated chatGptLabel to modelLabel in cleanupPreset and simplify getPresetTitle logic
* fix: Enhance cleanupPreset to remove empty chatGptLabel and add comprehensive tests for label migration and preset handling
* chore: Update endpointType prop in PopoverButtons to allow null values for better flexibility
* refactor: Replace Dialog with OGDialog in EditPresetDialog for improved UI consistency and structure
* style: Update EditPresetDialog layout and styling for improved responsiveness and consistency
* 📦 refactor: Add Additional Chunking to Vite Config (#7544)
* ⚡ refactor: Add Additional Chunking to Vite Config
* chore: Integrate rollup-plugin-visualizer for bundle analysis in Vite config & add @codemirror chunks
* ⌚ fix: Debounce `setUserContext` and Default State Param for OpenID Auth (#7559)
* fix: Add default random state parameter to OpenID auth request for providers that require it; ensure passport strategy uses it
* ⌚ refactor: debounce setUserContext to avoid race condition
* refactor: Update OpenID authentication to use randomState from openid-client
* chore: linting in presetSettings type definition
* chore: import order in ModelPanel
* refactor: remove `isLegacyOutput` property from AnthropicClient since only used where defined, add latest models to non-legacy patterns, and remove from client cleanup
* refactor: adjust grid layout in Parameters component for improved responsiveness
* refactor: adjust grid layout in ModelPanel for improved display of model parameters
* test: add cases for maxOutputTokens handling in Claude 4 Sonnet and Opus models
* ci: mock loadCustomConfig in server tests and refactor OpenID route for improved authentication handling
* 🚀 feat: Implement Auto-Refill Settings for Balance
* fix: ESLint
* ✨ feat: Enhance Auto-Refill Settings with Validation and Localization
---------
Co-authored-by: andresgit <9771158+andresgit@users.noreply.github.com>
Co-authored-by: matt burnett <mawburn@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
Co-authored-by: hofq <54744977+hofq@users.noreply.github.com>
Co-authored-by: hofq <gregorspalme@protonmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
Co-authored-by: Theo N. Truong <644650+nhtruong@users.noreply.github.com>
Co-authored-by: René Honig <5851246+renehonig@users.noreply.github.com>
Co-authored-by: Ben Verhees <ben.verhees@iodigital.com>
Co-authored-by: Amgad Hasan <109704569+AmgadHasan@users.noreply.github.com>
Co-authored-by: arthurolivierfortin <118319678+arthurolivierfortin@users.noreply.github.com>
Co-authored-by: Danny Avila <danacordially@gmail.com>
Co-authored-by: Sebastien Bruel <93573440+sbruel@users.noreply.github.com>
Co-authored-by: Austin Barrington <31205926+austin-barrington@users.noreply.github.com>
Co-authored-by: Peter <peter.rothlaender@gmail.com>
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
* 🔧 chore: Update build script to include post-build image removal
* refactor: staticCache middleware with options and special handling for manifest/sw/index files
* refactor(pwa): optimize service worker caching strategy
* refactor: streamline post-build process and update public directory handling
* chore: remove external images from rollupOptions in Vite config
* chore: enhance logging message in post-build script for clarity
* refactor: Simplify grid column calculation in SourcesGroup component
* refactor: Centralize default agent capabilities and simplify capability assignment
* Edge case: use defined/fallback capabilities for ephemeral agents when the "agents" endpoint is not enabled
* refactor: consolidate gemini 2 vision check
* feat: enhance capability check logging for agents
* chore: update librechat-data-provider version to 0.7.86
* refactor: import default agent capabilities for enhanced capability management
* chore: standardize quotes in error message check for consistency
* fix: improve error logging both client and api-side for mistral ocr upload errors
* ci: update error handling in MistralOCR tests to use specific error message
* fix: Add default random state parameter to OpenID auth request for providers that require it; ensure passport strategy uses it
* ⌚ refactor: debounce setUserContext to avoid race condition
* refactor: Update OpenID authentication to use randomState from openid-client
* chore: linting in presetSettings type definition
* chore: import order in ModelPanel
* refactor: remove `isLegacyOutput` property from AnthropicClient since only used where defined, add latest models to non-legacy patterns, and remove from client cleanup
* refactor: adjust grid layout in Parameters component for improved responsiveness
* refactor: adjust grid layout in ModelPanel for improved display of model parameters
* test: add cases for maxOutputTokens handling in Claude 4 Sonnet and Opus models
* ci: mock loadCustomConfig in server tests and refactor OpenID route for improved authentication handling
* ⚡ refactor: Add Additional Chunking to Vite Config
* chore: Integrate rollup-plugin-visualizer for bundle analysis in Vite config & add @codemirror chunks
* fix: add necessary dep., remove unnecessary dep from useMentions memoization
* fix: Migrate deprecated chatGptLabel to modelLabel in cleanupPreset and simplify getPresetTitle logic
* fix: Enhance cleanupPreset to remove empty chatGptLabel and add comprehensive tests for label migration and preset handling
* chore: Update endpointType prop in PopoverButtons to allow null values for better flexibility
* refactor: Replace Dialog with OGDialog in EditPresetDialog for improved UI consistency and structure
* style: Update EditPresetDialog layout and styling for improved responsiveness and consistency
* 🔧 chore: Update react-resizable-panels dependency to version 3.0.2 in package.json and package-lock.json
* fix: Simplify order assignment in SidePanel component based on hasArtifacts condition, fixed frontend crash when artifacts are closed
* refactor: Change throttledSaveLayout to use useMemo for improved performance in SidePanelGroup component
* refactor: Update dependencies in SidePanel component's useEffect hooks for improved responsiveness
* 🔧 chore: Add missing optional `scraperTimeout` to webSearchSchema
* chore: Add missing optional `scraperTimeout` to web search authentication result
* chore: linting
* feat: Integrate attachment handling and citation processing in message components
- Added `useAttachments` hook to manage message attachments and search results.
- Updated `MessageParts`, `ContentParts`, and `ContentRender` components to utilize the new hook for improved attachment handling.
- Enhanced `useCopyToClipboard` to format citations correctly, including support for composite citations and deduplication.
- Introduced utility functions for citation processing and cleanup.
- Added tests for the new `useCopyToClipboard` functionality to ensure proper citation formatting and handling.
* feat: Add configuration for LibreChat Code Interpreter API and Web Search variables
* fix: Update searchResults type to use SearchResultData for better type safety
* feat: Add web search configuration validation and logging
- Introduced `checkWebSearchConfig` function to validate web search configuration values, ensuring they are environment variable references.
- Added logging for proper configuration and warnings for incorrect values.
- Created unit tests for `checkWebSearchConfig` to cover various scenarios, including valid and invalid configurations.
* docs: Update README to include Web Search feature details
- Added a section for the Web Search feature, highlighting its capabilities to search the internet and enhance AI context.
- Included links for further information on the Web Search functionality.
* ci: Add mock for checkWebSearchConfig in AppService tests
* chore: linting
* feat: Enhance Shared Messages with Web Search UI by adding searchResults prop to SearchContent and MinimalHoverButtons components
* chore: linting
* refactor: remove Meilisearch index sync from importConversations function
* feat: update safeSearch implementation to use SafeSearchTypes enum
* refactor: remove commented-out code in loadTools function
* fix: ensure responseMessageId handles latestMessage ID correctly
* feat: enhance Vite configuration for improved chunking and caching
- Added additional globIgnores for map files in Workbox configuration.
- Implemented high-impact chunking for various large libraries to optimize performance.
- Increased chunkSizeWarningLimit from 1200 to 1500 for better handling of larger chunks.
* refactor: move health check hook to Root, fix bad setState for Temporary state
- Enhanced the `useHealthCheck` hook to initiate health checks only when the user is authenticated.
- Added logic for managing health check intervals and handling window focus events.
- Introduced a new test suite for `useHealthCheck` to cover various scenarios including authentication state changes and error handling.
- Removed the health check invocation from `ChatRoute` and added it to `Root` for global health monitoring.
* fix: update font alias in Vite configuration for correct path resolution
* feat: Enhance agent update functionality to track user updates
- Updated `updateAgent` function to accept an `updatingUserId` parameter for tracking who made changes.
- Modified agent versioning to include `updatedBy` field for better audit trails.
- Adjusted related functions and tests to ensure proper handling of user updates and version history.
- Enhanced tests to verify correct tracking of `updatedBy` during agent updates and restorations.
* fix: Refactor import tests for improved readability and consistency
- Adjusted formatting in `importChatGptConvo` test to enhance clarity.
- Updated expected output string in `processAssistantMessage` test to use double quotes for consistency.
- Modified processing time expectation in `processAssistantMessage` test to allow for CI environment variability.
* WIP: search tool integration
* WIP: Add web search capabilities and API key management to agent actions
* WIP: web search capability to agent configuration and selection
* WIP: Add web search capability to backend agent configuration
* WIP: add web search option to default agent form values
* WIP: add attachments for web search
* feat: add plugin for processing web search citations
* WIP: first pass, Citation UI
* chore: remove console.log
* feat: Add AnimatedTabs component for tabbed UI functionality
* refactor: AnimatedTabs component with CSS animations and stable ID generation
* WIP example content
* feat: SearchContext for managing search results apart from MessageContext
* feat: Enhance AnimatedTabs with underline animation and state management
* WIP: first pass, Implement dynamic tab functionality in Sources component with search results integration
* fix: Update class names for improved styling in Sources and AnimatedTabs components
* feat: Improve styling and layout in Sources component with enhanced button and item designs
* feat: Refactor Sources component to integrate OGDialog for source display and improve layout
* style: Update background color in SourceItem and SourcesGroup components for improved visibility
* refactor: Sources component to enhance SourceItem structure and improve favicon handling
* style: Adjust font size of domain text in SourceItem for better readability
* feat: Add localization for citation source and details in CompositeCitation component
* style: add theming to Citation components
* feat: Enhance SourceItem component with dialog support and improved hovercard functionality
* feat: Add localization for sources tab and image alt text in Sources component
* style: Replace divs with spans for better semantic structure in CompositeCitation and Citation components
* refactor: Sources component to use useMemo for tab generation and improve performance
* chore: bump @librechat/agents to v2.4.318
* chore: update search result types
* fix: search results retrieval in ContentParts component, re-render attachments when expected
* feat: update sources style/types to use latest search result structure
* style: enhance Dialog (expanded) SourceItem component with link wrapping and improved styling
* style: update ImageItem component styling for improved title visibility
* refactor: remove SourceItemBase component and adjust SourceItem layout for improved styling
* chore: linting twcss order
* fix: prevent FileAttachment from rendering search attachments
* fix: append underscore to responseMessageId for unique identification to prevent mapping of previous latest message's attachments
* chore: remove unused parameter 'useSpecs' from loadTools function
* chore: twcss order
* WIP: WebSearch Tool UI
* refactor: add limit parameter to StackedFavicons for customizable source display
* refactor: optimize search results memoization by making more granular and separate conerns
* refactor: integrated StackedFavicons to WebSearch mid-run
* chore: bump @librechat/agents to expose handleToolCallChunks
* chore: use typedefs from dedicated file instead of defining them in AgentClient module
* WIP: first pass, search progress results
* refactor: move createOnSearchResults function to a dedicated search module
* chore: bump @librechat/agents to v2.4.320
* WIP: first pass, search results processed UX
* refactor: consolidate context variables in createOnSearchResults function
* chore: bump @librechat/agents to v2.4.321
* feat: add guidelines for web search tool response formatting in loadTools function
* feat: add isLast prop to Part component and update WebSearch logic for improved state handling
* style: update Hovercard styles for improved UI consistency
* feat: export FaviconImage component for improved accessibility in other modules
* refactor: export getCleanDomain function and use FaviconImage in Citation component for improved source representation
* refactor: implement SourceHovercard component for consistency and DRY compliance
* fix: replace <p> with <span> for snippet and title in SourceItem and SourceHovercard for consistency
* style: `not-prose`
* style: remove 'not-prose' class for consistency in SourceItem, Citation, and SourceHovercard components, adjust style classes
* refactor: `imageUrl` on hover and prevent duplicate sources
* refactor: enhance SourcesGroup dialog layout and improve source item presentation
* refactor: reorganize Web Components, save in same directory
* feat: add 'news' refType to refTypeMap for citation sources
* style: adjust Hovercard width for improved layout
* refactor: update tool usage guidelines for improved clarity and execution
* chore: linting
* feat: add Web Search badge with initial permissions and local storage logic
* feat: add webSearch support to interface and permissions schemas
* feat: implement Web Search API key management and localization updates
* feat: refactor Web Search API key handling and integrate new search API key form
* fix: remove unnecessary visibility state from FileAttachment component
* feat: update WebSearch component to use Globe icon and localized search label
* feat: enhance ApiKeyDialog with dropdown for reranker selection and update translations
* feat: implement dropdown menus for engine, scraper, and reranker selection in ApiKeyDialog
* chore: linting and add unknown instead of `any` type
* feat: refactor ApiKeyDialog and useAuthSearchTool for improved API key management
* refactor: update ocrSchema to use template literals for default apiKey and baseURL
* feat: add web search configuration and utility functions for environment variable extraction
* fix: ensure filepath is defined before checking its prefix in useAttachmentHandler
* feat: enhance web search functionality with improved configuration and environment variable extraction for authFields
* fix: update auth type in TPluginAction and TUpdateUserPlugins to use Partial<Record<string, string>>
* feat: implement web search authentication verification and enhance webSearchAuth structure
* feat: enhance ephemeral agent handling with new web search capability and type definition
* feat: enhance isEphemeralAgent function to include web search selection
* feat: refactor verifyWebSearchAuth to improve key handling and authentication checks
* feat: implement loadWebSearchAuth function for improved web search authentication handling
* feat: enhance web search authentication with new configuration options and refactor related types
* refactor: rename search engine to search provider and update related localization keys
* feat: update verifyWebSearchAuth to handle multiple authentication types and improve error handling
* feat: update ApiKeyDialog to accept authTypes prop and remove isUserProvided check
* feat: add tests for extractWebSearchEnvVars and loadWebSearchAuth functions
* feat: enhance loadWebSearchAuth to support specific service checks for providers, scrapers, and rerankers
* fix: update web search configuration key and adjust auth result handling in loadTools function
* feat: add new progress key for repeated web searching and update localization
* chore: bump @librechat/agents to 2.4.322
* feat: enhance loadTools function to include ISO time and improve search tool logging
* feat: update StackedFavicons to handle negative start index and improve citation attribution styling and text
* chore: update .gitignore to categorize AI-related files
* fix: mobile responsiveness of sources/citations hovercards
* feat: enhance source display with improved line clamping for better readability
* chore: bump @librechat/agents to v2.4.33
* feat: add handling for image sources in references mapping
* chore: bump librechat-data-provider version to 0.7.84
* chore: bump @librechat/agents version to 2.4.34
* fix: update auth handling to support multiple auth types in tools and allow key configuration in agent panel
* chore: remove redundant agent attribution text from search form
* fix: web search auth uninstall
* refactor: convert CheckboxButton to a forwardRef component and update setValue callback signature
* feat: add triggerRef prop to ApiKeyDialog components for improved dialog control
* feat: integrate triggerRef in CodeInterpreter and WebSearch components for enhanced dialog management
* feat: enhance ApiKeyDialog with additional links for Firecrawl and Jina API key guidance
* feat: implement web search configuration handling in ApiKeyDialog and add tests for dropdown visibility
* fix: update webSearchConfig reference in config route for correct payload assignment
* feat: update ApiKeyDialog to conditionally render sections based on authTypes and modify loadWebSearchAuth to correctly categorize authentication types
* feat: refactor ApiKeyDialog and related tests to use SearchCategories and RerankerTypes enums and remove nested ternaries
* refactor: move ThinkingButton rendering to improve layout consistency in ContentParts
* feat: integrate search context into Markdown component to conditionally include unicodeCitation plugin
* chore: bump @librechat/agents to v2.4.35
* chore: remove unused 18n key
* ci: add WEB_SEARCH permission testing and update AppService tests for new webSearch configuration
* ci: add more comprehensive tests for loadWebSearchAuth to validate authentication handling and authTypes structure
* chore: remove debugging console log from web.spec.ts to clean up test output
* feat: integrate OpenID Connect support with token reuse
- Added `jwks-rsa` and `new-openid-client` dependencies for OpenID Connect functionality.
- Implemented OpenID token refresh logic in `AuthController`.
- Enhanced `LogoutController` to handle OpenID logout and session termination.
- Updated JWT authentication middleware to support OpenID token provider.
- Modified OAuth routes to accommodate OpenID authentication and token management.
- Created `setOpenIDAuthTokens` function to manage OpenID tokens in cookies.
- Upgraded OpenID strategy with user info fetching and token exchange protocol.
- Introduced `openIdJwtLogin` strategy for handling OpenID JWT tokens.
- Added caching mechanism for exchanged OpenID tokens.
- Updated configuration to include OpenID exchanged tokens cache key.
- updated .env.example to include the new env variables needed for the feature.
* fix: update return type in downloadImage documentation for clarity and fixed openIdJwtLogin env variables
* fix: update Jest configuration and tests for OpenID strategy integration
* fix: update OpenID strategy to include callback URL in setup
* fix: fix optionalJwtAuth middleware to support OpenID token reuse and improve currentUrl method in CustomOpenIDStrategy to override the dynamic host issue related to proxy (e.g. cloudfront)
* fix: fixed code formatting
* Fix: Add mocks for openid-client and passport strategy in Jest configuration to fix unit tests
* fix eslint errors: Format mock file openid-client.
* ✨ feat: Add PKCE support for OpenID and default handling in strategy setup
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
* ✨ feat: Enhance agent update functionality to save current state in versions array
- Updated the `updateAgent` function to push the current agent's state into a new `versions` array when an agent is updated.
- Modified the agent schema to include a `versions` field for storing historical states of agents.
* ✨ feat: Add comprehensive CRUD operations for agents in tests
- Introduced a new test suite for CRUD operations on agents, including create, read, update, and delete functionalities.
- Implemented tests for listing agents by author and updating agent projects.
- Enhanced the agent model to support version history tracking during updates.
- Ensured proper environment variable management during tests.
* ✨ feat: Introduce version tracking for agents and enhance UI components
- Added a `version` property to the agent model to track the number of versions.
- Updated the `getAgentHandler` to include the agent's version in the response.
- Introduced a new `VersionButton` component for navigating to the version panel.
- Created a `VersionPanel` component for displaying version-related information.
- Updated the UI to conditionally render the version button and panel based on the active state.
- Added localization for the new version-related UI elements.
* ✨ i18n: Add "version" translation key across multiple languages
- Introduced the "com_ui_agent_version" translation key in various language files to support version tracking for agents.
- Updated Arabic, Czech, German, English, Spanish, Estonian, Persian, Finnish, French, Hebrew, Hungarian, Indonesian, Italian, Japanese, Korean, Dutch, Polish, Portuguese (Brazil and Portugal), Russian, Swedish, Thai, Turkish, Vietnamese, and Chinese (Simplified and Traditional) translations.
* ✨ feat: Update AgentFooter to conditionally render AdminSettings
- Modified the logic for displaying buttons in the AgentFooter component to only show them when the active panel is the builder.
- Ensured that AdminSettings is displayed only when the user has an admin role and the buttons are visible.
* ✨ feat: Enhance AgentPanelSwitch and VersionPanel for improved agent capabilities
- Updated AgentPanelSwitch to include a new VersionPanel for displaying version-related information.
- Enhanced agentsConfig logic to properly handle agent capabilities.
- Modified VersionPanel to improve structure and localization support.
- Integrated createAgent mutation for future agent creation functionality.
* ✨ feat: Enhance VersionPanel to display agent version history and loading states
- Integrated version fetching logic in VersionPanel to retrieve and display agent version history.
- Added loading and error handling states to improve user experience.
- Updated agent schema to use mixed types for versions, allowing for more flexible version data structures.
- Introduced localization support for version-related UI elements.
* ✨ feat: Update VersionPanel and AgentPanelSwitch to enhance agent selection and version display
- Modified AgentPanelSwitch to pass selectedAgentId to VersionPanel for improved agent context.
- Enhanced VersionPanel to handle multiple timestamp formats and display appropriate messages when no agent is selected.
- Improved structure and readability of the VersionPanel component by adding a helper function for timestamp retrieval.
* ✨ feat: Refactor VersionPanel to utilize localization and improve timestamp handling
- Replaced hardcoded text constants with localization support for various UI elements in VersionPanel.
- Enhanced the timestamp retrieval function to handle errors gracefully and utilize localized messages for unknown dates.
- Improved user feedback by displaying localized messages for agent selection, version errors, and empty states.
* ✨ refactor: Clean up VersionPanel by removing unused code and improving timestamp handling
* ✨ feat: Implement agent version reverting functionality
- Added `revertAgentVersion` method in the Agent model to allow reverting to a previous version of an agent.
- Introduced `revertAgentVersionHandler` in the agents controller to handle requests for reverting agent versions.
- Updated API routes to include a new endpoint for reverting agent versions.
- Enhanced the VersionPanel component to support version restoration with user confirmation and feedback.
- Added localization support for success and error messages related to version restoration.
* ✨ i18n: Add localization for agent version restoration messages
* Simplify VersionPanel by removing unused parameters and enhancing agent ID handling
* Refactor Agent model and VersionPanel component to streamline version data handling
* Update version handling in Agent model and VersionPanel
- Enhanced the Agent model to include an `updatedAt` timestamp when pushing new versions.
- Improved the VersionPanel component to sort versions by the `updatedAt` timestamp for better display order.
- Added a new localization entry for indicating the active version of an agent.
* ✨ i18n: Add localization for active agent version across multiple languages
* ✨ feat: Introduce version management components for agent history
- Added `isActiveVersion` utility to determine the active version of an agent based on various criteria.
- Implemented `VersionContent` and `VersionItem` components to display agent version history, including loading and error states.
- Enhanced `VersionPanel` to integrate new components and manage version context effectively.
- Added comprehensive tests for version management functionalities to ensure reliability and correctness.
* Add unit tests for AgentFooter component
* cleanup
* Enhance agent version update handling and add unit tests for update operators
- Updated the `updateAgent` function to properly handle various update operators ($push, $pull, $addToSet) while maintaining version history.
- Modified unit tests to validate the correct behavior of agent updates, including versioning and tool management.
* Enhance version comparison logic and update tests for artifacts handling
- Modified the `isActiveVersion` utility to include artifacts in the version comparison criteria.
- Updated the `VersionPanel` component to support artifacts in the agent state.
- Added new unit tests to validate artifacts matching scenarios and edge cases in the `isActiveVersion` function.
* Implement duplicate version detection in agent updates and enhance error handling
- Added `isDuplicateVersion` function to check for identical versions during agent updates, excluding certain fields.
- Updated `updateAgent` function to throw an error if a duplicate version is detected, with detailed error information.
- Enhanced the `updateAgentHandler` to return appropriate responses for duplicate version errors.
- Modified client-side error handling to display user-friendly messages for duplicate version scenarios.
- Added comprehensive unit tests to validate duplicate version detection and error handling across various update scenarios.
* Update version title localization to include version number across multiple languages
- Modified the `com_ui_agent_version_title` translation key to include a placeholder for the version number in various language files.
- Enhanced the `VersionItem` component to utilize the updated localization for displaying version titles dynamically.
* Enhance agent version handling and add revert functionality
- Updated the `isDuplicateVersion` function to improve version comparison logic, including special handling for `projectIds` and arrays of objects.
- Modified the `updateAgent` function to streamline version updates and removed unnecessary checks for test environments.
- Introduced a new `revertAgentVersion` function to allow reverting agents to specific versions, with detailed documentation.
- Enhanced unit tests to validate duplicate version detection and revert functionality, ensuring robust error handling and version management.
* fix CI issues
* cleanup
* Revert all non-English translations
* clean up tests
* refactor: Update AnthropicClient to support Claude model naming changes
* Renamed `isClaude3` to `isClaudeLatest` to accommodate newer Claude models.
* Updated logic to determine if the model is part of the Claude family.
* Adjusted `useMessages` property to reflect the new model naming convention.
* Cleaned up client properties during disposal to match the updated naming.
* feat: Claude-4 Support
* feat: Add Thinking and Prompt caching support for Claude 4
* chore: Update ANTHROPIC_MODELS in .env.example for latest model versions
* refactor: optional attachment properties for `FileAttachment`
* refactor: update ActionButton to use localized text
* chore: localize text in DataTableFile, add missing translation, imports order, and linting
* chore: linting in DataTable
* fix: integrate Recoil state management for file deletion in DataTableFile
* fix: integrate Recoil state management for file deletion in DataTable
* fix: add temp_file_id to BatchFile type and update deleteFiles logic to properly remove files that are mapped to temp_file_id
* chore: linting
* 🔧 fix: Correctly parse dimensions for image width and height in OpenAIImageGen component
* style: overlay class for DialogImage component to improve visibility
* style: Update transition timing function for PixelCard component to rely on style props
* fix: The request format for file analysis with Azure OpenAI assistants
The request format for file analysis with Azure OpenAI assistants differs from that of OpenAI. This fix updates the API to use attachments instead of file_ids. danny-avila#7379
* chore: ESLint Error
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* #
* - refactor: simplified getCustomConfig func
* #
* - feature: persist values for parameters with optionType of custom
* #
* - refactor: moved `Parameters/settings.ts` into `data-provider` so that both frontend and backend code can use it.
* - feature: loadCustomConfig can now parse and validate customParams property for `endpoints.custom` in `librechat.yaml`
* # fixed linter
* # removed .strict() in config.ts
* change: added packages/data-provider/src to SOURCE_DIRS for i18n check
* # removed unnecessary lodash imports
* # addressed PR comments
# fixed lint for updated files
* # better import for lodash (w/o relying on tree-shaking)
* ✨ feat: Enhance Spinner component with customizable properties and improved animation
* 🔧 fix: Replace Loader with Spinner in RunCode component and update FilePreview to use Spinner for progress indication
* ✨ feat: Refactor icons in CodeProgress and CancelledIcon components; enhance animation and styling in ExecuteCode and ProgressText components
* ✨ feat: Refactor attachment handling in ExecuteCode component; replace individual attachment rendering with AttachmentGroup for improved structure
* ✨ feat: Refactor dialog components for improved accessibility and styling; integrate Skeleton loading state in Image component
* ✨ feat: Refactor ToolCall component to use ToolCallInfo for better structure; replace ToolPopover with AttachmentGroup; enhance ProgressText with error handling and improved UI elements
* 🔧 fix: Remove unnecessary whitespace in ProgressText
* 🔧 fix: Remove unnecessary margin from AgentFooter and AgentPanel components; clean up SidePanel imports
* ✨ feat: Enhance ToolCall and ToolCallInfo components with improved styling; update translations and add warning text color to Tailwind config
* 🔧 fix: Update import statement for useLocalize in ToolCallInfo component; fix: chatform transition
* ✨ feat: Refactor ToolCall and ToolCallInfo components for improved structure and styling; add optimized code block for better output display
* ✨ feat: Implement OpenAI image generation component; add progress tracking and localization for user feedback
* 🔧 fix: Adjust base duration values for image generation; optimize timing for quality settings
* chore: remove unnecessary space
* ✨ feat: Enhance OpenAI image generation with editing capabilities; update localization for progress feedback
* ✨ feat: Add download functionality to images; enhance DialogImage component with download button
* ✨ feat: Enhance image resizing functionality; support custom percentage and pixel dimensions in resizeImageBuffer
* chore(store/families): linting
* refactor: Update `createChatSearchParams` to use `tQueryParamsSchema` for allowed parameters and add `modelLabel` to schema
* refactor: Enhance `useQueryParams` to streamline parameter processing and improve submission handling
* chore: linting
* fix: Add `disableParams` option to conversation handling and related schemas to prevent search params from updating due to use of default preset
* fix: Update `createChatSearchParams` to correctly ignore `agent_id` when it matches `EPHEMERAL_AGENT_ID`
* chore: revert modelLabel addition to query params, as no longer necessary due to `disableParams`
* fix: Refine logic for `disableParams` to ensure correct handling of active preset comparison
* fix: Add `disableParams` option to `NewConversationParams` and update related hooks for preset handling
* fix: Refactor validation logic in `validateSettingDefinitions` to improve handling of `includeInput` and update conversation schema
* fix: Bump version of `librechat-data-provider` to 0.7.83
* 🔒 feat: Add Content Security Policy using Helmet middleware
* 🔒 feat: Set trust proxy and refine Content Security Policy directives
* 🎨 feat: add `copy-tex` to improve copying KaTeX (#7308)
When selecting equations and using copy paste, uses the correct latex code.
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
* 🔃 refactor: `AgentFooter` to conditionally render buttons based on `activePanel` (#7306)
* 🚀 feat: Add `Cloudflare Turnstile` support (#5987)
* 🚀 feat: Add @marsidev/react-turnstile dependency to package.json and package-lock.json
* 🚀 feat: Integrate Cloudflare Turnstile configuration support in AppService and add schema validation
* 🚀 feat: Implemented Cloudflare Turnstile integration in Login and Registration forms
* 🚀 feat: Enhance AppService tests with additional mocks and configuration setups
* 🚀 feat: Comment out outdated config version warning tests in AppService.spec.js
* 🚀 feat: Remove outdated warning tests and add new checks for environment variables and API health
* 🔧 test: Update AppService.spec.js to use expect.anything() for paths validation
* 🔧 test: Refactor AppService.spec.js to streamline mocks and enhance clarity
* 🔧 chore: removed not needed test
* Potential fix for code scanning alert no. 5638: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5629: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5642: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update turnstile.js
* Potential fix for code scanning alert no. 5634: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5646: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5647: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* 🔒 feat: Refactor Content Security Policy setup to use Helmet middleware with custom directives
* 🔒 feat: Enhance Content Security Policy to include Sandpack Bundler URL
* 🔒 feat: Update Content Security Policy and integrate Turnstile captcha support
---------
Co-authored-by: andresgit <9771158+andresgit@users.noreply.github.com>
Co-authored-by: matt burnett <mawburn@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* chore: linting for mcp related modules
* fix: update `isConnected` method to return a Promise and handle connection state asynchronously to properly handle/cleanup disconnected user connections
* 🚀 feat: Add @marsidev/react-turnstile dependency to package.json and package-lock.json
* 🚀 feat: Integrate Cloudflare Turnstile configuration support in AppService and add schema validation
* 🚀 feat: Implemented Cloudflare Turnstile integration in Login and Registration forms
* 🚀 feat: Enhance AppService tests with additional mocks and configuration setups
* 🚀 feat: Comment out outdated config version warning tests in AppService.spec.js
* 🚀 feat: Remove outdated warning tests and add new checks for environment variables and API health
* 🔧 test: Update AppService.spec.js to use expect.anything() for paths validation
* 🔧 test: Refactor AppService.spec.js to streamline mocks and enhance clarity
* 🔧 chore: removed not needed test
* Potential fix for code scanning alert no. 5638: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5629: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5642: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update turnstile.js
* Potential fix for code scanning alert no. 5634: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5646: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 5647: Ensure code is properly formatted, use insertion, deletion, or replacement to obtain desired formatting.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* 🌍 i18n: Add Danish and Czech localization support
* 🌍 i18n: Correct Czech language code from 'sc-CZ' to 'cs-CZ'
* 🌍 i18n: Add Catalan localization support
* chore: temporarily remove @librechat/agents
* chore: bump @langchain/google-genai to v0.2.8
* chore: bump @langchain/google-vertexai to v0.2.8
* chore: bump @langchain/core to v0.3.55
* chore: bump @librechat/agents to v2.4.316
* chore: bump @librechat/agents to v2.4.317
* chore: update title for Unreleased Changelog PR to include documentation emoji
* chore: add workflow_dispatch trigger and update Pull Request title for changelog
* ✨ v0.7.8
* chore: bump data-provider to v0.7.82
* chore: update CONFIG_VERSION to 1.2.5
* chore: bump librechat-mcp version to 1.2.2
* chore: bump @librechat/data-schemas version to 0.0.7
Without this, it's not possible to run any MCPs that use python, only node.
So, add these to enable using things that use `uvx` similar to what
the documentation already talks about for `npx`.
* fix: Update Gemini 2.5 Pro Preview Model Name in Token Values
* refactor: Update DeleteButton to close menu when deletion is successful
* refactor: Add unmountOnHide prop to DropdownPopup in multiple components
* chore: linting
* chore: linting
* feat: Add `chatMenu` option for MCP Servers to control visibility in MCPSelect dropdown
* refactor: Update loadManifestTools to return combined tool manifest with MCP tools first
* chore: remove deprecated openapi plugins
* chore: linting
* chore(AgentClient): linting, remove unnecessary `checkVisionRequest` logger
* refactor(AuthService): change logoutUser logging from error to debug level
* chore: new Gemini models token values and rates
* chore(AskController): linting
* 🔄 fix: Include usage in stream options for OpenAI and Azure endpoints
* fix: Agents support for Azure serverless endpoints
* fix: Refactor condition for assistants and azureAssistants endpoint handling
* AWS Titan via Bedrock: model doesn't support system messages, Closes#6456
* fix: Add EndpointSchemaKey type to endpoint parameters in buildDefaultConvo and ensure assistantId is always defined
* fix: Handle new conversation state for assistants endpoint in finalHandler
* fix: Add spec and iconURL parameters to `saveAssistantMessage` to persist modelSpec fields
* fix: Handle assistant unlinking even if no valid files to delete
* chore: move type definitions from callbacks.js to typedefs.js
* chore: Add StandardGraph typedef to typedefs.js
* chore: Update parameter type for graph in ModelEndHandler to StandardGraph
---------
Co-authored-by: Andres Restrepo <andres@enric.ai>
This pull request updates the GOOGLE_MODELS and GOOGLE_TITLE_MODEL examples in the .env.example file to reflect the currently available models on Google AI Studio (Gemini API) and Vertex AI.
Many of the models previously listed in the example file have since been deprecated or are no longer the primary recommended versions. This discrepancy could lead to confusion for new users setting up the project, potentially causing them to select non-functional or outdated model identifiers, resulting in errors or suboptimal performance.
The changes in this PR ensure that:
- The model lists for both Gemini API (AI Studio) and Vertex AI are synchronized with the current offerings.
- New users have a more accurate and reliable starting point when configuring their environment.
- The likelihood of encountering issues due to deprecated model names during initial setup is significantly reduced.
* feat: expose additional Tavily API parameters for tool
The following parameters are part of Tavily API but were previously not exposed for agents to use via the tool. Now they are. The source documentation is here: https://docs.tavily.com/documentation/api-reference/endpoint/search
include_raw_content - returns the full text of found web pages (default is false)
include_domains - limit search to this list of domains (default is none)
exclude_domains - exclude this list of domains form search (default is none)
topic - enum of "general", "news", or "finance" (default is "general")
time_range - enum of "day", "week", "month", or "year" (default unlimited)
days - number of days to search (default is 7, but only applicable to topic == "news")
include_image_descriptions - include a description of the image in the search results (default is false)
It is a little odd that they have both time_range and days, but there it is.
I have noticed that this change requires a little bit of care in prompting to make sure that it doesn't use "news" when you wanted "general". I've attemtped to hint that in the tool description.
* correct lint error
* more lint
---------
Co-authored-by: Michael Natkin <michaeln@glowforge.com>
* Fix: Prevent side effects in `processMCPEnv` by deep cloning MCPOptions
The `processMCPEnv` function was modifying the original `MCPOptions` object, leading to unintended side effects where `LIBRECHAT_USER_ID` could be incorrectly shared across different users. This commit addresses this issue by performing a deep clone of the `MCPOptions` object before processing, ensuring that modifications are isolated and do not affect other users.
* ci: Add tests for processMCPEnv to ensure deep cloning, user ID isolation and environment variable processing
---------
Co-authored-by: Alex C <viennadd@users.noreply.github.com>
* refactor: add custom to as workaround to include custom headers to the initial connection request
* chore: bump MCP client version to 1.2.1 in package-lock and package.json for librechat-mcp
* fix: no system message only for o1-preview and o1-mini
* chore(OpenAIClient): linting
* fix: update regex to include o1-preview and o1-mini in noSystemModelRegex
* refactor: rename variable for consistency with AgentClient
---------
Co-authored-by: Andres <9771158+andresgit@users.noreply.github.com>
* refactor: Enhance initial conversation query condition for better state management and prevent unused network requests
* ifx: Add Prettier plugin to ESLint configuration
* chore: linting and typing in convos.spec.ts
* fix: add back fresh data fetching and improve error handling for conversation navigation
* fix: set conversation only with conversation state change intent, to prevent double queries for messages
* 🔄 chore: Update @langchain/google-vertexai to version 0.2.5 in package.json and package-lock.json
* chore: temp remove agents
* 🔄 chore: Update @langchain/google-genai to version 0.2.5 in package.json and package-lock.json
* 🔄 chore: Update @langchain/community to version 0.3.42 in package.json and package-lock.json
* 🔄 chore: Add license information for @langchain/textsplitters in package-lock.json
* 🔄 chore: Update @langchain/core to version 0.3.51 in package.json and package-lock.json
* 🔄 chore: Update openai dependency to version 4.96.2 in package.json and package-lock.json
* chore: @librechat/agents to v2.4.30
* fix: streaming condition in ModelEndHandler to account for boundModel `disableStreaming` setting
* fix: update regex for noSystemModel and refactor message handling in AgentClient
* feat: Google Gemma models
* chore: remove unnecessary empty JSX fragment in PopoverButtons component
* 🔄 chore: bump supertest to 7.1.0, resolves CVE-2025-46653
* 🔄 chore: update vite to version 6.3.4 and add fdir, picomatch, and tinyglobby as dev dependencies
* 🔄 chore: npm audit fix: remove unused dependencies fdir, picomatch, and tinyglobby from package-lock.json
* fix: Reset artifacts on unmount and remove useIdChangeEffect hook
* feat: Replace SVG icons with Lucide icons for improved consistency
* fix: Refactor artifact reset logic on unmount and conversation change
* refactor: Rename artifactsVisible to artifactsVisibility for consistency
* feat: Replace custom SVG icons with Lucide icons for improved consistency
* feat: Add visibleArtifacts atom for managing visibility state
* feat: Implement debounced visibility state management for artifacts
* refactor: Add useIdChangeEffect hook to reset visible artifacts on conversation ID change
* refactor: Remove unnecessary dependency from useMemo in TextPart component
* refactor: Enhance artifact visibility management by incorporating location checks for search path
* refactor: Improve transition effects for artifact visibility in Artifacts component
* chore: Remove preprocessCodeArtifacts function and related tests
* fix: Update regex for detecting enclosed artifacts in latest message
* refactor: Update artifact visibility checks to be more generic (not just search)
* chore: Enhance artifact visibility logging
* refactor: Extract closeArtifacts function to improve button click handling
* refactor: remove nested logic from use artifacts effect
* refactor: Update regex for detecting enclosed artifacts to handle new line variations
* refactor: Replace Popover with Ariakit components for improved accessibility and UX
* wip: first pass, fork a11y
* feat(i18n): Add localization for fork options and related UI elements
* fix: Ensure Dropdown component has correct z-index for proper layering
* style: Update Fork PopoverButton styles and remove unused sideOffset prop
* style: Update text colors and spacing in Fork component for improved readability
* style: Enhance Fork component's UI by adding select-none class to prevent text selection
* chore: Remove unused Checkbox import from Fork component
* fix: Add sr-only span for accessibility in SplitText component
* chore: Reorder imports in Fork component for better organization
* refactor: Update schema conversion to allow nullable optional fields
* feat: Add support for 'Deepseek' model in response sender logic
* fix: Normalize endpoint case for legacy content handling in AgentClient (fixes `deepseek-chat` followup issues)
* wip: Add Instructions component for agent configuration
* ✨ feat: Implement DropdownPopup for variable insertion in instructions
* refactor: Enhance variable handling by exporting specialVariables and updating Markdown components
* feat: Add special variable support for current date and user in Instructions component
* refactor: Update handleAddVariable to include localized label
* feat: replace special variables in instructions presets
* chore: update parameter type for user in getListAgents function
* refactor: integrate dayjs for date handling and move replaceSpecialVars function to data-provider
* feat: enhance replaceSpecialVars to include day number in current date format
* feat: integrate replaceSpecialVars for processing agent instructions
* feat: add support for current date & time in replaceSpecialVars function
* feat: add iso_datetime support in replaceSpecialVars function
* fix: enforce text parameter to be a required field in replaceSpecialVars function
* feat: add ISO datetime support in translation file
* fix: disable eslint warning for autoFocus in TextareaAutosize component
* feat: add VariablesDropdown component and integrate it into CreatePromptForm and PromptEditor; update translation for special variables
* fix: CategorySelector and related localizations
* fix: add z-index class to LanguageSTTDropdown for proper stacking context
* fix: add max-height and overflow styles to OGDialogContent in VariableDialog and PreviewPrompt components
* fix: update variable detection logic to exclude special variables and improve regex matching
* fix: improve accessibility text for actions menu in ChatGroupItem component
* fix: adjust max-width and height styles for dialog components and improve markdown rendering for light vs. dark, height/widths, etc.
* fix: remove commented-out code for better readability in PromptVariableGfm component
* fix: handle undefined input parameter in setParams function call
* fix: update variable label types to use TSpecialVarLabel for consistency
* fix: remove outdated information from special variables description in translation file
* fix: enhance unused i18next keys detection for special variable keys
* fix: update color classes for consistency/a11y in category and prompt variable components
* fix: update PromptVariableGfm component and special variable styles for consistency
* fix: improve variable highlighting logic in VariableForm component
* fix: update background color classes for consistency in VariableForm component
* fix: add missing ref parameter to Dialog component in OriginalDialog
* refactor: move navigate call for new conversation to after setConversation update
* refactor: move message query hook to client workspace; fix: handle edge case for navigation from finalHandler creating race condition for response message DB save
* chore: bump librechat-data-provider to 0.7.793
* ci: add unit tests for replaceSpecialVars function
* fix: implement getToolkitKey function for image_gen_oai toolkit filtering/including
* ci: enhance dayjs mock for consistent date/time values in tests
* fix: MCP stdio server fail to start when passing env property
* fix: use optional chaining for clientRef dereferencing in AskController and EditController
feat: add context to saveMessage call in streamResponse utility
* fix: only save error messages if the userMessageId was initialized
* refactor: add isNotAppendable check to disable inputs in ChatForm and useTextarea
* feat: enhance error handling in useEventHandlers and update conversation state in useNewConvo
* refactor: prepend underscore to conversationId in newConversation template
* feat: log aborted conversations with minimal messages and use consistent conversationId generation
---------
Co-authored-by: Olivier Schiavo <olivier.schiavo@wengo.com>
Co-authored-by: aka012 <aka012@neowiz.com>
Co-authored-by: jiasheng <jiashengguo@outlook.com>
* chore: fix logging for illegal target endpoints in getEndpointFromSetup
* fix: prevent querying agent by ID for ephemeral agents
* refactor: reorder variable declarations in MessagesView for clarity
* fix: localize 'nothing found' message in MessagesView
* refactor: streamline navigation logic and enhance loading spinner component in ChatView
* refactor: simplify loading spinner logic in ChatView component
* fix: ensure message queries are invalidated after new conversation creation in HeaderNewChat, MobileNav, and NewChat components
* 🐛 First run dev mode will have error occur.
🐛 First run dev mode will have error occur.
* fix font-size localstorage presist bug
* Don't ping meilisearch if the search is disabled via env var
* simplify logic in search/enable endpoint
* refactor: simplify enable endpoint condition check
* feat: add useIdChangeEffect hook and integrate it into ChatRoute
---------
Co-authored-by: Ne0 <20765145+zeeklog@users.noreply.github.com>
Co-authored-by: TinyTin <garychangcn@hotmail.com>
Co-authored-by: Denis Palnitsky <denis.palnitsky@zendesk.com>
* refactor: improve ChatView layout by keeping ChatForm mounted
* feat: implement focusChat functionality for new conversations and navigations
* refactor: reset artifacts when navigating to prevent any from rendering in a conversation when none exist; edge case, artifacts get created by search route (TODO: use a different artifact renderer for Search markdown)
* chore: remove redundancy of useSetRecoilState and useRecoilValue with useRecoilState in SearchBar
* refactor: remove unnecessary focus effect on text area in ChatForm
* refactor: improve searchbar and clear search button accessibility
* fix: add tabIndex to Conversations component for improved accessibility, moves focus directly conversation items
* style: adjust margin in Header component for improved layout symmetry with Nav
* chore: imports order
* refactor: streamline model preset handling in conversation setup
* refactor: integrate navigation and location hooks in chat functions and event handlers, prevent cache from fetching on final event handling
* fix: prevent adding code interpreter non-image output to file list on message attachment event, fix all unhandled edge cases when this is done (treating the file download as an image attachment, undefined fields, message tokenCount issues, use of `startsWith` on undefined "text") although it is now prevent altogether
* chore: remove unused jailbreak prop from MinimalIcon component in EndpointIcon
* feat: add new SVG icons (MobileSidebar, Sidebar, XAIcon), fix: xAI styling in dark vs. light modes, adjust styling of Landing icons
* fix: open conversation in new tab on navigation with ctrl/meta key
* refactor: update Nav & Header to use close/open sidebar buttons, as well as redesign "New Chat"/"Bookmarks" buttons to the top of the Nav, matching the latest design of ChatGPT for simplicity and to free up space
* chore: remove unused isToggleHovering state and simplify opacity logic in Nav component
* style: match mobile nav to mobile header
* wip: OpenAI Image Generation Tool with customizable options
* WIP: First pass OpenAI Image Generation Tool and integrate into existing tools
* 🔀 fix: Comment out unused validation for image generation tool parameters
* 🔀 refactor: Update primeResources function parameters for better destructuring
* feat: Add image_edit resource to EToolResources and update AgentToolResources interface
* feat: Enhance file retrieval with tool resource filtering for image editing
* refactor: add OpenAI Image Tools for generation and editing, refactor related components, pass current request image attachments as tool resources for editing
* refactor: Remove commented-out code and clean up API key retrieval in createOpenAIImageTools function
* fix: show message attachments in shared links
* fix: Correct parent message retrieval logic for regenerated messages in useChatFunctions
* fix: Update primeResources to utilize requestFileSet for image file processing
* refactor: Improve description for image generation tool and clarify usage conditions, only provide edit tool if there are images available to edit
* chore: Update OpenAI Image Tools icon to use local asset
* refactor: Update image generation tool description and logic to prioritize editing tool when files are uploaded
* refactor: Enhance image tool descriptions to clarify usage conditions and note potential unavailability of uploaded images
* refactor: Update useAttachmentHandler to accept queryClient to update query cache with newly created file
* refactor: Add customizable descriptions and prompts for OpenAI image generation and editing tools
* chore: Update comments to use JSDoc style for better clarity and consistency
* refactor: Rename config variable to clientConfig for clarity and update signal handling in image generation
* refactor: Update axios request configuration to include derived signal and baseURL for improved request handling
* refactor: Update baseURL environment variable for OpenAI image generation tool configuration
* refactor: Enhance axios request configuration with conditional headers and improved clientConfig setup
* chore: Update comments for clarity and remove unnecessary lines in OpenAI image tools
* refactor: Update description for image generation without files to clarify user instructions
* refactor: Simplify target parent message logic for regeneration and resubmission cases
* chore: Remove backticks from error messages in image generation and editing functions
* refactor: Rename toolResources to toolResourceSet for clarity in file retrieval functions
* chore: Remove redundant comments and clean up TODOs in OpenAI image tools
* refactor: Rename fileStrategy to appFileStrategy for clarity and improve error handling in image processing
* chore: Update react-resizable-panels to version 2.1.8 in package.json and package-lock.json
* chore: Ensure required validation for logs and Code of Conduct agreement in bug report template
* fix: Update ArtifactPreview to use startupConfig and currentCode from memoized props to prevent unnecessary re-renders
* fix: improve robustness of `save & submit` when used from a user-message with existing attachments
* fix: add null check for artifact index in CodeEditor to prevent errors, trigger re-render on artifact ID change
* fix: standardize default values for artifact properties in Artifact component, avoiding prematurely setting an "empty/default" artifact
* fix: reset current artifact ID before setting a new one in ArtifactButton to ensure correct state management
* chore: rename `setArtifactId` variable to `setCurrentArtifactId` for consistency
* chore: update type annotations in File and S3 CRUD functions for consistency
* refactor: improve image handling in OpenAI tools by using image_id references and enhance tool context for image editing
* fix: update image_ids schema in image_edit_oai to enforce presence and provide clear guidelines for usage
* fix: enhance file fetching logic to ensure user-specific and dimension-validated results
* chore: add details on image generation and editing capabilities with various models
* feat: Update MCP tool creation to use lowercase provider name
* refactor: handle MCP image output edge cases where tool outputs must contain string responses
* feat: Drop 'anyOf' and 'oneOf' fields from JSON schema conversion
* feat: Transform 'oneOf' and 'anyOf' fields to Zod union in JSON schema conversion
* fix: artifactPlugin to replace textDirective with expected text, closes#7029
* fix: auto-save functionality to handle conversation transitions from pending drafts, closes#7027
* refactor: improve async handling during user disconnection process
* fix: use correct user ID variable for MCP tool calling
* fix: improve handling of pending drafts in auto-save functionality
* fix: add support for additional model names in getValueKey function
* fix: reset form values on agent deletion when no agents remain
* feat: Add support for new OpenAI models (o4-mini, o3) and update related logic
* 🔧 fix: Rename 'resubmitFiles' to 'isResubmission' for consistency across types and hooks
* 🔧 fix: Replace hardcoded 'pending_req' with CacheKeys.PENDING_REQ for consistency in cache handling
* 🔧 fix: Update cache handling to use Time.ONE_MINUTE instead of hardcoded TTL and streamline imports
* 🔧 fix: Enhance message handling logic to correctly identify parent messages and streamline imports in useSSE
* ✨ style: Adjust z-index for popover UI and update className in ConvoOptions
* ✨ feat: Add 'spec' field to conversation query selection
* 🛠️ fix: add back conversationId to use Constants.PENDING_CONVO in useSSE hook on submission to allow text drafts to clear
* ✨ chore: add .clineignore to .gitignore for Cline configuration
* ✨ refactor: memoize FileSearchCheckbox component for performance optimization
* fix: agent resource management by adding tool_resource to agent's tools if missing
* fix: action parameters are assigned to the correct location (query, parameter, header, body)
* removed copy/paste error
* added unit tests, only add contenttype if specified
---------
Co-authored-by: Peter Rothlaender <peter.rothlaender@ginkgo.com>
* 📦 chore: update @ariakit/react-core to version 0.4.17 in package.json and package-lock.json
* refactor: add additional ariakit menu props and unmount menu if state changes
* fix: accessibility issues and incompatibility issues due to non-portaled menu
* fix: improve visibility and accessibility of conversation options, making sure to expand dynamically when becoming active
* fix: adjust max width for conversation options popover to improve visibility
* fix: handle invalid engineTTS values and prevent VoiceDropdown render errors
* refactor: add verbose developer logging for debugging conversation state issues
* refactor: remove unnecessary effect for conversationId changes
* chore: imports
* fix: include model and entity IDs in conversation query selection
* feat: add fetchFreshData function to retrieve conversation data on navigation
* fix: remove unnecessary comment in fetchFreshData function
* chore: reorder imports in useNavigateToConvo for consistency
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: azure title model
* refactor: typing for uploadMistralOCR
* fix: update conversation ID handling in useSSE for better state management, only use PENDING_CONVO for new conversations
* fix: streamline conversation ID handling in useSSE for simplicity, only needs state update to prevent draft from applying
* fix: update performOCR and tests to support document and image URLs with appropriate types
* ✨ feat: improve Nav/Conversations/Convo/NewChat component performance
* ✨ feat: implement cursor-based pagination for conversations API
* 🔧 refactor: remove createdAt from conversation selection in API and type definitions
* 🔧 refactor: include createdAt in conversation selection and update related types
* ✨ fix: search functionality and bugs with loadMoreConversations
* feat: move ArchivedChats to cursor and DataTable standard
* 🔧 refactor: add InfiniteQueryObserverResult type import in Nav component
* feat: enhance conversation listing with pagination, sorting, and search capabilities
* 🔧 refactor: remove unnecessary comment regarding lodash/debounce in ArchivedChatsTable
* 🔧 refactor: remove unused translation keys for archived chats and search results
* 🔧 fix: Archived Chats, Delete Convo, Duplicate Convo
* 🔧 refactor: improve conversation components with layout adjustments and new translations
* 🔧 refactor: simplify archive conversation mutation and improve unarchive handling; fix: update fork mutation
* 🔧 refactor: decode search query parameter in conversation route; improve error handling in unarchive mutation; clean up DataTable component styles
* 🔧 refactor: remove unused translation key for empty archived chats
* 🚀 fix: `archivedConversation` query key not updated correctly while archiving
* 🧠 feat: Bedrock Anthropic Reasoning & Update Endpoint Handling (#6163)
* feat: Add thinking and thinkingBudget parameters for Bedrock Anthropic models
* chore: Update @librechat/agents to version 2.1.8
* refactor: change region order in params
* refactor: Add maxTokens parameter to conversation preset schema
* refactor: Update agent client to use bedrockInputSchema and improve error handling for model parameters
* refactor: streamline/optimize llmConfig initialization and saving for bedrock
* fix: ensure config titleModel is used for all endpoints
* refactor: enhance OpenAIClient and agent initialization to support endpoint checks for OpenRouter
* chore: bump @google/generative-ai
* ✨ feat: improve Nav/Conversations/Convo/NewChat component performance
* 🔧 refactor: remove unnecessary comment regarding lodash/debounce in ArchivedChatsTable
* 🔧 refactor: update translation keys for clarity; simplify conversation query parameters and improve sorting functionality in SharedLinks component
* 🔧 refactor: optimize conversation loading logic and improve search handling in Nav component
* fix: package-lock
* fix: package-lock 2
* fix: package lock 3
* refactor: remove unused utility files and exports to clean up the codebase
* refactor: remove i18n and useAuthRedirect modules to streamline codebase
* refactor: optimize Conversations component and remove unused ToggleContext
* refactor(Convo): add RenameForm and ConvoLink components; enhance Conversations component with responsive design
* fix: add missing @azure/storage-blob dependency in package.json
* refactor(Search): add error handling with toast notification for search errors
* refactor: make createdAt and updatedAt fields of tConvoUpdateSchema less restrictive if timestamps are missing
* chore: update @azure/storage-blob dependency to version 12.27.0, ensure package-lock is correct
* refactor(Search): improve conversation handling server side
* fix: eslint warning and errors
* refactor(Search): improved search loading state and overall UX
* Refactors conversation cache management
Centralizes conversation mutation logic into dedicated utility functions for adding, updating, and removing conversations from query caches.
Improves reliability and maintainability by:
- Consolidating duplicate cache manipulation code
- Adding type safety for infinite query data structures
- Implementing consistent cache update patterns across all conversation operations
- Removing obsolete conversation helper functions in favor of standardized utilities
* fix: conversation handling and SSE event processing
- Optimizes conversation state management with useMemo and proper hook ordering
- Improves SSE event handler documentation and error handling
- Adds reset guard flag for conversation changes
- Removes redundant navigation call
- Cleans up cursor handling logic and document structure
Improves code maintainability and prevents potential race conditions in conversation state updates
* refactor: add type for SearchBar `onChange`
* fix: type tags
* style: rounded to xl all Header buttons
* fix: activeConvo in Convo not working
* style(Bookmarks): improved UI
* a11y(AccountSettings): fixed hover style not visible when using light theme
* style(SettingsTabs): improved tab switchers and dropdowns
* feat: add translations keys for Speech
* chore: fix package-lock
* fix(mutations): legacy import after rebase
* feat: refactor conversation navigation for accessibility
* fix(search): convo and message create/update date not returned
* fix(search): show correct iconURL and endpoint for searched messages
* fix: small UI improvements
* chore: console.log cleanup
* chore: fix tests
* fix(ChatForm): improve conversation ID handling and clean up useMemo dependencies
* chore: improve typing
* chore: improve typing
* fix(useSSE): clear conversation ID on submission to prevent draft restoration
* refactor(OpenAIClient): clean up abort handler
* refactor(abortMiddleware): change handleAbort to use function expression
* feat: add PENDING_CONVO constant and update conversation ID checks
* fix: final event handling on abort
* fix: improve title sync and query cache sync on final event
* fix: prevent overwriting cached conversation data if it already exists
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: agent token handling to use createHandleLLMNewToken for improved closure
* refactor: update llmConfig to use maxTokens instead of max_tokens for consistency
* fix: Agent Builder setting not applying in useSideNavLinks
* fix: Remove unused type imports in useSideNavLinks
* feat: gpt-4.1
* fix: Update getCacheMultiplier and getMultiplier tests to use dynamic token values
* feat: Add gpt-4.1 to the list of vision models
* chore: Bump version of librechat-data-provider to 0.7.792
* chore: update @librechat/agents dependency to version 2.4.15
* refactor: Prevent memory leaks by nullifying boundModel.client in disposeClient function
* fix: use of proxy, use undici
* chore: update @librechat/agents dependency to version 2.4.16
* Revert "fix: use of proxy, use undici"
This reverts commit 83153cd582.
* fix: ensure fetch is imported for HTTP requests
* fix: replace direct OpenAI import with CustomOpenAIClient from @librechat/agents
* fix: update keyv peer dependency to version 5.3.2
* fix: update keyv dependency to version 5.3.2
* refactor: replace KeyvMongo with custom implementation and update flow state manager usage
* fix: update @librechat/agents dependency to version 2.4.17
* ci: update OpenAIClient tests to use CustomOpenAIClient from @librechat/agents
* refactor: remove KeyvMongo mock and related dependencies
* chore: remove unused redis file
* chore: bump keyv dependencies, and update related imports
* refactor: Implement IoRedis client for rate limiting across middleware, as node-redis via keyv not compatible
* fix: Set max listeners to expected amount
* WIP: memory improvements
* refactor: Simplify getAbortData assignment in createAbortController
* refactor: Update getAbortData to use WeakRef for content management
* WIP: memory improvements in agent chat requests
* refactor: Enhance memory management with finalization registry and cleanup functions
* refactor: Simplify domainParser calls by removing unnecessary request parameter
* refactor: Update parameter types for action tools and agent loading functions to use minimal configs
* refactor: Simplify domainParser tests by removing unnecessary request parameter
* refactor: Simplify domainParser call by removing unnecessary request parameter
* refactor: Enhance client disposal by nullifying additional properties to improve memory management
* refactor: Improve title generation by adding abort controller and timeout handling, consolidate request cleanup
* refactor: Update checkIdleConnections to skip current user when checking for idle connections if passed
* refactor: Update createMCPTool to derive userId from config and handle abort signals
* refactor: Introduce createTokenCounter function and update tokenCounter usage; enhance disposeClient to reset Graph values
* refactor: Update getMCPManager to accept userId parameter for improved idle connection handling
* refactor: Extract logToolError function for improved error handling in AgentClient
* refactor: Update disposeClient to clear handlerRegistry and graphRunnable references in client.run
* refactor: Extract createHandleNewToken function to streamline token handling in initializeClient
* chore: bump @librechat/agents
* refactor: Improve timeout handling in addTitle function for better error management
* refactor: Introduce createFetch instead of using class method
* refactor: Enhance client disposal and request data handling in AskController and EditController
* refactor: Update import statements for AnthropicClient and OpenAIClient to use specific paths
* refactor: Use WeakRef for response handling in SplitStreamHandler to prevent memory leaks
* refactor: Simplify client disposal and rename getReqData to processReqData in AskController and EditController
* refactor: Improve logging structure and parameter handling in OpenAIClient
* refactor: Remove unused GraphEvents and improve stream event handling in AnthropicClient and OpenAIClient
* refactor: Simplify client initialization in AskController and EditController
* refactor: Remove unused mock functions and implement in-memory store for KeyvMongo
* chore: Update dependencies in package-lock.json to latest versions
* refactor: Await token usage recording in OpenAIClient to ensure proper async handling
* refactor: Remove handleAbort route from multiple endpoints and enhance client disposal logic
* refactor: Enhance abort controller logic by managing abortKey more effectively
* refactor: Add newConversation handling in useEventHandlers for improved conversation management
* fix: dropparams
* refactor: Use optional chaining for safer access to request properties in BaseClient
* refactor: Move client disposal and request data processing logic to cleanup module for better organization
* refactor: Remove aborted request check from addTitle function for cleaner logic
* feat: Add Grok 3 model pricing and update tests for new models
* chore: Remove trace warnings and inspect flags from backend start script used for debugging
* refactor: Replace user identifier handling with userId for consistency across controllers, use UserId in clientRegistry
* refactor: Enhance client disposal logic to prevent memory leaks by clearing additional references
* chore: Update @librechat/agents to version 2.4.14 in package.json and package-lock.json
* v0.7.791
* feat: configuration via `SANDPACK_STATIC_BUNDLER_URL` env var and update bundlerURL logic in Artifact components
* fix: update minimum length requirement for auth fields from 10 to 1 character
* feat: Update MCP package version and dependencies; refactor ToolContentPart type
* refactor: Change module type to commonjs and update rollup configuration, remove unused dev dependency
* refactor: Change async calls to synchronous for MCP and FlowStateManager retrieval
* chore: Add eslint disable comment for i18next rule in DropdownPopup component
* fix: improve statefulness of mcp servers selected if some were removed since last session
* feat: implement conversation storage cleanup functions and integrate them into mutation success handlers
* feat: enhance storage condition logic in useLocalStorageAlt to prevent unnecessary local storage writes
* refactor: streamline local storage update logic in useLocalStorageAlt
* fix: Prevent parsing 'undefined' string in useLocalStorage initialization
* feat: first pass, code interpreter badge
* feat: Integrate API key authentication and default checked value in Code Interpreter Badge
* refactor: Rename showMCPServers to showEphemeralBadges and update related components, memoize values in useChatBadges
* refactor: Enhance AttachFileChat to support ephemeral agents in file attachment logic
* fix: Add baseURL configuration option to legacy function call
* refactor: Update dependency array in useDragHelpers to include handleFiles
* refactor: Update isEphemeralAgent function to accept optional endpoint parameter
* refactor: Update file handling to support ephemeral agents in AttachFileMenu and useDragHelpers
* fix: improve compatibility issues with OpenAI usage field handling in createRun function
* refactor: usage field compatibility
* fix: ensure mcp servers are no longer "selected" if mcp servers are now unavailable
* refactor: Enhance FileContainer with customizable button and container styles, onClick button handling, and type override
* refactor: Update file type handling to support partial file objects
* refactor: Extract download handling into a custom hook for improved reusability
* refactor: Replace LogContent with Stdout component and enhance Attachment rendering for added visibility
* feat: Update @librechat/agents to version 2.4.1 for referencing generated files in subsequent code interpreter uses
* feat: Add support for tab-separated values (TSV) in mime type handling and improve error logging for regex patterns
* chore: Update @librechat/agents to version 2.4.11 for better `session_id` instructions when wanting to persist files between executions
* chore: Update @librechat/agents to version 2.4.12 for improved functionality
* fix: Enhance argument parsing in useParseArgs to support JSON input and improve code extraction
* refactor: Update input handling in useAutoSave to require more than one character before saving to local storage
* wip: mcp select
* refactor: Update useAvailableToolsQuery to support generic data types
* feat: Enhance MCPSelect to dynamically load server options and improve MultiSelect component styling
* WIP: ephemeral agents
* wip: Add null check for MCPSelect and improve MultiSelect focus handling
* feat: Pass conversationId prop to MCPSelect in BadgeRow to optimize badge rendering
* feat: useApplyNewAgentTemplate hook to manage ephemeral agent upon conversation creation
* WIP: eph. agent payload
* refactor(OpenAIClient): streamline message processing by replacing content handling with parseTextParts function
* feat: enhance applyAgentTemplate function to accept source conversation ID for improved template application
* feat(parsers): add skipReasoning parameter to parseTextParts for conditional reasoning handling
* WIP: first pass, ephemeral agent backend processing
* chore: import order
* feat: update loadEphemeralAgent and loadAgent functions to accept model_parameters for enhanced agent configuration
* feat: add showMCPServers prop to BadgeRow for conditional rendering of MCPSelect, fix react rule violation
* feat: enhance MCPSelect with localized placeholder and custom icon, add renderSelectedValues callback
* feat: simplify message processing in AnthropicClient by replacing content handling with parseTextParts function
* feat: implement useLocalStorage hook for managing MCP values and update MCPSelect to utilize it
* chore: remove chatGPTBrowserSchema from endpoint schemas and update types for improved schema management
* chore: remove compactChatGPTSchema from endpoint schemas and update types for better schema management
* refactor: rename schemas for clarity and improve schema management
* feat: extend model detection to include 'codestral' alongside 'mistral'
* feat: add endpointType parameter to buildOptions and initializeClient functions
* fix: update condition for handling completion in BaseClient to include agents client
* refactor: simplify payload parsing logic in AgentClient and remove unused providerParsers
* refactor: change useSetRecoilState to useRecoilState for better state management in MCPSelect component
* refactor: streamline chat route handlers by consolidating middleware and improving endpoint structure
* style: update MCPSelect and MultiSelect components for improved layout in mobile view
* v0.7.790
* feat: add getMessageMapMethod to process message text and content in GoogleClient
* chore: include LAST_MCP_ key prefix in clearLocalStorage function for proper teardown on logout
* 📝 fix: Update translation for shared agent message in English locale
* 🪺 fix: Migrate role schema to new nested structure and update permissions handling where missed
* chore: bump @librechat/agents and related packages
* refactor: update message state for tool calls run step, in case no tool call chunks are received
* fix: avoid combining finalized args createContentAggregator for tool calls
* chore: bump @librechat/agents to version 2.3.99
* feat: add support for aborting flows with AbortSignal in createFlow methods
* fix: improve handling of tool call arguments in useStepHandler
* chore: bump @librechat/agents to version 2.4.0
* fix: update flow identifier format for OAuth login in createActionTool to allow uniqueness per run
* fix: improve error message handling for aborted flows in FlowStateManager
* refactor: allow possible multi-agent cross-over for oauth login
* fix: add type safety for Sandpack files in ArtifactCodeEditor
* 🔧 chore: Update caniuse-lite dependency to version 1.0.30001706 in package.json and package-lock.json
* 🔧 chore: Remove caniuse-lite dependency from package.json and package-lock.json
* 🏗️ feat: Add Group model and schema with GroupType enum
* 🏗️ feat: Introduce Permissions module and refactor role-based access control
* 🏗️ feat: Refactor permissions handling and consolidate permission schemas
* 🏗️ feat: Refactor role permissions handling and improve role initialization logic
* 🏗️ feat: Update Role.spec.js to improve imports and enhance test structure
* 🏗️ feat: Update access control logic to ensure proper permission checks in role handling
* 🏗️ chore: Bump versions for librechat-data-provider to 0.7.75 and @librechat/data-schemas to 0.0.6
* 🏗️ feat: Improve role permissions handling by ensuring defaults are applied correctly
* 🏗️ feat: Update role permissions schema to comment out unused SHARE permission
* 🏗️ chore: Bump version of librechat-data-provider to 0.7.77 and remove unused groups field from IUser interface
* 🏗️ chore: Downgrade version of librechat-data-provider to 0.7.76
* 🔧 chore: Bump versions for librechat-data-provider to 0.7.77 and data-schemas to 0.0.6
* 🏗️ chore: Update version of librechat-data-provider to 0.7.789
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🔧 feat: Add configurable S3 URL refresh expiry time
* fix: Set default width and height for URLIcon component in case container style results in NaN
* refactor: Enhance auto-save functionality with debounced restore methods
* feat: Add support for additionalProperties in JSON schema conversion to Zod
* test: Add tests for additionalProperties handling in JSON schema to Zod conversion
* chore: Reorder import statements for better readability in ask route
* fix: Handle additional successful response status code (200) in SSE error handler
* fix: add missing rate limiting middleware for bedrock and agent chat routes
* fix: update moderation middleware to check feature flag before processing requests
* fix: add moderation middleware to chat routes for text moderation
* Revert "refactor: Enhance auto-save functionality with debounced restore methods"
This reverts commit d2e4134d1f.
* refactor: Move base64 encoding/decoding functions to top-level scope and optimize input handling
* fix: Ensure safe access to agent capabilities in AgentConfig
* fix: don't show agent builder if agents endpoint is not enabled
* fix: Improve error logging for MCP tool calls
* fix: Enhance error message for MCP tool failures
* feat: Add optional spec and iconURL properties to TEndpointOption type
* chore: Update condition to use constant for new conversation parameter
* feat: Enhance abort error handling with additional endpoint options to properly render error message fields
* fix: Throw error instead of returning message for failed MCP tool calls
* refactor: separate logic to generate new S3 URLs for expired links
* feat: Implement S3 URL refresh for user avatars with error handling
* fix: authcontext error in chats where agent chain is used
* refactor: streamline balance configuration logic in getBalanceConfig function
* fix: enhance icon resolution logic in SpecIcon component
* fix: allow null values for spec and iconURL in TEndpointOption type
* fix: update balance check to allow null tokenCredits
* fix: Implement optimistic concurrency control for balance updates in Transaction model to allow for documentdb compatibility
* test: Add concurrent balance increase test for auto refill transactions
* chore: Add deprecation warnings for environment variables in checks
* chore: Change deprecatedVariables to a const declaration in checks.js
* fix: Add date validation in checkBalanceRecord to prevent invalid date errors
* feat: Add setBalanceConfig middleware to synchronize user balance settings
* chore: Reorder middleware imports in oauth.js for better readability
* 🔧 refactor: Remove modelSpecs prop from ModelSelector and related components
* fix: Update submission.conversationId references in SSE hooks and data types as was incorrectly typed
* feat: Allow showing specific endpoints alongside model specs via `addedEndpoints` field
* feat: allowed agents providers via `agents.allowedProviders` field
* fix: bump dicebear/sharp dependencies to resolve CVE-2024-12905 and improve avatar gen logic
* fix: rename variable for clarity in loadDefaultInterface function
* fix: add keepAddedConvos option to newConversation calls for modular chat support
* fix: include model information in endpoint selection for improved context
* fix: update data-provider version to 0.7.78 and increment config version to 1.2.4
* 🚀 feat: Add Temporary Chat feature with badge toggle functionality
* style: update header button
* fix: Integrate resetChatBadges functionality into useNewConvo hook following rules of react
* fix: Adjust margin logic in ChatForm for better layout handling on existing conversations
* fix: Refine margin logic in ChatForm to improve layout during message submission
* fix: Update TemporaryChat component to not render when message is submitting
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🚀 feat: Add Save Badges State functionality to chat settings
* 🚀 feat: Remove individual chat setting components and introduce a reusable ToggleSwitch component
* 🚀 feat: Replace Switches with reusable ToggleSwitch component in General settings; style: improved HoverCard
* 🚀 feat: Refactor ChatForm and Footer components for improved layout and state management
* 🚀 feat: Add deprecation warning for GPT Plugins endpoint
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🔧 fix: Update file source references to include 'azure_blob' for correct service initialization
* 🔧 fix: Add Azure Blob Storage Emulator entries to .gitignore
* fix: Update file source references to include 'azure_blob' for correct service initialization
* fix: Refactor Azure Blob Storage functions to use environment variables for access control and container name, fix deletion improper logging and improper params
* fix: Add basePath determination for agent file uploads based on MIME type
* fix: Implement file streaming to Azure Blob Storage to optimize memory usage during uploads (non-images)
* fix: Update SourceIcon to include 'azure_blob' class and adjust model setting in useSelectorEffects for assistants
* chore: import order
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* style: reduce gap in Message and Content Render components
* style: adjust padding and font size in Chat components for improved layout
* feat: personalize greeting message with user name in Landing component
* feat: first pass, multi-user connections
* 🔧 refactor: Enhance MCPConnection logging with user-specific prefixes
* 🔧 chore: Update @modelcontextprotocol/sdk dependency to version 1.8.0
* feat: idle timeout for user mcp connections
* chore: increase user connection idle timeout to 15 minutes
* feat: implement graceful shutdown for MCP servers on termination signal
* feat: implement user idle timeout management and last activity tracking
* feat: enhance MCP options to support custom headers and user ID in environment variable processing
* feat: update user last activity tracking in MCPManager
* refactor: remove default OpenRouter completions URL from OpenAIClient
* refactor: simplify log messages by removing redundant 'App' prefix in MCPManager
* refactor: show Agents Builder even if not using Agents endpoint
* refactor: remove redundant 'App' prefix from disconnect error log messages in MCPManager
* refactor: remove 'App' prefix from log prefix in MCPConnection
* chore: remove unecessary comment
* fix: allow error propagation during MCPManager initialization
* 🔧 fix: Update useTextToSpeechExternal to include loading state and improve text parsing logic
* fix: update msedge-tts and prevent excessive initialization attempts
* fix: Refactor text parsing logic in mongoMeili model to use parseTextParts function
* 🔧 fix: Resolve Mistral type strictness for OpenAI usage field
* chore: Enable usage tracking for Mistral endpoint in OpenAI configuration
* chore: Add new token values and context windows for latest premier Mistral models
* 🎨 style: Adjust isSelected svg layout of ModelSpecItem
* style: fix modelSpec URL image beeing off-center; style: selected svg centered vertically
* style: Update CustomMenu component to use rounded-lg and enhance focus styles
* style: SidePanel top padding same as NewChat
* fix: prevent unnecessary space rendering in SplitText component
* style: Fix class names and enhance layout in Badge components
* feat: disable temporary chat when in chat
* style: handle > 1 lines in title Landing
* feat: enhance dynamic margin calculation based on line count and content height in Landing component
* 🔧 feat: Enhance logging configuration for production and debug environments
* 🔒 feat: Implement encryption and decryption functions for sensitive values in ActionService with URL encoding/decoding
* refactor: optimize action service for agent tools
* refactor: optimize action processing for Assistants API
* fix: handle case where agent is not found in loadAgent function
* refactor: improve error handling in API calls by throwing new Error with logAxiosError output
* chore: bump @librechat/agents to 2.3.95, fixes "Invalid tool call structure: No preceding AIMessage with tool_call_ids"
* refactor: enhance error logging in logAxiosError function to include response status
* refactor: remove unused useModelSelection hook from Endpoint
* refactor: add support for assistants in useSelectorEffects hook
* refactor: replace string easing with imported easings in Landing component
* chore: remove duplicate translation
* refactor: update model selection logic and improve localization for UI elements
* refactor: replace endpoint value checks with helper functions for agents and assistants
* refactor: optimize display value logic and utilize useMemo for performance improvements
* refactor: clean up imports and optimize display/icon value logic in endpoint components, fix spec selection
* refactor: enhance error logging in axios utility to include stack traces for better debugging
* refactor: update logging configuration to use DEBUG_LOGGING and streamline log level handling
* refactor: adjust className for export menu button to improve layout consistency and remove unused title prop from ShareButton
* refactor: update import path for logAxiosError utility to improve module organization and clarity
* refactor: implement debounced search value setter in ModelSelectorContext for improved performance
* 🔧 fix: Update compression plugin to version 2 and adjust configuration
* 🔧 fix: Adjust compression plugin configuration to set threshold to 10240
* 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and add external polyfills in configuration
* 🔧 fix: Downgrade vite-plugin-node-polyfills to version 0.17.0 and remove external polyfills from configuration
* 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and remove outdated version from package.json
* 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and remove outdated version from package.json
* chore: fix vite-plugin-node-polyfills workspace installation
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* ✨ feat: Add Expand Chat functionality and improve UI components
* ✨ feat: Introduce Chat Badges feature with editing capabilities and UI enhancements
* ✨ feat: re-implement file attachment functionality with new components and improved UI
* ✨ feat: Enhance BadgeRow component with drag-and-drop functionality and add animations for better user experience
* ✨ feat: Add useChatBadges hook and enhance Badge component with animations and toggle functionality
* feat: Improve Add/Delete Badges + style and bug fixes
* ✨ feat: Refactor EditBadges component and optimize useChatBadges hook for improved performance and readability
* ✨ feat: Add type definition for LucideIcon in EditBadges component
* refactor: Clean up BadgeRow component by removing outdated comment and improving code readability
* refactor: Rename app-icon class to badge-icon for consistency and improve badge styling
* feat: Add Center Chat Input toggle and update related components for improved UI/UX
* refactor: Simplify ChatView and MessagesView components for improved readability and performance
* refactor: Improve layout and positioning of scroll button in MessagesView component
* refactor: Adjust scroll button position in MessagesView component for better visibility
* refactor: Remove redundant background class from Badge component for cleaner styling
* feat: disable chat badges
* refactor: adjust positioning of scroll button and popover for improved layout
* refactor: simplify class names in ChatForm and RemoveFile components for cleaner code
* refactor: move Switcher to HeaderOptions from SidePanel
* fix(Landing): duplicate description
* feat: add SplitText component for animated text display and update Landing component to use it
* feat(Chat): add ConversationStarters component and integrate it into ChatView; remove ConvoStarter component
* feat(Chat): enhance Message component layout and styling for improved readability
* feat(ControlCombobox, Select): enhance styling and add animation for improved UI experience
* feat(Chat): update Header and HeaderNewChat components for improved layout and styling
* feat(Chat): add ModelDropdown (now includes both endpoint and model) and refactor Menu components for improved UI
* feat(ModelDropdown): add Agent Select; removed old AgentSwitcher components
* feat(ModelDropdown): add settings button for user key configuration
* fix(ModelDropdown): the model dropdown wasn't opening automatically when opening the endpoint one
* refactor(Chat): remove unused EndpointsMenu and related components to streamline codebase
* feat: enhance greeting message and improve accessibility fro ModelDropdown
* refactor(Endpoints): add new hooks and components for endpoint management
* feat(Endpoint): add support for modelSpecs
* feat(Endpoints): add mobile support
* fix: type issues
* fix(modelSpec): type issue
* fix(EndpointMenuDropdown): double overflow scroller in mobile model list
* fix: search model on mobile
* refactor: Endpoint/Model/modelSpec dropdown
* refactor: reorganize imports in Endpoint components
* refactor: remove unused translation keys from English locale
* BREAKING: moving to ariakit with new CustomMenu
* refactor: remove unnecessary comments
* refactor: remove EndpointItem, ModelDropdownButton, SpecIcon, and SpecItem components
* 🔧 fix: AI Icon bump when regenerating message
* wip: chat UI refactoring, fix issues
* chore: add recent update to useAutoSave
* feat: add access control for agent permissions in useMentions hook
* refactor: streamline ModelSelector by removing unused endpoints logic
* refactor: enhance ModelSelector and context by integrating endpointsConfig and improving type usage
* feat: update ModelSelectorContext to utilize conversation data for initial state
* feat: add selector effects for synced endpoint handling
* feat: add guard clause for conversation endpoint in useSelectorEffects hook
* fix: safely call onSelectMention and add autofocus to mention input
* chore: typing
* refactor: ModelSelector to streamline key dialog handling and improve endpoint rendering
* refactor: extract SettingsButton component for cleaner endpoint item rendering
* wip: first pass, expand set api key
* wip: first pass, expanding set key
* refactor: update EndpointItem styles for improved layout and hover effects
* refactor: adjust padding in EndpointItem for improved layout consistency
* refactor: update preset structure in useSelectMention to include spec as null
* refactor: rename setKeyDialogOpen to onOpenChange for clarity and consistency, bring focus back to button that opened dialog
* feat: add SpecIcon component for dynamic model spec icons in menu, adjust icon styling
* refactor: update getSelectedIcon to accept additional parameters and improve icon rendering logic
* fix: adjust padding in MessageRender for improved layout
* refactor: remove inline style for menu width in CustomMenu component
* refactor: enhance layout and styling in ModelSpecItem component for better responsiveness
* refactor: update getDefaultModelSpec to accept startupConfig and improve model spec retrieval logic
* refactor: improve key management and default values in ModelSelector and related components
* refactor: adjust menu width and improve responsiveness in CustomMenu and EndpointItem components
* refactor: enhance focus styles and responsiveness in EndpointItem component
* refactor: improve layout and spacing in Header and ModelSelector components for better responsiveness
* refactor: adjust button styles for consistency and improved layout in AddMultiConvo and PresetsMenu components
* fix: initial fix of assistant names
* fix: assistants handling
* chore: update version of librechat-data-provider to 0.7.75 and add 'spec' to excludedKeys
* fix: improve endpoint filtering logic based on interface configuration and access rights
* fix: remove unused HeaderOptions import and set spec to null in presets and mentions
* fix: ensure currentExample is always an object when updating examples
* fix: update interfaceConfig checks to ensure modelSelect is considered for rendering components
* fix: update model selection logic to consider interface configuration when prioritizing model specs
* fix: add missing localizations
* fix: remove unused agent and assistant selection translations
* fix: implement debounced state updates for selected values in useSelectorEffects
* style: minor style changes related to the ModelSelector
* fix: adjust maximum height for popover and set fixed height for model item
* fix: update placeholders for model and endpoint search inputs
* fix: refactor MessageRender and ContentRender components to better match each other
* fix: remove convo fallback for iconURL in MessageRender and ContentRender components
* fix: update handling of spec, iconURL, and modelLabel in conversation presets, to allow better interchangeability
* fix: replace chatGptLabel with modelLabel in OpenAI settings configuration (fully deprecate chatGptLabel)
* fix: remove console log for assistantNames in useEndpoints hook
* refactor: add cleanInput and cleanOutput options to default conversation handling
* chore: update bun.lockb
* fix: set default value for showIconInHeader in getSelectedIcon function
* refactor: enhance error handling in message processing when latest message has existing content blocks
* chore: allow import/no-cycle for messages
* fix: adjust flex properties in BookmarkMenu for better layout
* feat: support both 'prompt' and 'q' as query parameters in useQueryParams hook
* feat: re-enable Badges components
* refactor: disable edit badge component
* chore: rename assistantMap to assistantsMap for consistency
* chore: rename assistantMap to assistantsMap for consistency in Mention component
* feat: set staleTime for various queries to improve data freshness
* feat: add spec field to tQueryParamsSchema for model specification
* feat: enhance useQueryParams to handle model specs
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: remove legacy max_tokens setting for vision models in OpenAIClient (intended for gpt-4-preview)
* refactor: streamline capability checks in loadAgentTools function, still allow actions if tools are disabled
* fix: enhance error handling for token limits in AnthropicClient and update error message in translations
* feat: append timestamp to cloned agent names for better identification
* chore: update @librechat/agents dependency to version 2.3.94
* refactor: remove clearDraft helper from useSubmitMessage and centralize draft clearing logic to SSE handling, helps prevent user message loss if logout occurs
* refactor: increase debounce time for clearDraft function to improve auto-save performance
* 🏗️ refactor: Improve spendTokens logic to handle zero completion tokens and enhance test coverage
* 🏗️ test: Add tests to ensure balance does not go below zero when spending tokens
* 🏗️ fix: Ensure proper continuation in AgentClient when handling errors
* fix: spend token race conditions
* 🏗️ test: Add test for handling multiple concurrent transactions with high balance
* fix: Handle Omni models prompt prefix handling for user messages with array content in OpenAIClient
* refactor: Update checkBalance import paths to use new balanceMethods module
* refactor: Update checkBalance imports and implement updateBalance function for atomic balance updates
* fix: import from replace method
* feat: Add createAutoRefillTransaction method to handle non-balance updating transactions
* refactor: Move auto-refill logic to balanceMethods and enhance checkBalance functionality
* feat: Implement logging for auto-refill transactions in balance checks
* refactor: Remove logRefill calls from multiple client and handler files
* refactor: Move balance checking and auto-refill logic to balanceMethods for improved structure
* refactor: Simplify balance check calls by removing unnecessary balanceRecord assignments
* fix: Prevent negative rawAmount in spendTokens when promptTokens is zero
* fix: Update balanceMethods to use Balance model for findOneAndUpdate
* chore: import order
* refactor: remove unused txMethods file to streamline codebase
* feat: enhance updateBalance and createAutoRefillTransaction methods to support additional parameters for improved balance management
* 🚀 feat: Add automatic refill settings to balance schema
* 🚀 feat: Refactor balance feature to use global interface configuration
* 🚀 feat: Implement auto-refill functionality for balance management
* 🚀 feat: Enhance auto-refill logic and configuration for balance management
* 🚀 chore: Bump version to 0.7.74 in package.json and package-lock.json
* 🚀 chore: Bump version to 0.0.5 in package.json and package-lock.json
* 🚀 docs: Update comment for balance settings in librechat.example.yaml
* chore: space in `.env.example`
* 🚀 feat: Implement balance configuration loading and refactor related components
* 🚀 test: Refactor tests to use custom config for balance feature
* 🚀 fix: Update balance response handling in Transaction.js to use Balance model
* 🚀 test: Update AppService tests to include balance configuration in mock setup
* 🚀 test: Enhance AppService tests with complete balance configuration scenarios
* 🚀 refactor: Rename balanceConfig to balance and update related tests for clarity
* 🚀 refactor: Remove loadDefaultBalance and update balance handling in AppService
* 🚀 test: Update AppService tests to reflect new balance structure and defaults
* 🚀 test: Mock getCustomConfig in BaseClient tests to control balance configuration
* 🚀 test: Add get method to mockCache in OpenAIClient tests for improved cache handling
* 🚀 test: Mock getCustomConfig in OpenAIClient tests to control balance configuration
* 🚀 test: Remove mock for getCustomConfig in OpenAIClient tests to streamline configuration handling
* 🚀 fix: Update balance configuration reference in config.js for consistency
* refactor: Add getBalanceConfig function to retrieve balance configuration
* chore: Comment out example balance settings in librechat.example.yaml
* refactor: Replace getCustomConfig with getBalanceConfig for balance handling
* fix: tests
* refactor: Replace getBalanceConfig call with balance from request locals
* refactor: Update balance handling to use environment variables for configuration
* refactor: Replace getBalanceConfig calls with balance from request locals
* refactor: Simplify balance configuration logic in getBalanceConfig
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: Implement Redis-based rate limiting, initially import limits
* feat: Enhance rate limiters with Redis support and custom prefixes
* chore: import orders
* chore: update JSDoc for next middleware parameter type in ban and limiter middleware
* feat: add logHeaders middleware to log forwarded headers in requests
* refactor: change log level from info to debug for Redis rate limiters
* feat: increase Redis max listeners and refactor session storage to use Keyv
* feat: Add submit query param to auto submit a prompt passed in via URL
* refactor: add case-insensitive value for auto-submit
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* chore: bump Model Context Protocol SDK dependencies
* fix: correct indentation in MCPConnection class
* refactor: enhance SSE transport with abort controller and add error handling for empty results
* chore: remove outdated Model Context Protocol SDK dependency
* chore: update @modelcontextprotocol/sdk dependency to version 1.7.0
* chore: add debugging comments for PingRequest handling in MCPConnection class
* refactor: update callTool method to accept structured arguments and options
* refactor: simplify maxContextTokens calculation in initializeAgentOptions
* chore: update @babel/runtime dependency to version 7.26.10
* chore: update @librechat/agents dependency to version 2.2.9
* chore: update @librechat/agents dependency to version 2.3.6
* refactor: imports and prevent s3 initialization if strategy not configured
* refactor: mark redis as non-experimental
* refactor: add missing `maxContextTokens` for OpenAI parameters
* refactor: improve log message for Redis initialization
* chore: update @librechat/agents dependency to version 2.3.8
* refactor: extend `streamBuffer` condition to include BEDROCK provider as easily gets throttled by AWS
* refactor: filter out 'think' parts from message content in Anthropic and OpenAI clients
* 🚀 feat: Implement v3 encryption and decryption methods for TOTP secrets
* 🚀 feat: Refactor Two-Factor Authentication methods and enhance 2FA verification process
* 🚀 feat: Update encryption methods to use hex decoding for legacy keys and improve error handling for AES-256-CTR
* 🚀 feat: Update import paths in TwoFactorController for consistency and clarity
* 🚀 feat: Integrate Azure Blob Storage for file handling and image uploads
* 🐼 refactor: Correct module import case for Azure in strategies.js
* 🚀 feat: Add Azure support in SourceIcon component
* 🚀 feat: Enhance Azure Blob Service initialization with Managed Identity support
* 🐼 refactor: Remove unused Azure dependencies from package.json and package-lock.json
* 🐼 refactor: Remove unused Azure dependencies from package.json and package-lock.json
* 🐼 refactor: Remove unused Azure dependencies from package.json and package-lock.json
* 🚀 feat: Add Azure SDK dependencies for identity and storage blob
* 🔧 fix: Reorganize imports in strategies.js for better clarity
* 🔧 fix: Correct comment formatting in strategies.js for consistency
* 🔧 fix: Improve comment formatting in strategies.js for consistency
* fix: prevent crash on duplicate message ID
Added error handling for MongoDB error code 11000 (duplicate key error) in saveMessage function. This prevents the application from crashing when trying to save messages with duplicate IDs, which can happen during aborted requests. Now logs a warning and continues execution safely.
Closes: #5774Closes: #5776
* fix: address ESLint issues in Message.js
---------
Co-authored-by: odrec <odrec@users.noreply.github.com>
* style: Update text file source icon background color for improved visibility in light mode
* style: Update `vectordb` source icon background color for better visibility
* fix: resend files behavior for tool resource message attachments (code interpreter and file search); Rename `getToolFiles` to `getConvoFiles` and simplify file retrieval logic; add `getToolFilesByIds` for fetching tool files by IDs
* French Translation Update
* French Translation Update
* test
* Add fileStrategy S3 Config
* update s3 crud.js
* 🔧 chore: downgrade dotenv to version 16.0.3 and add aws-sdk to package-lock.json
* 🔧 chore: remove aws-sdk from package.json
* 🚀 feat: Integrate AWS SDK for S3 with enhanced upload and retrieval functionalities
* 🚀 feat: Implement S3 integration for file upload and retrieval functionalities
* 🚀 feat: Enhance S3 initialization to support default credentials and improved error handling
---------
Co-authored-by: Gael Martins <gael.martins@acolad.com>
* fix: Enhance MCP initialization to process environment variables
* fix: only build tokenCountMap with messages that are being used in the payload
* fix: Adjust maxContextTokens calculation to account for maxOutputTokens
* refactor: Make processMCPEnv optional in MCPManager initialization
* chore: Bump version of librechat-data-provider to 0.7.73
* wip: first pass, dropdown for selecting sequential agents
* refactor: Improve agent selection logic and enhance performance in SequentialAgents component
* wip: seq. agents working ideas
* wip: sequential agents style change
* refactor: move agent form options/submission outside of AgentConfig
* refactor: prevent repeating code
* refactor: simplify current agent display in SequentialAgents component
* feat: persist form value handling in AgentSelect component for agent_ids
* feat: first pass, sequential agnets agent update
* feat: enhance message display with agent updates and empty text handling
* chore: update Icon component to use EModelEndpoint for agent endpoints
* feat: update content type checks in BaseClient to use constants for better readability
* feat: adjust max context tokens calculation to use 90% of the model's max tokens
* feat: first pass, agent run message pruning
* chore: increase max listeners for abort controller to prevent memory leaks
* feat: enhance runAgent function to include current index count map for improved token tracking
* chore: update @librechat/agents dependency to version 2.2.5
* feat: update icons and style of SequentialAgents component for improved UI consistency
* feat: add AdvancedButton and AdvancedPanel components for enhanced agent settings navigation, update styling for agent form
* chore: adjust minimum height of AdvancedPanel component for better layout consistency
* chore: update @librechat/agents dependency to version 2.2.6
* feat: enhance message formatting by incorporating tool set into agent message processing, in order to allow better mix/matching of agents (as tool calls for tools not found in set will be stringified)
* refactor: reorder components in AgentConfig for improved readability and maintainability
* refactor: enhance layout of AgentUpdate component for improved visual structure
* feat: add DeepSeek provider to Bedrock settings and schemas
* feat: enhance link styling in mobile.css for better visibility and accessibility
* fix: update banner model import in update banner script; export Banner model
* refactor: `duplicateAgentHandler` to include tool_resources only for OCR context files
* feat: add 'qwen-vl' to visionModels for enhanced model support
* fix: change image format from JPEG to PNG in DALLE3 response
* feat: reorganize Advanced components and add localizations
* refactor: simplify JSX structure in AgentChain component to defer container styling to parent
* feat: add FormInput component for reusable input handling
* feat: make agent recursion limit configurable from builder
* feat: add support for agent capabilities chain in AdvancedPanel and update data-provider version
* feat: add maxRecursionLimit configuration for agents and update related documentation
* fix: update CONFIG_VERSION to 1.2.3 in data provider configuration
* feat: replace recursion limit input with MaxAgentSteps component and enhance input handling
* feat: enhance AgentChain component with hover card for additional information and update related labels
* fix: pass request and response objects to `createActionTool` when using assistant actions to prevent auth error
* feat: update AgentChain component layout to include agent count display
* feat: increase default max listeners and implement capability check function for agent chain
* fix: update link styles in mobile.css for better visibility in dark mode
* chore: temp. remove agents package while bumping shared packages
* chore: update @langchain/google-genai package to version 0.1.11
* chore: update @langchain/google-vertexai package to version 0.2.2
* chore: add @librechat/agents package at version 2.2.8
* feat: add deepseek.r1 model with token rate and context values for bedrock
* fix: reorder vision model entries for cheaper models first
* fix: add endpoint property to bedrock client initialization
* fix: exclude unsupported parameters for OpenAI Web Search models
* fix: enhance options to exclude unsupported parameters for Web Search models
* refactor: move `loadAuthValues` to `~/services/Tools/credentials`
* feat: add createAxiosInstance function to configure axios with proxy support
* WIP: First pass mistral ocr
* refactor: replace getConvoFiles with getToolFiles for improved file retrieval logic
* refactor: improve document formatting in encodeAndFormat function
* refactor: remove unused resendFiles parameter from buildOptions function (this option comes from the agent config)
* fix: update getFiles call to include files with `text` property as well
* refactor: move file handling to `initializeAgentOptions`
* refactor: enhance addImageURLs method to handle OCR text and improve message formatting
* refactor: update message formatting to handle OCR text in various content types
* refactor: remove unused resendFiles property from compactAgentsSchema
* fix: add error handling for Mistral OCR document upload and logging
* refactor: integrate OCR capability into file upload options and configuration
* refactor: skip processing for text source files in delete request, as they are directly tied to database
* feat: add metadata field to ExtendedFile type and update PanelColumns and PanelTable components for localization and metadata handling
* fix: source icon styling
* wip: first pass, frontend file context agent resources
* refactor: add hover card with contextual information for File Context (OCR) in FileContext component
* feat: enhance file processing by integrating file retrieval for OCR resources in agent initialization
* feat: implement OCR config; fix: agent resource deletion for ocr files
* feat: enhance agent initialization by adding OCR capability check in resource priming
* ci: fix `~/config` module mock
* ci: add OCR property expectation in AppService tests
* refactor: simplify OCR config loading by removing environment variable extraction, to be done when OCR is actually performed
* ci: add unit test to ensure environment variable references are not parsed in OCR config
* refactor: disable base64 image inclusion in OCR request
* refactor: enhance OCR configuration handling by validating environment variables and providing defaults
* refactor: use file stream from disk for mistral ocr api
* 🌟 feat: Implement Two-Factor Authentication (2FA) functionality
* fix: Two-Factor Authentication Logic and State Management
* 🌟 feat: Add LICENSE file and update package version to 0.0.2 with MIT license
* chore: bump mcp sdk
* feat: Add proxy support for file download and upload in Code Environment CRUD operations
* chore: remove unused files
* chore: change output format from CommonJS to ES module in server rollup config
* chore: update @librechat/agents to version 2.1.9
* feat: xAI standalone provider for agents
* chore: bump librechat-data-provider version to 0.7.6997
* fix: reorder import statements and enhance user listing output
* fix: Update Docker Compose commands to support v2 syntax with fallback
* 🔧 fix: drop `reasoning_effort` for o1-preview/mini models
* chore: requireLocalAuth logging
* fix: edge case artifact message editing logic to handle `new` conversation IDs
* fix: remove `temperature` from model options in OpenAIClient if o1-mini/preview
* fix: update type annotation for fetchPromisesMap to use Promise<string[]> instead of string[]
* feat: anthropic model fetching
* fix: update model name to use EModelEndpoint.openAI in fetchModels and fetchOpenAIModels
* fix: add error handling to modelController for loadModels
* fix: add error handling and logging for model fetching in loadDefaultModels
* ci: update getAnthropicModels tests to be asynchronous
* feat: add user ID to model options in OpenAI and custom endpoint initialization
---------
Co-authored-by: Andrei Berceanu <andreicberceanu@gmail.com>
Co-authored-by: KiGamji <maloyh44@gmail.com>
* feat: Add thinking and thinkingBudget parameters for Bedrock Anthropic models
* chore: Update @librechat/agents to version 2.1.8
* refactor: change region order in params
* refactor: Add maxTokens parameter to conversation preset schema
* refactor: Update agent client to use bedrockInputSchema and improve error handling for model parameters
* refactor: streamline/optimize llmConfig initialization and saving for bedrock
* fix: ensure config titleModel is used for all endpoints
* refactor: enhance OpenAIClient and agent initialization to support endpoint checks for OpenRouter
* chore: bump @google/generative-ai
* 🔧 fix: Log warning for aborted operations in AgentClient
* ci: Remove unused saveMessageToDatabase mock in FakeClient initialization
* ci: test actual implementation of saveMessageToDatabase
* refactor: Change log level from warning to error for aborted operations in AgentClient
* refactor: Add className prop to Image component for customizable styling, use theme selectors
* feat: FLUX Image Generation tool
* refactor: use new image output format for agents using DALL-E tools
* refactor: Enhance image fetching with proxy support and adjust logging placement in DALL-E 3 integration
* refactor: Enhance StableDiffusionAPI to support agent-specific return values and display message for generated images
* refactor: Add unit test execution for librechat-mcp in backend review workflow
* refactor: Update environment variable extraction logic, export from serpate module to avoid circular refs, and remove deprecated tests
* refactor: Add unit tests for environment variable extraction and enhance StdioOptionsSchema to process env variables
* 🔧 refactor: Update settings to use 'as const' for improved type safety and make gpt-4o-mini default model (cheapest)
* 📖 docs: Update README to reflect support for GPT-4.5 in image analysis feature
* 🔧 refactor: Update model handling to use default settings and improve encoding logic
* 🔧 refactor: Enhance model version extraction logic for improved compatibility with future GPT and omni models
* feat: GPT-4.5 tx/token update, vision support
* fix: $ref resolution logic in OpenAPI handling
* feat: add new 'anthropic-beta' header for Claude 3.7 to include token-efficient tools; ref: https://docs.anthropic.com/en/docs/build-with-claude/tool-use/token-efficient-tool-use
* fix: handling of top_k and top_p parameters for Claude-3.7 models (allowed without reasoning)
* feat: bump @librechat/agents for Anthropic Reasoning support
* fix: update reasoning handling for OpenRouter integration
* fix: enhance agent token spending logic to include cache creation and read details
* fix: update logic for thinking status in ContentParts component
* refactor: improve agent title handling
* chore: bump @librechat/agents to version 2.1.7 for parallel tool calling for Google models
* chore: include all assets for service worker, remove unused tsconfig.node.json, eslint ignore vite config
* chore: exclude image files from service worker caching
* refactor: simplify googleSchema transformation and error handling
* fix: max output tokens cap for 3.7 models
* fix: skip index fixing in CI, development, and test environments
* ci: add maxOutputTokens handling tests for Claude models
* refactor: drop top_k and top_p parameters for claude-3.7 in AnthropicClient and add tests for new behavior
* refactor: conditionally include top_k and top_p parameters for non-claude-3.7 models
* ci: add unit tests for getLLMConfig function with various model options
* chore: remove all OPENROUTER_API_KEY legacy logic
* refactor: optimize stream chunk handling
* feat: reset model parameters button
* refactor: remove unused examples field from convoSchema and presetSchema
* chore: update librechat-data-provider version to 0.7.6993
* refactor: move excludedKeys set to data-provider for better reusability
* feat: enhance saveMessageToDatabase to handle unset fields and fetched conversation state
* feat: add 'iconURL' and 'greeting' to excludedKeys in data provider config
* fix: add optional chaining to user ID retrieval in getConvo call
* chore: remove auto-focus for now
* refactor: move react-hook-form Controller Logic to AgentSelect from AgentPanel
* fix: a11y focus issue with AgentSelect by never replacing it in its component tree
* fix: maintain ComboBox focus and force re-render on agent ID change in AgentPanel
* chore: `gemini-2.0-flash-lite-preview-02-05` (deprecated)
* refactor: extract cache control logic and headers configuration to helper functions in AnthropicClient
* feat: anthropic agents prompt caching
* chore: bump @librechat/agents and related dependencies
* fix: typo
* refactor: Export AuthContext from AuthContextProvider
* refactor: Update useHasAccess to utilize useContext for AuthContext
* refactor: Enhance type definitions in useHasAccess for better type safety
* fix: missing console color methods for admin scripts
* feat: Anthropic Claude 3.7 Sonnet Support
* feat: update eventsource to version 3.0.2 and upgrade @modelcontextprotocol/sdk to 1.4.1
* fix: update DynamicInput to handle number type and improve initial value logic
* feat: first pass Anthropic Reasoning (Claude 3.7)
* feat: implement streaming support in AnthropicClient with reasoning UI handling
* feat: add missing xAI (grok) models
* feat: Add 'Run Code' and 'Temporary Chat' permissions to role management
* feat: Add NextFunction typedef to api/typedefs.js
* feat: Add temporary chat and run code permissions to role schema
* refactor: Enhance access check middleware with logging for permission errors and better typing
* refactor: Set default value of USE permission to true in multiConvoPermissionsSchema
* refactor: Implement checkAccess function for separation of permission validation logic from middleware
* feat: Integrate permission checks for tool execution and enhance Markdown code block with execution capability
* fix: Convert REDIS_MAX_LISTENERS to a number, closes#5979
* 🔈 fix: Refactor AudioRecorder to use button element for improved accessibility
* 🔈 fix: Update conversation menu button ID for improved accessibility
* 🔈 fix: Remove redundant role attribute from SidePanel for improved accessibility
* feat: Add robots.txt to manage web crawler access
* feat: Update index.html with meta description and remove legacy file
* fix: resolve merge conflicts.
* fix: resolve merge conflicts.
* fix: resolve merge conflicts.
* feat: Update index.html with meta description and remove legacy file
* 🔧 feat: Add legacy support and improve SidePanel accessibility
* 🔧 feat: Integrate express-static-gzip for improved static file serving and add new plugins for enhanced functionality
* 🔧 chore: Remove unused HTML ESLint plugin configurations and dependencies
---------
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
* fix: Add 192x192 icon to allow the PWA to install on Android devices using Chrome.
* fix: Use less whitespace on icon-192x192.png. Re-generate maskable-icon.png and apple-touch-icon-180x180.png to be higher quality, cripser and use less kilobytes.
The workflow now only runs on pull requests that modify:
- The root `package.json` or `package-lock.json` file
- Any file under the client folder
- Any file under the api folder
* style: Enhance ControlCombobox with Carat Display, ClassName, and Disabled State
* refactor(ModelPanel): replace SelectDropdown with ControlCombobox for improved accessibility
* style: Adjust padding and positioning in ModelPanel for improved layout
* style(ControlCombobox): add containerClassName and iconSide props for enhanced customization
* style(ControlCombobox): add iconClassName prop for customizable icon styling
* refactor(AgentPanel): enhance layout with new button for creating agents and adjust structure for better alignment
* refactor(AgentSelect): replace SelectDropDown with ControlCombobox for improved accessibility and layout
* feat(translation): add new translation key for improved UI clarity
* style(AgentSwitcher, AssistantSwitcher): add iconClassName prop for customizable icon styling
* refactor(AgentPanelSkeleton): improve layout of skeleton components to match new visual structure
* style(AgentPanel, AgentPanelSkeleton): add margin to flex container for improved layout consistency
* a11y(AgentSelect, ControlCombobox): add selectId prop for preventing focus going to start to page after agent selection
* fix(AgentSelect): update SELECT_ID constant for improved clarity in component identification
* fix(GoogleClient): update type annotation, add abort handling for content generation requests, catch "uncaught" abort errors and GoogleGenerativeAI errors from `@google/generative-ai`
* refactor: Improve MeiliSearch integration with environment-based configuration for running index sync
* chore: Remove Question issue template from GitHub repository
* feat: Enable indexing in MeiliSearch configuration and clean up error handling in indexSync
* feat: Update .env.example to include optional indexing configuration
* refactor: rename env var for disabling index sync to MEILI_NO_SYNC
* Added the option to change the default trusted proxy
* feat: Add TRUST_PROXY configuration to .env.example for reverse proxy settings
* feat: Enhance Redis support with cluster configuration and TLS options
* feat(redis): add cluster support, environment config and url mapping
- Add Redis cluster configuration with isEnabled flag
- Configure prefix and max listeners settings
- Improve code formatting and readability
- Fix URL vs host parameter handling
- Update environment variables and regex patterns
---------
Co-authored-by: Gil Assunção <gil.assuncao@parceiros.nos.pt>
Co-authored-by: Pedro Reis <pedro.malheiro@parceiros.nos.pt>
Co-authored-by: João Trigo Soares <joao.soares@parceiros.nos.pt>
* ✨ feat: Enhance UI Components with Shadows and Accessibility Improvements
* 🔧 fix: Correct Category Labels and Values in API Model & Adjust Button Class in Prompt List
* 🔧 refactor: handle full path for code env. file re-upload
* fix: update react-resizable-panels to version 2.1.7 to resolve error thrown on unmount of artifacts; ref: https://github.com/bvaughn/react-resizable-panels/issues/372
* refactor: replace promptPrefix with systemMessage in GoogleClient for improved clarity, and to prevent saving LibreChat feature-specific instructions to the user's custom instructions
* feat: started with automated CHANGELOG.md
* fix: no `configuration.json` found
* refactor: `configuration.json`
* fix: missing label `configuration.json`
* fix: missing label `configuration.json`
* fix: missing label `configuration.json`
* fix: missing label `configuration.json`
* fix: missing label `configuration.json`
* ci: test new workflow action
* ci: test new workflow action
* ci: test new workflow action
* feat: working CHANGELOG.md generation
* feat: working CHANGELOG.md generation
* feat: working CHANGELOG.md generation
* feat: working CHANGELOG.md generation
* feat: working CHANGELOG.md generation
* feat: working CHANGELOG.md generation
* feat: working CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* fix: separate release and Unreleased workflows CHANGELOG.md generation
* refactor: only trigger the `unreleased-changelog` action on push to `main`
and `generate-release-changelog` only when pushing a tag with `v*.*.*`
* refactor: Runs only every Monday at 00:00 UTC
* refactor: Improve error logging for file upload and processing functions to prevent verbosity
* refactor: Add uploads directory to Docker Compose to persist file uploads
* refactor: `addAgentResourceFile` to handle edge case of non-existing `tool_resource` array
* refactor: Remove version specification from deploy-compose.yml
* refactor: Prefix filenames with file_id to ensure uniqueness in file uploads
* refactor: Enhance error handling in deleteVectors to log warnings for non-404 errors
* refactor: Limit file search results to top 5 based on relevance score
* 🌍 i18n: Update translation.json with latest translations
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* 🔒 feat: add Two-Factor Authentication (2FA) with backup codes & QR support (#5684)
* working version for generating TOTP and authenticate.
* better looking UI
* refactored + better TOTP logic
* fixed issue with UI
* fixed issue: remove initial setup when closing window before completion.
* added: onKeyDown for verify and disable
* refactored some code and cleaned it up a bit.
* refactored some code and cleaned it up a bit.
* refactored some code and cleaned it up a bit.
* refactored some code and cleaned it up a bit.
* fixed issue after updating to new main branch
* updated example
* refactored controllers
* removed `passport-totp` not used.
* update the generateBackupCodes function to generate 10 codes by default:
* update the backup codes to an object.
* fixed issue with backup codes not working
* be able to disable 2FA with backup codes.
* removed new env. replaced with JWT_SECRET
* ✨ style: improved a11y and style for TwoFactorAuthentication
* 🔒 fix: small types checks
* ✨ feat: improve 2FA UI components
* fix: remove unnecessary console log
* add option to disable 2FA with backup codes
* - add option to refresh backup codes
- (optional) maybe show the user which backup codes have already been used?
* removed text to be able to merge the main.
* removed eng tx to be able to merge
* fix: migrated lang to new format.
* feat: rewrote whole 2FA UI + refactored 2FA backend
* chore: resolving conflicts
* chore: resolving conflicts
* fix: missing packages, because of resolving conflicts.
* fix: UI issue and improved a11y
* fix: 2FA backup code not working
* fix: update localization keys for UI consistency
* fix: update button label to use localized text
* fix: refactor backup codes regeneration and update localization keys
* fix: remove outdated translation for shared links management
* fix: remove outdated 2FA code prompts from translation.json
* fix: add cursor styles for backup codes item based on usage state
* fix: resolve conflict issue
* fix: resolve conflict issue
* fix: resolve conflict issue
* fix: missing packages in package-lock.json
* fix: add disabled opacity to the verify button in TwoFactorScreen
* ⚙ fix: update 2FA logic to rely on backup codes instead of TOTP status
* ⚙️ fix: Simplify user retrieval in 2FA logic by removing unnecessary TOTP secret query
* ⚙️ test: Add unit tests for TwoFactorAuthController and twoFactorControllers
* ⚙️ fix: Ensure backup codes are validated as an array before usage in 2FA components
* ⚙️ fix: Update module path mappings in tests to use relative paths
* ⚙️ fix: Update moduleNameMapper in jest.config.js to remove the caret from path mapping
* ⚙️ refactor: Simplify import paths in TwoFactorAuthController and twoFactorControllers test files
* ⚙️ test: Mock twoFactorService methods in twoFactorControllers tests
* ⚙️ refactor: Comment out unused imports and mock setups in test files for two-factor authentication
* ⚙️ refactor: removed files
* refactor: Exclude totpSecret from user data retrieval in AuthController, LoginController, and jwtStrategy
* refactor: Consolidate backup code verification to apply DRY and remove default array in user schema
* refactor: Enhance two-factor authentication ux/flow with improved error handling and loading state management, prevent redirect to /login
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: Ensure Axios Errors are less Verbose if No Response
* refactor: Improve error handling in logAxiosError function
* fix: Prevent ModelSelect from rendering for Agent Endpoints
* refactor: Enhance logging functions with type parameter for better clarity
* refactor: Update buildDefaultConvo function to use optional endpoint parameter since we pass a default value for undefined
* refactor: Replace console logs with logger warnings and errors in useNavigateToConvo hook, and handle removed endpoint edge case
* chore: import order
* chore: bump https-proxy-agent and @librechat/agents
* refactor: Improve error logging in OllamaClient for API fetch failures
* feat: Add DeepSeek provider support and enhance provider name handling
* refactor: Use Providers.OLLAMA constant for model name check in fetchModels function
* feat: Enhance formatAgentMessages to handle reasoning content type
* feat: OpenRouter Agent Reasoning
* hard work and dedicationgit add .env.example :)
* fix: Handle Google social login with missing last name
Social login with Google was previously displaying 'undefined' when
a user's last name was empty or not provided.
Changes:
- Conditionally render last name only if it exists
- Prevent displaying 'undefined' when last name is missing
* fix: add missing file endings for developers yml,yaml and log
---------
Co-authored-by: Mohamed Al-Duraji <mbalduraji@college.harvard.edu>
Co-authored-by: Deepak Kendole <deepakdpk101@gmail.com>
Co-authored-by: Peter Rothlaender <peter.rothlaender@ginkgo.com>
* fix: improve file handling by preventing memoization issues, providing config values at run time
* 🌍 i18n: Update translation.json with latest translations
* fix: Missing Translations in Prompt Filters in Prompt Library
* fix: fixed issue with `zh`
feat: added `Estonian` language option
* fix: test for `i18n.ts`
* refactor: `pt` --> `pt-BR` and `pt-PT`
* feat: request access to another language. default is only one language during invite.
Ariakit Combobox was not working well with several virtualization libraries as automated focus management was conflicting with scrolling/styling required of other virtualization methods. The entire strategy was replaced using experimental ariakit virtualization component `SelectRenderer`
Performance of component was also improved as a result of latest ariakit lib changes
* 📦 chore: Update @librechat/agents to version 2.0.5
* fix: Update error handling in AskController and EditController to include overrideParentMessageId when catching errors
* fix: Update parentMessageId assignment in AgentController to prioritize overrideParentMessageId
* 🌍 i18n: Update translation.json with latest translations
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* chore: enforcing language keys to adhere to the new standard.
* chore: enforcing i18n forbids to write plain text in JSX markup
* chore: enforcing i18n forbids to write plain text in JSX markup
* fix: ci with checkbox for unused keys :)
* refactor: removed all the unused `i18n` keys
* refactor: remove artifacts toggle
* refactor: allow hiding side panel while allowing artifacts view
* chore: rename SidePanelGroup to SidePanel for clarity
* Revert "refactor: remove artifacts toggle"
This reverts commit f884c2cfcd.
* feat: add artifacts capability to agent configuration
* refactor: conditionally set artifacts mode based on endpoint type
* feat: Artifacts Capability for Agents
* refactor: enhance getStreamText method to handle intermediate replies and add `stream_options` for openai/azure
* feat: localize progress text and improve UX in CodeAnalyze and ExecuteCode components for expanding analysis
* chore: started with updating packages to new version.
(a lot are outdated)
* fix: eslint to pass when no matching files changed.
* fix: eslint to pass when no matching files changed.
* fix: issue with strict in actions with the test
* chore: update more dependencies
* feat: scan for unused imported packages
* feat: scan for unused imported packages
* feat: scan for unused imported packages
* feat: scan for unused imported packages
* feat: scan for unused imported packages
* feat: scan for unused imported packages
* feat: scan for unused imported packages
* chore: removed Unused NPM Packages
* chore: removed Unused NPM Packages in `client/package.json`
* chore: removed Unused NPM Packages in `client/package.json`
* chore: Only comments when there are actual unused dependencies.
* chore: Only comments when there are actual unused dependencies.
* ci: test if it detects unused packages.
* ci: removed unused packages.
* ci: both static and dynamic i18n keys
* ci: revert back to no dynamic. use official nesting
* chore: remove override package: ajv
* feat: manage an 'x-strict': true attribute in openapi specs for assistants which generates function calls with stric attribute
* fix typo and lint errors
---------
Co-authored-by: Olivier Schiavo <olivier.schiavo@wengo.com>
* created: checks for unused i18n keys in codebase.
* updated the file to test this new check on this PR.
* updated the file to test this new check on this PR.
* updated the file to test this new check on this PR.
* updated the file to test this new check on this PR.
* updated the file to test this new check on this PR.
* removed the testing option. will now only run in `client/src/**`
* ✨feat: OAuth for Actions
* WIP: PoC flow state manager
* refactor: Add identifier field to token model from action schema
* chore: fix potential file type issues
* ci: fix type issue with action metadata auth
* fix: ensure FlowManagerOptions has a default ttl value
* WIP: OAUTH actions
* WIP: first pass OAuth Action
* fix: standardize identifier usage in OAuth flow handling
* fix: update token retrieval to include userId in query and use correct identifier
* refacotr: update token retrieval to use userId for OAuth token query
* feat: Tool Call Auth styling
* fix: streamline token creation and add type field to token schema
* refactor: cleanup OAuth flow by encrypting client credentials and ensuring oauth operations only run under condition
* refactor: use encrypted credentials in OAuth callback
* fix: update Token collection indexes to use expiresAt TTL index and not createdAt legacy index
* refactor: enhance Token index cleanup by improving logging and removing redundant index creation logic
* refactor: remove unused OAuth login route and related logic for improved clarity
* refactor: replace fetch with axios for OAuth token exchange and improve error handling
* refactor: better UX after authentication before oauth tool execution
* refactor: implement cleanup handlers for FlowStateManager intervals to enhance resource management
* refactor: encrypt OAuth tokens before storing and decrypt upon retrieval for enhanced security
* refactor: enhance authentication success page with improved styling and countdown feature
* refactor: add response_type parameter to OAuth redirect URI for improved compatibility
* chore: update translation.json new localizations
* chore: remove unused OGDialog import from OGDialogTemplate component
* refactor: Actions Auth using new Dialog styling, use same component with Agents/Assistants
* refactor: update removeNullishValues function to support removal of empty strings and adjust transform usage in schemas
* chore: bump version of librechat-data-provider to 0.7.6991
* refactor: integrate removeNullishValues function to clean metadata before encryption in agent and assistant routes
* refactor: update OAuth input fields to use 'password' type for better security
* refactor: update localization placeholders for sign-in message to use double curly braces
* refactor: add access_type parameter for offline access in createActionTool function
* refactor: implement handleOAuthToken function for token management and encryption
* feat: refresh token support
* refactor: add default expiration for access token and error handling for missing token
* feat: localizations for ActionAuth
* refactor: set refresh token expiration to null to not expire if expiry never given
* fix: prevent crash fromerror within async handleAbortError in AskController, EditController, and AgentController
* feat: Action Callback URL
* 🌍 i18n: Update translation.json with latest translations
* refactor: handle errors in flow state checking to prevent unhandled promise rejections
* fix: improve flow state concurrency to prevent multiple token creation calls
* refactor: RequestExecutor to use separate axios instance
* refactor: improve concurrency flows by keeping completed state until TTL expiry
* refactor: increase TTL for flow state management and adjust monitoring interval
* ci: mock axios instance creation in actions spec
* feat: add Babel and Jest configuration files; implement FlowStateManager tests with concurrency handling
* chore: add disableOAuth prop to ActionsAuth (not implemented for Assistants yet)
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix: ci for locize-pull-published-sync-pr.yml
* fix: ci for locize-pull-published-sync-pr.yml
* fixed missing parameter: base: main
* removed running on pull_request
* chore: migrated eslint v8 to v9
* chore: migrated eslint v8 to v9
* ESLint only checks the files that have changed in the pull request.
* fix: ESLint only checks the files that have changed in the pull request.
* refactor: eslint only on changed files
* refactor: eslint only on changed files or added files
* refactor: eslint only on changed files or added files
* refactor: eslint only on changed files or added files
but only include files that are not deleted (ACMRTUXB: A, C, M, R, T, U, X, B).
* whoops missed something
* better i18n support an internationalization-framework.
* removed unused package
* auto sort for translation.json
* fixed tests with the new locales function
* added new CI actions from locize
* to use locize a mention in the README.md
* to use locize a mention in the README.md
* updated README.md and added TRANSLATION.md to the repo
* updated TRANSLATION.md badges
* updated README.md to go to the TRANSLATION.md when clicking on the Translation Progress badge
* updated TRANSLATION.md and added a new issue template.
* updated TRANSLATION.md and added a new issue template.
* updated issue template to add the iso code link.
* updated the new GitHub actions for `locize`
* updated label for new issue template --> i18n
* fixed type issue
* Fix eslint
* Fix eslint with key-spacing spacing
* fix: error type
* fix: handle undefined values in SortFilterHeader component
* fix: typing in Image component
* fix: handle optional promptGroup in PromptCard component
* fix: update localize function to accept string type and remove unnecessary JSX element
* fix: update localize function to enforce TranslationKeys type for better type safety
* fix: improve type safety and handle null values in Assistants component
* fix: enhance null checks for fileId in FilesListView component
* fix: localize 'Go back' button text in FilesListView component
* fix: update aria-label for menu buttons and add translation for 'Close Menu'
* docs: add Reasoning UI section for Chain-of-Thought AI models in README
* fix: enhance type safety by adding type for message in MultiMessage component
* fix: improve null checks and optional chaining in useAutoSave hook
* fix: improve handling of optional properties in cleanupPreset function
* fix: ensure isFetchingNextPage defaults to false and improve null checks for messages in Search component
* fix: enhance type safety and null checks in useBuildMessageTree hook
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 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>
* 🤖 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
* 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
* 🚀 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>
* 🔧 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
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.
* 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
* 🐛 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
* 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>
* 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
* 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>
* 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
* ✨ 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>
* 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>
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
* 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
* fix: google-thinking model safety settings fix
* chore: update pricing/context for deepseek models
* ci: update Deepseek model token limits to use dynamic mapping
* 🔄 refactor: frontend and backend share link logic; feat: qrcode for share link; feat: refresh link
* 🐛 fix: Conditionally render shared link and refactor share link creation logic
* 🐛 fix: Correct conditional check for shareId in ShareButton component
* 🔄 refactor: Update shared links API and data handling; improve query parameters and response structure
* 🔄 refactor: Update shared links pagination and response structure; replace pageNumber with cursor for improved data fetching
* 🔄 refactor: DataTable performance optimization
* fix: delete shared link cache update
* 🔄 refactor: Enhance shared links functionality; add conversationId to shared link model and update related components
* 🔄 refactor: Add delete functionality to SharedLinkButton; integrate delete mutation and confirmation dialog
* 🔄 feat: Add AnimatedSearchInput component with gradient animations and search functionality; update search handling in API and localization
* 🔄 refactor: Improve SharedLinks component; enhance delete functionality and loading states, optimize AnimatedSearchInput, and refine DataTable scrolling behavior
* fix: mutation type issues with deleted shared link mutation
* fix: MutationOptions types
* fix: Ensure only public shared links are retrieved in getSharedLink function
* fix: `qrcode.react` install location
* fix: ensure non-public shared links are not fetched when checking for existing shared links, and remove deprecated .exec() method for queries
* fix: types and import order
* refactor: cleanup share button UI logic, make more intuitive
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🔧 refactor: Remove unused penalties and enhance reasoning token handling in OpenAIClient
* 🔧 refactor: `addInstructions` default to adding instructions at index 0, flag for legacy behavior
* chore: remove long placeholder
* chore: update localization strings across multiple languages
* ci: adjust tests for new `addInstructions` behavior
Fixes#5310
Add `aria-label="previous"` attribute to the 'Prev' button in the Prompts Panel.
* Modify `client/src/components/Chat/Prompts.tsx` to include `aria-label="previous"` attribute for the button.
* fix: remove local state from Dropdown causing de-sync
* refactor: cleanup STT code, avoid redundant states to prevent de-sync and side effects
* fix: reset transcript after sending final text to prevent data loss
* fix: clear timeout on component unmount to prevent memory leaks
* refactor: SearchBar and Nav components to streamline search functionality and improve state management
* refactor: remove refresh conversations
* chore: update useNewConvo calls to remove hardcoded default index
* refactor: null check for submission in useSSE hook
* refactor: remove useConversation hook and update useSearch to utilize useNewConvo
* refactor: remove conversation and banner store files; consolidate state management into misc; improve typing of families and add messagesSiblingIdxFamily
* refactor: more effectively clear all user/convo state without side effects on logout/delete user
* refactor: replace useParams with useLocation in SearchBar to correctly load conversation
* refactor: update SearchButtons to use button element and improve conversation ID handling
* refactor: use named function for `newConversation` for better call stack tracing
* refactor: enhance TermsAndConditionsModal to support array content and improve type definitions for terms of service
* refactor: add SetConvoProvider and message invalidation when navigating from search results to prevent initial route rendering edge cases
* refactor: rename getLocalStorageItems to localStorage and update imports for consistency
* refactor: move clearLocalStorage function to utils and simplify localStorage clearing logic
* refactor: migrate authentication mutations to a dedicated Auth data provider and update related tests
* ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️
* chore: linting
* chore: move test files
* fix: tool icon, allow user-provided keys, conform to app key assignment pattern
* chore: linting not included in #5212
---------
Co-authored-by: Jonathan Addington <jonathan.addington@jmaddington.com>
* fix: Include iconURL in Bedrock client initialization
* fix: unnecessary filtering for agent file_search files
* chore: use theme bg colors
* refactor: rely on endpoint config for enabling builder links in side navigation instead of parameters
* fix: remove unnecessary keyProvided check for agent builder link
The `express-session` library comes with a session storage meant for
testing by default. That is why you get a message like this when you
start up LibreChat with OIDC enabled:
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
LibreChat can already use Redis as a session storage, although Redis support
is still marked as experimental. It also makes the set-up more complex, since
you will need to configure and run yet another service.
This pull request provides a simple alternative by using a in-memory session
store marked as a production-ready alternative by the guys from
`express-session`¹. You can still configure Redis, but this provides a simple,
good default for everyone else.
See also https://github.com/danny-avila/LibreChat/discussions/1014
¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
* 🐛 fix: default modelSpecs not being set
* feat: Add imageDetail parameter for OpenAI endpoints in tQueryParamsSchema
* feat: Implement processModelSpecs function to enhance model specs processing from configuration
* feat: Refactor configuration schemas and types for improved structure and clarity
* feat: Add append_current_datetime parameter to tQueryParamsSchema for enhanced endpoint functionality
* fix: Add endpointType to getSaveOptions and enhance endpoint handling in Settings component
* fix: Change endpointType to be nullable and optional in tConversationSchema for improved flexibility
* fix: allow save & submit for google endpoint
* fix: agent modelSpec iconURLs not being recorded
* fix: prioritize message properties over conversation defaults in icon data
* fix: determine endpoint type from endpointsConfig
* chore: type issue with setting.columnSpan
* chore: remove redundant key indexing for keySchema
* chore: bump version to 0.7.691 in package.json
* chore: add stricter remark-gfm and mdast-util-gfm resolutions/overrides
* chore: remove rollup override and bump vite-plugin-pwa
* chore: reinstall remark-gfm for correct module resolution
* chore: reinstall vite-plugun-pwa
* fix: rendering error for mermaid flowchart syntax
* feat: add submit button ref and enable submit on Ctrl+Enter in EditMessage component
* feat: add save button and keyboard shortcuts for saving and canceling in EditMessage component
* feat: collapse chat on max height
* refactor: implement scrollable detection for textarea on key down events and initial render
* feat: add regenerate button for error handling in HoverButtons, closes#3658
* feat: add functionality to edit latest user message with the up arrow key when the input is empty
* chore: bump @librechat/agents to v1.9.8 for rscript support
* chore: fix @langchain/google-genai dep., match agents
* chore: fix @langchain/google-vertexai to v0.1.5, match with agents
* chore: bump @librechat/agents to v1.9.9
* chore: update @librechat/agents to v1.9.91 and @langchain/google-vertexai to v0.1.6
* chore: increase MAX_FILE_SIZE to 150MB for file uploads
* chore: bump @librechat/agents to v1.9.92
* feat: support `recursionLimit` for agents
* chore: update configuration version to 1.2.1 in librechat.yaml and config.ts
* feat: add R language SVG icon to the assets and include it in ApiKeyDialog
* feat: add support for new vision model 'o1' and exclude 'o1-mini'
* 🎨 feat: improve file display and overflow handling in SidePanel components
* 🎨 feat: enhance bookmarks management UI and improve accessibility features
* 🎨 feat: enhance BookmarkTable and BookmarkTableRow components for improved layout and performance
* 🎨 feat: enhance file display and interaction in FilesView and ImagePreview components
* 🎨 feat: adjust minimum width for filename filter input in DataTable component
* 🎨 feat: enhance file upload UI with improved layout and styling adjustments
* 🎨 feat: add surface-hover-alt color and update FileContainer styling for improved UI
* 🎨 feat: update ImagePreview component styling for improved visual consistency
* 🎨 feat: add MaximizeChatSpace component and integrate chat space maximization feature
* 🎨 feat: enhance DataTable component with transition effects and update Checkbox styling for improved accessibility
* fix: enhance a11y for Bookmark buttons by adding space key support, ARIA labels, and correct html role for key presses
* fix: return focus back to trigger for BookmarkEditDialog (Edit and new bookmark buttons)
* refactor: ShareButton and ExportModal components children prop support; refactor DropdownPopup item handling
* refactor: enhance ExportAndShareMenu and ShareButton components with improved props handling and accessibility features
* refactor: add ref prop support to MenuItemProps and update ExportAndShareMenu and DropdownPopup components so focus correctly returns to menu item
* refactor: enhance ConvoOptions and DeleteButton components with improved props handling and accessibility features
* refactor: add triggerRef support to DeleteButton and update ConvoOptions for improved dialog handling
* refactor: accessible bookmarks menu
* refactor: improve styling and accessibility for bookmarks components
* refactor: add focusLoop support to DropdownPopup and update BookmarkMenu with Tooltip
* refactor: integrate TooltipAnchor into ExportAndShareMenu for enhanced accessibility
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
This commit updates the cache stores in the `getLogStores.js` file to use Redis as the store if the `USE_REDIS` environment variable is enabled. It also adds a new environment variable `DEBUG_MEMORY_CACHE` to enable debugging of the memory cache.
* feat: Refactor ModelEndHandler to collect usage metadata only if it exists
* feat: google tool end handling, custom anthropic class for better token ux
* refactor: differentiate between client <> request options
* feat: initial support for google agents
* feat: only cache messages with non-empty text
* feat: Cache non-empty messages in chatV2 controller
* fix: anthropic llm client options llmConfig
* refactor: streamline client options handling in LLM configuration
* fix: VertexAI Agent Auth & Tool Handling
* fix: additional fields for llmConfig, however customHeaders are not supported by langchain, requires PR
* feat: set default location for vertexai LLM configuration
* fix: outdated OpenAI Client options for getLLMConfig
* chore: agent provider options typing
* chore: add note about currently unsupported customHeaders in langchain GenAI client
* fix: skip transaction creation when rawAmount is NaN
* fix: prevent mobile nav toggle from being focusable when not in mobile view, add types to <NavToggle/>
* fix: appropriate endpoint menu item role, add up/down focus mgmt, ensure set api key is focusable and accessible
* fix: localize link titles and update text color for improved accessibility in Nav component
* 🔒 fix: update refresh token handling to use plain token instead of hashed token
* 🔒 fix: simplify logoutUser by using plain refresh token for session lookup
* ✨ feat: Implement session management with CRUD operations and integrate into user workflows
* ✨ refactor: Update session model import paths and enhance session creation logic in AuthService
* ✨ refactor: Validate session and user ID formats in session management functions
* ✨ style: Enhance UI components with improved styling and accessibility features
* chore: Update login form tests to use getByTestId instead of getByRole, remove console.log()
* chore: Update login form tests to use getByTestId instead of getByRole
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* docs: Update README to include Model Context Protocol support and enhance access descriptions
* fix: Update civic integrity threshold to use 'BLOCK_NONE' as default
* fix: Update GOOGLE_MODELS in .env.example and adjust civic integrity threshold for new model compatibility
* ✨ v0.7.6
* feat: Add 'gemini-2.0-flash-thinking-exp' model to googleModels context windows
* 📝 chore: Add comment to clarify purpose of check_updates.sh script
* feat: mcp package
* feat: add librechat-mcp package and update dependencies
* feat: refactor MCPConnectionSingleton to handle transport initialization and connection management
* feat: change private methods to public in MCPConnectionSingleton for improved accessibility
* feat: filesystem demo
* chore: everything demo and move everything under mcp workspace
* chore: move ts-node to mcp workspace
* feat: mcp examples
* feat: working sse MCP example
* refactor: rename MCPConnectionSingleton to MCPConnection for clarity
* refactor: replace MCPConnectionSingleton with MCPConnection for consistency
* refactor: manager/connections
* refactor: update MCPConnection to use type definitions from mcp types
* refactor: update MCPManager to use winston logger and enhance server initialization
* refactor: share logger between connections and manager
* refactor: add schema definitions and update MCPManager to accept logger parameter
* feat: map available MCP tools
* feat: load manifest tools
* feat: add MCP tools delimiter constant and update plugin key generation
* feat: call MCP tools
* feat: update librechat-data-provider version to 0.7.63 and enhance StdioOptionsSchema with additional properties
* refactor: simplify typing
* chore: update types/packages
* feat: MCP Tool Content parsing
* chore: update dependencies and improve package configurations
* feat: add 'mcp' directory to package and update configurations
* refactor: return CONTENT_AND_ARTIFACT format for MCP callTool
* chore: bump @librechat/agents
* WIP: MCP artifacts
* chore: bump @librechat/agents to v1.8.7
* fix: ensure filename has extension when saving base64 image
* fix: move base64 buffer conversion before filename extension check
* chore: update backend review workflow to install MCP package
* fix: use correct `mime` method
* fix: enhance file metadata with message and tool call IDs in image saving process
* fix: refactor ToolCall component to handle MCP tool calls and improve domain extraction
* fix: update ToolItem component for default isInstalled value and improve localization in ToolSelectDialog
* fix: update ToolItem component to use consistent text color for tool description
* style: add theming to ToolSelectDialog
* fix: improve domain extraction logic in ToolCall component
* refactor: conversation item theming, fix rename UI bug, optimize props, add missing types
* feat: enhance MCP options schema with base options (iconPath to start) and make transport type optional, infer based on other option fields
* fix: improve reconnection logic with parallel init and exponential backoff and enhance transport debug logging
* refactor: improve logging format
* refactor: improve logging of available tools by displaying tool names
* refactor: improve reconnection/connection logic
* feat: add MCP package build process to Dockerfile
* feat: add fallback icon for tools without an image in ToolItem component
* feat: Assistants Support for MCP Tools
* fix(build): configure rollup to use output.dir for dynamic imports
* chore: update @librechat/agents to version 1.8.8 and add @langchain/anthropic dependency
* fix: update CONFIG_VERSION to 1.2.0
* 🔃 fix: Safeguard against null token in SSE refresh token handling
* 🔃 fix: Update import path for AnnounceOptions in LiveAnnouncer component
* 🔃 a11y: Add aria-live attribute for accessibility in error messages
* fix: prevent double screen reader notification for toast
* 🔃 a11y: Enhance accessibility for main menus and buttons with ARIA roles and labels
* refactor: better alt text for logo on login page #4095
* refactor: remove unused import for DropdownNoState in Voices component
* fix: Focus management issue in the Export Options Modal #4100
* Feature: Added ability to send current date and time to v1 and v2 assistants
* remove date_feature.patch
* fix: rename append_today_date to append_current_datetime
* feat: Refactor time handling in chatV1 and chatV2, add date and time utility functions
* fix: Add warning log and response for missing run values in abortRun middleware
---------
Co-authored-by: Max Sanna <max@maxsanna.com>
* style: update AdminSettings dialog content styles for improved accessibility/theming
* style: update icon colors in ExportAndShareMenu for improved theming
* feat: enhance DropdownPopup component with additional props for customization
* feat: add role selection dropdown to AdminSettings for enhanced user permissions management
* feat: add role selection dropdown to AdminSettings for Prompt permission management
* style: add gap to button in AdminSettings for improved layout
* feat: add warning message for Admin role access in Permissions settings
* 📑 docs: update README.md to enhance feature descriptions and organization
* 📑 docs: Revise README.md for improved feature clarity and organization
* 📑 docs: Update README.md for improved clarity and organization of AI provider compatibility
* 📑 docs: Update AI Model Selection section in README.md for improved clarity and consistency
* 📑 docs: Update README.md to include Email Login support in Multi-User Authentication section
* fix: double decoding of URL params
* fix: prevent streaming options for O1 model (azure)
* fix: update @langchain/openai to version 0.3.14 in package-lock.json
* chore(AuthContext): typing
* chore(useTimeout): typing
* fix: shared link redirecting to login when code block includes "Run Code" button
* fix: typing
* feat: Code Interpreter API & File Search Agent Uploads
chore: add back code files
wip: first pass, abstract key dialog
refactor: influence checkbox on key changes
refactor: update localization keys for 'execute code' to 'run code'
wip: run code button
refactor: add throwError parameter to loadAuthValues and getUserPluginAuthValue functions
feat: first pass, API tool calling
fix: handle missing toolId in callTool function and return 404 for non-existent tools
feat: show code outputs
fix: improve error handling in callTool function and log errors
fix: handle potential null value for filepath in attachment destructuring
fix: normalize language before rendering and prevent null return
fix: add loading indicator in RunCode component while executing code
feat: add support for conditional code execution in Markdown components
feat: attachments
refactor: remove bash
fix: pass abort signal to graph/run
refactor: debounce and rate limit tool call
refactor: increase debounce delay for execute function
feat: set code output attachments
feat: image attachments
refactor: apply message context
refactor: pass `partIndex`
feat: toolCall schema/model/methods
feat: block indexing
feat: get tool calls
chore: imports
chore: typing
chore: condense type imports
feat: get tool calls
fix: block indexing
chore: typing
refactor: update tool calls mapping to support multiple results
fix: add unique key to nav link for rendering
wip: first pass, tool call results
refactor: update query cache from successful tool call mutation
style: improve result switcher styling
chore: note on using \`.toObject()\`
feat: add agent_id field to conversation schema
chore: typing
refactor: rename agentMap to agentsMap for consistency
feat: Agent Name as chat input placeholder
chore: bump agents
📦 chore: update @langchain dependencies to latest versions to match agents package
📦 chore: update @librechat/agents dependency to version 1.8.0
fix: Aborting agent stream removes sender; fix(bedrock): completion removes preset name label
refactor: remove direct file parameter to use req.file, add `processAgentFileUpload` for image uploads
feat: upload menu
feat: prime message_file resources
feat: implement conversation access validation in chat route
refactor: remove file parameter from processFileUpload and use req.file instead
feat: add savedMessageIds set to track saved message IDs in BaseClient, to prevent unnecessary double-write to db
feat: prevent duplicate message saves by checking savedMessageIds in AgentController
refactor: skip legacy RAG API handling for agents
feat: add files field to convoSchema
refactor: update request type annotations from Express.Request to ServerRequest in file processing functions
feat: track conversation files
fix: resendFiles, addPreviousAttachments handling
feat: add ID validation for session_id and file_id in download route
feat: entity_id for code file uploads/downloads
fix: code file edge cases
feat: delete related tool calls
feat: add stream rate handling for LLM configuration
feat: enhance system content with attached file information
fix: improve error logging in resource priming function
* WIP: PoC, sequential agents
WIP: PoC Sequential Agents, first pass content data + bump agents package
fix: package-lock
WIP: PoC, o1 support, refactor bufferString
feat: convertJsonSchemaToZod
fix: form issues and schema defining erroneous model
fix: max length issue on agent form instructions, limit conversation messages to sequential agents
feat: add abort signal support to createRun function and AgentClient
feat: PoC, hide prior sequential agent steps
fix: update parameter naming from config to metadata in event handlers for clarity, add model to usage data
refactor: use only last contentData, track model for usage data
chore: bump agents package
fix: content parts issue
refactor: filter contentParts to include tool calls and relevant indices
feat: show function calls
refactor: filter context messages to exclude tool calls when no tools are available to the agent
fix: ensure tool call content is not undefined in formatMessages
feat: add agent_id field to conversationPreset schema
feat: hide sequential agents
feat: increase upload toast duration to 10 seconds
* refactor: tool context handling & update Code API Key Dialog
feat: toolContextMap
chore: skipSpecs -> useSpecs
ci: fix handleTools tests
feat: API Key Dialog
* feat: Agent Permissions Admin Controls
feat: replace label with button for prompt permission toggle
feat: update agent permissions
feat: enable experimental agents and streamline capability configuration
feat: implement access control for agents and enhance endpoint menu items
feat: add welcome message for agent selection in localization
feat: add agents permission to access control and update version to 0.7.57
* fix: update types in useAssistantListMap and useMentions hooks for better null handling
* feat: mention agents
* fix: agent tool resource race conditions when deleting agent tool resource files
* feat: add error handling for code execution with user feedback
* refactor: rename AdminControls to AdminSettings for clarity
* style: add gap to button in AdminSettings for improved layout
* refactor: separate agent query hooks and check access to enable fetching
* fix: remove unused provider from agent initialization options, creates issue with custom endpoints
* refactor: remove redundant/deprecated modelOptions from AgentClient processes
* chore: update @librechat/agents to version 1.8.5 in package.json and package-lock.json
* fix: minor styling issues + agent panel uniformity
* fix: agent edge cases when set endpoint is no longer defined
* refactor: remove unused cleanup function call from AppService
* fix: update link in ApiKeyDialog to point to pricing page
* fix: improve type handling and layout calculations in SidePanel component
* fix: add missing localization string for agent selection in SidePanel
* chore: form styling and localizations for upload filesearch/code interpreter
* fix: model selection placeholder logic in AgentConfig component
* style: agent capabilities
* fix: add localization for provider selection and improve dropdown styling in ModelPanel
* refactor: use gpt-4o-mini > gpt-3.5-turbo
* fix: agents configuration for loadDefaultInterface and update related tests
* feat: DALLE Agents support
* fix: azure validation/extraction types
* fix: typing, add optional chaining for modelGroup and groupMap properties; expect azureOpenAIApiVersion in serverless tests
* fix: add support for azureOpenAIApiVersion and api-key in serverless mode across clients
* chore: update CONFIG_VERSION to 1.1.8, data-provider bump
* Update librechat.example.yaml with Portkey AI example
* Update librechat.example.yaml
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* 🔧 refactor: replace doubleClickHandler with onDoubleClick in slider components
* 🔧 refactor: consolidate DynamicInput and DynamicInputNumber components into a single DynamicInput component; fix: UI crashing when typing a character instead of number in max context/output tokens
* 🔧 style: update component styles to use bg-surface-secondary and bg-surface-tertiary for improved UI consistency
* automatically add start balance
https://github.com/danny-avila/LibreChat/issues/2687
* chore: imports order in userMethods.js
* Information about START_BALANCE has been added
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: sanitize filename in multer storage callback
* fix: ensure temporary image upload file is deleted after processing
* fix: prevent cleanup flag from being set to false before actually deleted
* refactor: user avatar, typing, use 'file' for formData instead of 'input', add disk storage, use localization
* fix: update Avatar component to include image dimensions in formData and refactor editor reference type
* fix: refactor avatar upload handling to use fs for file reading and enhance file validation
* fix: ensure temporary image upload file is deleted after processing
* fix: refactor avatar upload routes and handlers for agents and assistants, improve file handling and validation
* fix: improve audio file validation and cleanup
* fix: add filename sanitization utility and integrate it into multer storage configuration
* fix: update group project ID check for null and refactor delete prompt group response type
* fix: invalid access control for deleting prompt groups
* fix: add error handling and logging to checkBan middleware
* fix: catch conversation parsing errors
* chore: revert unnecessary height and width parameters from avatar upload
* chore: update librechat-data-provider version to 0.7.55
* style: ensure KaTeX can spread across visible space
* chore: typing
* refactor: create file filter from custom fileConfig, if provided
* refactor: use logger utility to avoid overly verbose axios error logs when using RAG_API
* fix(useFileHandling): use memoization/callbacks to make sure the appropriate fileConfig is used; refactor: move endpoint to first field applied to formdata
* chore: update librechat-data-provider version to 0.7.54
* chore: revert type change
* fix: bedrock tool name regex
* fix: pass args as single input, attempt json first.
* refactor: remove toolMap from agent tool load as is not used
* fix: update formatAgentMessages test to use strictEqual for args comparison, testing new behavior
* feat: Known Endpoint, xAI
* chore: update librechat-data-provider version to 0.7.53
* ci: name property removal
* feat: add XAI_API_KEY to example environment variables
* chore: actions typing
* fix(actions): implement request executor pattern to prevent concurrent execution issues
BREAKING CHANGE: ActionRequest now uses a RequestExecutor pattern for isolated request state
- Introduce RequestConfig class to store immutable configuration
- Add RequestExecutor class to handle isolated request state for each execution
- Modify ActionRequest to act as a facade creating new executors for each operation
- Maintain backward compatibility through delegation and getters
- Add TypeScript types for better type safety
- Fix race conditions in concurrent executions with auth and params
This change prevents state mutation issues when the same action is called
multiple times concurrently, particularly when using authentication. Each
request now gets its own isolated state through a new executor instance,
solving race conditions while maintaining the existing API interface.
* ci: test isolation/immutatability
* chore: Update version to 0.7.51 in data-provider package
* refactor(actions): refactor createActionTool to use request executor pattern
- added aria-expanded attribute to indicate the panel's expanded/collapsed state
- added aria-controls attribute to specify the element controlled by the button
- updated aria-label using the localize function for better description
* refactor: move o1 model check, after vision request check
* feat(server): add configurable cache headers for index.html
• Add environment variables to control index.html cache headers
• Default to no-cache configuration for consistent app updates
• Document cache control options in .env.example
* oidc-changes Initial attempt at testing openidStrategy and adding OPENID_USERNAME_CLAIM setting
* oidc-changes Add OPENID_NAME_CLAIM
* oidc-changes cleanup oidc test code
* oidc-changes using mongo memory server for test
* oidc-changes Change tests to expect username all lowercase
* oidc-changes Add more tests
* chore: linting
* refactor: Simplify OpenID full name retrieval logic
* refactor: Simplify OpenID user info retrieval logic
* refactor: move helper to openidStrategy.js
---------
Co-authored-by: alihacks <alihacks@pm.me>
* fix: ReDoS in ChatGPT Import
* ci: should correctly process citations from real ChatGPT data
* ci: Add ReDoS vulnerability test for processAssistantMessage
* refactor: Update thread management and citation handling
* refactor(validateImageRequest): robust validation
* refactor(Prompt.js): update name search regex to escape special characters
* refactor(Preset): exclude user from preset update to prevent mass assignment
* refactor(files.js): Improve file deletion process
* ci: updated validateImageRequest.spec.js
* a11y: plugin pagination
* refactor(CreatePromptForm.tsx): Improve input field styling
* chore(Prompts): typing and accessibility
* fix: prompt creation access role check
* chore: remove duplicate jsdocs
* chore: remove comparisons
* feat: use prompt caching for translations
* chore: wip translation readme
* i18n: korean translations
* refactor: use promises for faster translation processing
* refactor: update translation model to 'claude-3-5-sonnet-20241022'
* refactor: optimize sleep duration for translation processing
* i18n: add missing keys
* refactor: standardize languages in their own respective languages
* Refactor translation instructions in README.md
* 🔘 a11y: Improve Contrast of Switch/Toggles to WCAG Standard
* refactor: Improve file attachment accessibility in Chat Input component
* refactor: clear input ref value before clicks
The changes include:
- In the agent controller:
- Removed the parsing of the avatar metadata from the request body.
- Fetched the avatar data from the agent object using the agent ID.
- Updated the error logging when fetching the agent.
- Updated the deleteFileByFilter function to include the user ID when deleting the old avatar file.
- In the assistant controller:
- Removed the parsing of the metadata from the request body.
- Fetched the metadata from the assistant object using the assistant ID.
- Updated the error logging when fetching the assistant.
- Updated the deleteFileByFilter function to include the user ID when deleting the old avatar file.
* fix(Agents): remove test code in openAI/llm.js
* refactor: add use of enums in encodeAndFormat
* fix: image attachment payload formatting for agents
* chore: imports
* feat: Refactor ChatForm and StopButton components for improved styling and localization
* feat: Refactor AudioRecorder, ChatForm, AttachFile, and SendButton components for improved styling and layout
* feat: Add RevokeAllKeys component and update styling for buttons and inputs
* feat: Refactor ClearChats component and update ClearConvos functionality for improved clarity and user experience
* feat: Remove ClearConvos component and update related imports and functionality in Avatar and DeleteCacheButton components
* feat: Rename DeleteCacheButton to DeleteCache and update related imports; enhance confirmation message in localization
* feat: Update ChatForm layout for RTL support and improve component structure
* feat: Adjust ChatForm layout for improved RTL support and alignment
* feat: Refactor Bookmark components to use new UI elements and improve styling
* feat: Update FileSearch and ShareAgent components for improved button styling and layout
* feat: Update ChatForm and TextareaHeader styles for improved UI consistency
* feat: Refactor Nav components for improved styling and layout adjustments
* feat: Update button sizes and padding for improved UI consistency across chat components
* feat: Remove ClearChatsButton test file as part of code cleanup
* refactor(OpenAIClient): titleChatCompletion try/catch
* fix: remove duplicate concatenation as seems to be handled by client SDK now
* fix: assistants image upload
* chore: imports order
* refactor: move file mutations to dedicated file, improve typing
* refactor(ChatForm): utilize FileFormWrapper to consolidate file upload logic/rendering to single parent
* refactor: better TSX heirarchies between AttachFile and FileFormWrapper
* refactor: `abortUpload` WIP
* fix: file debugging and file upload issues
* refactor: reject promise outright if axios intercepted error does not include response property
* chore: bump data-provider version to 0.7.428
* refactor: Add return type to localize function in Translation.ts
* refactor: allow message file attachment upload request cancellations, and add localizations for file upload errors
* refactor: include Azure OpenAI in paramEndpoints set
* fix: assistant form uploads and better typing
* refactor: consolidate logic
* chore: cleanup type issues in client/src/utils/endpoints
* refactor: use Constant enum for 'new' conversationId
* refactor: select assistant model if not provided for model spec
* fix: agent initialization, add `collectedUsage` handling
* style: improve side panel styling
* refactor(loadAgent): Optimize order agent project ID retrieval
* feat: code execution
* fix: typing issues
* feat: ExecuteCode content part
* refactor: use local state for default collapsed state of analysis content parts
* fix: code parsing in ExecuteCode component
* chore: bump agents package, export loadAuthValues
* refactor: Update handleTools.js to use EnvVar for code execution tool authentication
* WIP
* feat: download code outputs
* fix(useEventHandlers): type issues
* feat: backend handling for code outputs
* Refactor: Remove console.log statement in Part.tsx
* refactor: add attachments to TMessage/messageSchema
* WIP: prelim handling for code outputs
* feat: attachments rendering
* refactor: improve attachments rendering
* fix: attachments, nullish edge case, handle attachments from event stream, bump agents package
* fix filename download
* fix: tool assignment for 'run code' on agent creation
* fix: image handling by adding attachments
* refactor: prevent agent creation without provider/model
* refactor: remove unnecessary space in agent creation success message
* refactor: select first model if selecting provider from empty on form
* fix: Agent avatar bug
* fix: `defaultAgentFormValues` causing boolean typing issue and typeerror
* fix: capabilities counting as tools, causing duplication of them
* fix: formatted messages edge case where consecutive content text type parts with the latter having tool_call_ids would cause consecutive AI messages to be created. furthermore, content could not be an array for tool_use messages (anthropic limitation)
* chore: bump @librechat/agents dependency to version 1.6.9
* feat: bedrock agents
* feat: new Agents icon
* feat: agent titling
* feat: agent landing
* refactor: allow sharing agent globally only if user is admin or author
* feat: initial AgentPanelSkeleton
* feat: AgentPanelSkeleton
* feat: collaborative agents
* chore: add potential authorName as part of schema
* chore: Remove unnecessary console.log statement
* WIP: agent model parameters
* chore: ToolsDialog typing and tool related localization chnages
* refactor: update tool instance type (latest langchain class), and rename google tool to 'google' proper
* chore: add back tools
* feat: Agent knowledge files upload
* refactor: better verbiage for disabled knowledge
* chore: debug logs for file deletions
* chore: debug logs for file deletions
* feat: upload/delete agent knowledge/file-search files
* feat: file search UI for agents
* feat: first pass, file search tool
* chore: update default agent capabilities and info
* allow other ldap field besides "mail", or fallback to made up email
* chore(ldap): add detailed logging for email fallback scenarios
---------
Co-authored-by: Maxim Bonnaerens <maxim@bonnaerens.be>
* feat(types): Add global window interface for Google Tag Manager
* refactor(Chat/Footer): Move GTM initialization to useEffect for better lifecycle management
* fix(hooks): add useEffect to initialize TagManager conditionally
* chore: remove double import of TrashIcon
* fix(convos): eslint warnings
* ci(convos): add test for month sorting
* fix(convos): grouping by month in chronological order instead of alphabetical, optimize sort
* ci: additional tests for conversation sorting
* chore: fix eslint disable rule
* chore: imports, use constant enum for 'new' value
* fix: test dependent on current date
* fix: modal styling issue, where buttons in light mode are not accessible/visible
* refactor: use MarkdownLite instead
* chore: make inner content accessible
* inital Tooltip implementation and test
* style(tooltip): L/R sidePanel and Nav
* style(tooltip): unarchive button; refactor: `useArchiveHandler` and `ArchiveButton`
* style(tooltip): Delete button
* refactor: remove unused className prop in DeleteButton component
* style(tooltip): finish final tooltip and fix bookmark edit and delete button
* refactor(ui): remove TooltipTest and DropDownMenu component and unused imports
* style: update mobile UI
* fix: sidePanel icon not showing
* feat(AttachFile): add tooltip
* fix(NavToggle): remove button
without this button, kb users don't have to manually press 2 times to change the focus
Also, tooltips with buttons focus don't trigger
* fix: right side panel issue with double button
* fix: merge issues
* fix: sharedLink table issue
* chore: update ariakit and framer-motion version
* a11y: kb toggle for sidebar
* feat: tooltip for some buttons
* feat: use AWS cascading default providers if credentials are omitted
Environment variables exposed via process.env
SSO credentials from token cache
Web identity token credentials
Shared credentials and config ini files
The EC2/ECS Instance Metadata Service
The default credential provider will invoke one provider at a time and only continue to the next if no credentials have been located. For example, if the process finds values defined via the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, the files at ~/.aws/credentials and ~/.aws/config will not be read, nor will any messages be sent to the Instance Metadata Service.
* fix: usage check in OpenAIClient
* refactor: Improve usage check in OpenAIClient
* feat: o1 default response sender string
* feat: add o1 models to default openai models list, add `no_system_messages` error type; refactor: use error type as localization key
* refactor(MessageEndpointIcon): differentiate openAI icon model color for o1 models
* refactor(AnthropicClient): use new input/output tokens keys; add prompt caching for claude-3-opus
* refactor(BaseClient): to use new input/output tokens keys; update typedefs
* feat: initial o1 model handling, including token cost complexity
* EXPERIMENTAL: special handling for o1 model with custom instructions
* feat: Add banner schema and model
* feat: Add optional JwtAuth
To handle the conditional logic with and without authentication within the model.
* feat: Add an endpoint to retrieve a banner
* feat: Add implementation for client to use banner and access API
* feat: Display a banner on UI
* feat: Script for updating and deleting banners
* style: Update banner style
* fix: Adjust the height when the banner is displayed
* fix: failed specs
* ✨ v0.7.5-rc2
* docs: update README
* refactor(settings): Update rememberForkOption default value
* a11y: proper screen reader announcements for content blocks
* Update version to 0.7.423 in package-lock.json and packages/data-provider/package.json
* chore: rename rememberForkOption -> rememberDefaultFork to apply new default value
* fix: headlessui menu stealing focus from Settings Dialog when pressing Enter
* feat: settings tba accessible
* refactor: cleanup unused code
* refactor: improve accessibility and user experience in ChatDirection component
* style: focus ring primary class
* improve a11y of avatar dialog
* style: a11y improvements for Settings
* style: focus ring primary class in OriginalDialog component
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor(EditMessage): avoid manipulation of native paste handling, leverage react-hook-form for textarea changes
* style: apply better theming for MinimalIcon
* fix(useVoicesQuery/useCustomConfigSpeechQuery): make sure to only try request once per render
* feat: edit message content parts
* fix(useCopyToClipboard): handle both assistants and agents content blocks
* refactor: remove save & submit and update text content correctly
* chore(.env.example/config): exclude unsupported bedrock models
* feat: artifacts for aws bedrock
* fix: export options for bedrock conversations
* fix: remove duplicate keys in German language translations
* wip: multi-convo role permissions
* ci: Update loadDefaultInterface tests due to MULTI_CONVO
* ci: update Role.spec.js with tests for MULTI_CONVO permission type
* fix: Update ContentParts component to handle undefined content array
* feat: render Multi-Convo based on UI permissions
* feat: Add BedrockIcon component to SVG library
* feat: EModelEndpoint.bedrock
* feat: first pass, bedrock chat. note: AgentClient is returning `agents` as conversation.endpoint
* fix: declare endpoint in initialization step
* chore: Update @librechat/agents dependency to version 1.4.5
* feat: backend content aggregation for agents/bedrock
* feat: abort agent requests
* feat: AWS Bedrock icons
* WIP: agent provider schema parsing
* chore: Update EditIcon props type
* refactor(useGenerationsByLatest): make agents and bedrock editable
* refactor: non-assistant message content, parts
* fix: Bedrock response `sender`
* fix: use endpointOption.model_parameters not endpointOption.modelOptions
* fix: types for step handler
* refactor: Update Agents.ToolCallDelta type
* refactor: Remove unnecessary assignment of parentMessageId in AskController
* refactor: remove unnecessary assignment of parentMessageId (agent request handler)
* fix(bedrock/agents): message regeneration
* refactor: dynamic form elements using react-hook-form Controllers
* fix: agent icons/labels for messages
* fix: agent actions
* fix: use of new dynamic tags causing application crash
* refactor: dynamic settings touch-ups
* refactor: update Slider component to allow custom track class name
* refactor: update DynamicSlider component styles
* refactor: use Constants value for GLOBAL_PROJECT_NAME (enum)
* feat: agent share global methods/controllers
* fix: agents query
* fix: `getResponseModel`
* fix: share prompt a11y issue
* refactor: update SharePrompt dialog theme styles
* refactor: explicit typing for SharePrompt
* feat: add agent roles/permissions
* chore: update @librechat/agents dependency to version 1.4.7 for tool_call_ids edge case
* fix(Anthropic): messages.X.content.Y.tool_use.input: Input should be a valid dictionary
* fix: handle text parts with tool_call_ids and empty text
* fix: role initialization
* refactor: don't make instructions required
* refactor: improve typing of Text part
* fix: setShowStopButton for agents route
* chore: remove params for now
* fix: add streamBuffer and streamRate to help prevent 'Overloaded' errors from Anthropic API
* refactor: remove console.log statement in ContentRender component
* chore: typing, rename Context to Delete Button
* chore(DeleteButton): logging
* refactor(Action): make accessible
* style(Action): improve a11y again
* refactor: remove use/mention of mongoose sessions
* feat: first pass, sharing agents
* feat: visual indicator for global agent, remove author when serving to non-author
* wip: params
* chore: fix typing issues
* fix(schemas): typing
* refactor: improve accessibility of ListCard component and fix console React warning
* wip: reset templates for non-legacy new convos
* Revert "wip: params"
This reverts commit f8067e91d4.
* Revert "refactor: dynamic form elements using react-hook-form Controllers"
This reverts commit 2150c4815d.
* fix(Parameters): types and parameter effect update to only update local state to parameters
* refactor: optimize useDebouncedInput hook for better performance
* feat: first pass, anthropic bedrock params
* chore: paramEndpoints check for endpointType too
* fix: maxTokens to use coerceNumber.optional(),
* feat: extra chat model params
* chore: reduce code repetition
* refactor: improve preset title handling in SaveAsPresetDialog component
* refactor: improve preset handling in HeaderOptions component
* chore: improve typing, replace legacy dialog for SaveAsPresetDialog
* feat: save as preset from parameters panel
* fix: multi-search in select dropdown when using Option type
* refactor: update default showDefault value to false in Dynamic components
* feat: Bedrock presets settings
* chore: config, fix agents schema, update config version
* refactor: update AWS region variable name in bedrock options endpoint to BEDROCK_AWS_DEFAULT_REGION
* refactor: update baseEndpointSchema in config.ts to include baseURL property
* refactor: update createRun function to include req parameter and set streamRate based on provider
* feat: availableRegions via config
* refactor: remove unused demo agent controller file
* WIP: title
* Update @librechat/agents to version 1.5.0
* chore: addTitle.js to handle empty responseText
* feat: support images and titles
* feat: context token updates
* Refactor BaseClient test to use expect.objectContaining
* refactor: add model select, remove header options params, move side panel params below prompts
* chore: update models list, catch title error
* feat: model service for bedrock models (env)
* chore: Remove verbose debug log in AgentClient class following stream
* feat(bedrock): track token spend; fix: token rates, value key mapping for AWS models
* refactor: handle streamRate in `handleLLMNewToken` callback
* chore: AWS Bedrock example config in `.env.example`
* refactor: Rename bedrockMeta to bedrockGeneral in settings.ts and use for AI21 and Amazon Bedrock providers
* refactor: Update `.env.example` with AWS Bedrock model IDs URL and additional notes
* feat: titleModel support for bedrock
* refactor: Update `.env.example` with additional notes for AWS Bedrock model IDs
* fix focus for cancel button in convo delete modal window #3829
* add aria-hidden and aria-label to X and Check svg/button respectively and updated OGDialogClose focus color
* update rename, newchat, newchat icon, ConvoOptions icon
* agents - phase 1 (#30)
* chore: copy assistant files
* feat: frontend and data-provider
* feat: backend get endpoint test
* fix(MessageEndpointIcon): switched to AgentName and AgentAvatar
* fix: small fixes
* fix: agent endpoint config
* fix: show Agent Builder
* chore: install agentus
* chore: initial scaffolding for agents
* fix: updated Assistant logic to Agent Logic for some Agent components
* WIP first pass, demo of agent package
* WIP: initial backend infra for agents
* fix: agent list error
* wip: agents routing
* chore: Refactor useSSE hook to handle different data events
* wip: correctly emit events
* chore: Update @librechat/agentus npm dependency to version 1.0.9
* remove comment
* first pass: streaming agent text
* chore: Remove @librechat/agentus root-level workspace npm dependency
* feat: Agent Schema and Model
* fix: content handling fixes
* fix: content message save
* WIP: new content data
* fix: run step issue with tool calls
* chore: Update @librechat/agentus npm dependency to version 1.1.5
* feat: update controller and agent routes
* wip: initial backend tool and tool error handling support
* wip: tool chunks
* chore: Update @librechat/agentus npm dependency to version 1.1.7
* chore: update tool_call typing, add test conditions and logs
* fix: create agent
* fix: create agent
* first pass: render completed content parts
* fix: remove logging, fix step handler typing
* chore: Update @librechat/agentus npm dependency to version 1.1.9
* refactor: cleanup maps on unmount
* chore: Update BaseClient.js to safely count tokens for string, number, and boolean values
* fix: support subsequent messages with tool_calls
* chore: export order
* fix: select agent
* fix: tool call types and handling
* chore: switch to anthropic for testing
* fix: AgentSelect
* refactor: experimental: OpenAIClient to use array for intermediateReply
* fix(useSSE): revert old condition for streaming legacy client tokens
* fix: lint
* revert `agent_id` to `id`
* chore: update localization keys for agent-related components
* feat: zod schema handling for actions
* refactor(actions): if no params, no zodSchema
* chore: Update @librechat/agentus npm dependency to version 1.2.1
* feat: first pass, actions
* refactor: empty schema for actions without params
* feat: Update createRun function to accept additional options
* fix: message payload formatting; feat: add more client options
* fix: ToolCall component rendering when action has no args but has output
* refactor(ToolCall): allow non-stringy args
* WIP: first pass, correctly formatted tool_calls between providers
* refactor: Remove duplicate import of 'roles' module
* refactor: Exclude 'vite.config.ts' from TypeScript compilation
* refactor: fix agent related types
> - no need to use endpoint/model fields for identifying agent metadata
> - add `provider` distinction for agent-configured 'endpoint'
- no need for agent-endpoint map
- reduce complexity of tools as functions into tools as string[]
- fix types related to above changes
- reduce unnecessary variables for queries/mutations and corresponding react-query keys
* refactor: Add tools and tool_kwargs fields to agent schema
* refactor: Remove unused code and update dependencies
* refactor: Update updateAgentHandler to use req.body directly
* refactor: Update AgentSelect component to use localized hooks
* refactor: Update agent schema to include tools and provider fields
* refactor(AgentPanel): add scrollbar gutter, add provider field to form, fix agent schema required values
* refactor: Update AgentSwitcher component to use selectedAgentId instead of selectedAgent
* refactor: Update AgentPanel component to include alternateName import and defaultAgentFormValues
* refactor(SelectDropDown): allow setting value as option while still supporting legacy usage (string values only)
* refactor: SelectDropdown changes - Only necessary when the available values are objects with label/value fields and the selected value is expected to be a string.
* refactor: TypeError issues and handle provider as option
* feat: Add placeholder for provider selection in AgentPanel component
* refactor: Update agent schema to include author and provider fields
* fix: show expected 'create agent' placeholder when creating agent
* chore: fix localization strings, hide capabilities form for now
* chore: typing
* refactor: import order and use compact agents schema for now
* chore: typing
* refactor: Update AgentForm type to use AgentCapabilities
* fix agent form agent selection issues
* feat: responsive agent selection
* fix: Handle cancelled fetch in useSelectAgent hook
* fix: reset agent form on accordion close/open
* feat: Add agent_id to default conversation for agents endpoint
* feat: agents endpoint request handling
* refactor: reset conversation model on agent select
* refactor: add `additional_instructions` to conversation schema, organize other fields
* chore: casing
* chore: types
* refactor(loadAgentTools): explicitly pass agent_id, do not pass `model` to loadAgentTools for now, load action sets by agent_id
* WIP: initial draft of real agent client initialization
* WIP: first pass, anthropic agent requests
* feat: remember last selected agent
* feat: openai and azure connected
* fix: prioritize agent model for runs unless an explicit override model is passed from client
* feat: Agent Actions
* fix: save agent id to convo
* feat: model panel (#29)
* feat: model panel
* bring back comments
* fix: method still null
* fix: AgentPanel FormContext
* feat: add more parameters
* fix: style issues; refactor: Agent Controller
* fix: cherry-pick
* fix: Update AgentAvatar component to use AssistantIcon instead of BrainCircuit
* feat: OGDialog for delete agent; feat(assistant): update Agent types, introduced `model_parameters`
* feat: icon and general `model_parameters` update
* feat: use react-hook-form better
* fix: agent builder form reset issue when switching panels
* refactor: modularize agent builder form
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: AgentPanel and ModelPanel type issues and use `useFormContext` and `watch` instead of `methods` directly and `useWatch`.
* fix: tool call issues due to invalid input (anthropic) of empty string
* fix: handle empty text in Part component
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* refactor: remove form ModelPanel and fixed nested ternary expressions in AgentConfig
* fix: Model Parameters not saved correctly
* refactor: remove console log
* feat: avatar upload and get for Agents (#36)
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* chore: update to public package
* fix: typing, optional chaining
* fix: cursor not showing for content parts
* chore: conditionally enable agents
* ci: fix azure test
* ci: fix frontend tests, fix eslint api
* refactor: Remove unused errorContentPart variable
* continue of the agent message PR (#40)
* last fixes
* fix: agentMap
* pr merge test (#41)
* fix: model icon not fetching correctly
* remove console logs
* feat: agent name
* refactor: pass documentsMap as a prop to allow re-render of assistant form
* refactor: pass documentsMap as a prop to allow re-render of assistant form
* chore: Bump version to 0.7.419
* fix: TypeError: Cannot read properties of undefined (reading 'id')
* refactor: update AgentSwitcher component to use ControlCombobox instead of Combobox
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* Added UI for Terms and Conditions Modal Dialogue
* Handled the logout on not accepting
* Added logic for terms acceptance
* Add terms and conditions modal
* Fixed bug on terms and conditions modal, clicking out of it won't close it now
* Added acceptance of Terms to Database
* Removed unnecessary api endpoints from index.js
* Added NPM script to reset terms acceptance
* Added translations, markdown terms and samples
* Merged terms and conditions modal feature
* feat/Modal Terms and Conditions Dialog
* Amendments as requested by maintainers
* Reset package-lock (again)
* fix: type issues
* feat: Fix document title setting in Conversation component
* style: new chat theme
* fix: No keyboard access to chat menus in the chat history #3788
* fix: Menu button in the chat history area does not indicate its state #3823
* refactor: use ariakit for DropdownPopup
* style: update sticky z-index in NewChat component
* style: update ConvoOptions menu button styling
* refactor: remove duplicate localStorage lang call
* refactor: use cookies to handle langcode
* feat: override index.html lang w/ cookie pref
* refactor: only read index on server start
* refactor: rename lang cookie & localstorage as backup
* refactor: use atomWithLocalStorage in language store
* fix: forced reflow warning in language select
* feat: Add CodeArtifacts component to Beta settings tab
* chore: Update npm dependency to @codesandbox/sandpack-react@2.18.2
* WIP: artifacts first pass
* WIP first pass remark-directive
* chore: revert markdown to original component + new artifacts rendering
* refactor: first pass rewrite
* refactor: add throttling
* first pass styling
* style: Add Radix Tabs, more styling changes
* feat: second pass
* style: code styling
* fix: package markdown fixes
* feat: Add useEffect hook to Artifacts component for visibility control, slide in animation
* fix: only set artifact if there is content
* refactor: typing and make latest artifact active if the number of artifacts changed
* feat: artifacts + shadcnui
* feat: Add Copy Code button to Artifacts component
* feat: first pass streaming updates
* refactor: optimize ordering of artifacts in Artifacts component
* refactor: optimize ordering of artifacts and add latest artifact activation in Artifacts component
* refactor: add order prop to Artifact
* feat: update to latest, use update time for ordering
* refactor: optimize ordering of artifacts and activate latest artifact in Artifacts component
* wip: remove thinking text and artifact formatting if empty
* refactor: optimize Markdown rendering and add support for code artifacts
* feat: global state for current artifact Id and set on artifact preview click
* refactor: Rename CodePreview component to ArtifactButton
* refactor: apply growth to artifact frame so artifact preview can take full space
* refactor: remove artifactIdsState
* refactor: nullify artifact state and reset on empty conversation
* feat: reset artifact state on conversation change
* feat: artifacts system prompt in backend
* refactor: update UI artifact toggle label to match localization key
* style: remove ArtifactButton inline-block styling
* feat: memoize ArtifactPreview, add html support
* refactor: abstract out components
* chore: bump react-resizable-panel
* refactor: resizable panel order props
* fix: side panel resizing crashes
* style: temporarily remove scrolling, add better styling
* chore: remove thinking for now
* chore: preprocess artifacts for now
* feat: Add auto scrolling to CodeMarkdown (artifacts)
* feat: autoswitch to preview
* feat: auto switch to code, adjust prompt, remove unused code
* feat: refresh button
* feat: open/close artifacts
* wip: mermaid
* refactor: w-fit Artifact button
* chore: organize code
* feat: first pass mermaid
* refactor: improve panning logic in MermaidDiagram component
* feat: center/zoom on first render
* refactor: add centering with reset button
* style: mermaid styling
* refactor: add back MermaidDiagram
* fix: static/html template
* fix: mermaid
* add examples to artifacts prompt
* refactor: fix CodeBar plugin prop logic
* refactor: remove unnecessary mention of artifacts when not requested
* fix: remove preprocessCodeArtifacts function and fix imports
* feat: improve artifacts guidelines and remove unnecessary mentions
* refactor: improve artifacts guidelines and remove unnecessary mentions
* chore: uninstall unused packages
* chore: bump vite
* chore: update three dependency to version 0.167.1
* refactor: move beta settings, add additional artifacts toggles
* feat: artifacts mode toggles
* refactor: adjust prompt
* feat: shadcnui instructions
* feat: code artifacts custom prompt mode
* chore: Update artifacts UI labels and instructions localizations
* refactor: Remove unused code in Markdown component
* feat: Update speech settings retrieval logic to handle missing custom configuration
This commit updates the logic in the Speech component and the getCustomConfigSpeech function to handle the case where the custom configuration is missing. Previously, if no custom configuration was found, an error would occur. Now, the code checks for the presence of the custom configuration and returns a message indicating that no custom configuration was found. This improves the robustness of the application and provides a better user experience.
* refactor: changed response message when no custom config is found
* refactor: Update staticCache to use oneDayInSeconds for sMaxAge and maxAge
* refactor: role updates
* style: first pass cursor
* style: Update nested list styles in style.css
* feat: setIsSubmitting to true in message handler to prevent edge case where submitting turns false during message stream
* feat: Add logic to redirect to conversation page after creating a new conversation
* refactor: Trim code string before copying in CodeBlock component
* feat: configSchema bookmarks and presets defaults
* feat: Update loadDefaultInterface to handle undefined config
* refactor: use for compression check
* feat: first pass, query params
* fix: styling issues for prompt cards
* feat: anthropic prompt caching UI switch
* chore: Update static file cache control defaults/comments in .env.example
* ci: fix tests
* ci: fix tests
* chore: use "submitting" class server error connection suspense fallback
* refactor: simplify LaTeX pre-processing for more consistent rendering, disables `singleDollarTextMath`
* refactor: disable singleDollarTextMath in all markdown components
* wip: first pass
* refactor: preserve code blocks and convert rather than preserve LaTeX delimiters
* refactor: remove unused escapeDollarNumber function from latex.ts
* chore: update package version to 0.7.416
* chore: Update Role.js imports order
* refactor: move updateTagsInConvo to tags route, add RBAC for tags
* refactor: add updateTagsInConvoOptions
* fix: loading state for bookmark form
* refactor: update primaryText class in TitleButton component
* refactor: remove duplicate bookmarks and theming
* refactor: update EditIcon component to use React.forwardRef
* refactor: add _id field to tConversationTagSchema
* refactor: remove promises
* refactor: move mutation logic from BookmarkForm -> BookmarkEditDialog
* refactor: update button class in BookmarkForm component
* fix: conversation mutations and add better logging to useConversationTagMutation
* refactor: update logger message in BookmarkEditDialog component
* refactor: improve UI consistency in BookmarkNav and NewChat components
* refactor: update logger message in BookmarkEditDialog component
* refactor: Add tags prop to BookmarkForm component
* refactor: Update BookmarkForm to avoid tag mutation if the tag already exists; also close dialog on submission programmatically
* refactor: general role helper function to support updating access permissions for different permission types
* refactor: Update getLatestText function to handle undefined values in message.content
* refactor: Update useHasAccess hook to handle null role values for authenticated users
* feat: toggle bookmarks access
* refactor: Update PromptsCommand to handle access permissions for prompts
* feat: updateConversationSelector
* refactor: rename `vars` to `tagToDelete` for clarity
* fix: prevent recreation of deleted tags in BookmarkMenu on Item Click
* ci: mock updateBookmarksAccess function
* ci: mock updateBookmarksAccess function
* chore: update CONFIG_VERSION to '1.1.6'
* chore: update package version to 0.7.415
* feat: toggle USER role access to prompts via librechat.yaml
* refactor: set prompts to true when loadDefaultInterface returns true
* ci(AppService): mock updatePromptsAccess
* refactor(DropdownPopup): set MenuButton `as` prop to `div` to prevent React warning: validateDOMNesting(...): <button> cannot appear as a descendant of <button>
* refactor: memoize ChatGroupItem and ControlCombobox components
* refactor(OpenAIClient): await stream process finish before finalCompletion event handling
* refactor: update useSSE.ts typing to handle null and undefined values in data properties
* refactor: set abort scroll to false on SSE connection open
* refactor: improve logger functionality with filter support
* refactor: update handleScroll typing in MessageContainer component
* refactor: update logger.dir call in useChatFunctions to log 'message_stream' tag format instead of the entire submission object as first arg
* refactor: fix null check for message object in Message component
* refactor: throttle handleScroll to help prevent auto-scrolling issues on new message requests; fix type issues within useMessageProcess
* refactor: add abortScrollByIndex logging effect
* refactor: update MessageIcon and Icon components to use React.memo for performance optimization
* refactor: memoize ConvoIconURL component for performance optimization
* chore: type issues
* chore: update package version to 0.7.414
* refactor(OpenAIClient): improve error handling in chat completion
Improve error handling in the chat completion process to handle scenarios where the response has no choices or the message is undefined. This ensures that the intermediate reply is returned in such cases. Also, add logging statements for better debugging.
* refactor(Markdown): only show blinking cursor for latest message
* refactor: add submitting selector to prevent blinking cursor for empty, non-streaming, non-latest messages
* refactor: Improve LiveAnnouncer component
The LiveAnnouncer component in the client/src/a11y/LiveAnnouncer.tsx file has been refactored to improve its functionality. The component now processes text in chunks for better performance and adds a minimum announcement delay to prevent overlapping announcements. Additionally, the component now properly clears the announcement message and ID before setting a new one. These changes enhance the accessibility and user experience of the LiveAnnouncer component.
* refactor: manage only 2 LiveAnnouncer aria-live elements, queue assertive/polite together
* refactor: use localizations for event announcements
* refactor: update minimum announcement delay in LiveAnnouncer component
* refactor: replace *`_
* chore(useContentHandler): typing
* chore: more type fixes and safely announce final message
* feat: Add SimpleCombobox component
* feat: Add labelClassName and add manual focus handling
* feat: Update VariableForm component to use SimpleCombobox
The VariableForm component in the client/src/components/Prompts/Groups/VariableForm.tsx file has been updated to use the SimpleCombobox component instead of the InputWithDropdown component. This change improves the functionality and styling of the form.
* chore: Update VariableForm component placeholder text
* refactor: Improve VariableForm component
The VariableForm component in the client/src/components/Prompts/Groups/VariableForm.tsx file has been refactored to improve its functionality. The `parseFieldConfig` function now trims the `variable` string before processing it. Additionally, the `onSubmit` function now properly escapes potential regex special chars that may cause issues when replacing text
* refactor: Improve VariableForm using ariakit helpers/custom fields, open menu on input focus
* refactor: rename SimpleCombobox to InputCombobox
* chore: Update @ariakit/react dependency to version 0.4.8
* refactor: Fix Combobox Android issue with radix-ui
* fix: Improve scrolling behavior by setting abort scroll state to false after scrolling to end
* wip: first pass switcher rewrite
* feat: Add button width calculation for ComboboxComponent
* refactor: Update ComboboxComponent styling for improved layout and appearance
* refactor: Update AssistantSwitcher component to handle null values for assistant names and avatar URLs
* refactor: Update ModelSwitcher component to use SimpleCombobox for improved functionality and styling
* refactor: Update Switcher Separator styling for improved layout and appearance
* refactor: Improve accessibility by adding aria-label to ComboboxComponent select items
* refactor: rename SimpleCombobox -> ControlCombobox
* refactor: use parseCompactConvo in buildOptions, and generate no default values for the API to avoid weird model behavior with defaults
* refactor: OTHER - always show cursor when markdown component is empty (preferable to not)
* refactor(OpenAISettings): use config object for setting defaults app-wide
* refactor: Use removeNullishValues in buildOptions for ALL endpoints
* fix: add missing conversationId to title methods for transactions; refactor(GoogleClient): model options, set no default, add todo note for recording token usage
* fix: at minimum set a model default, as is required by API (edge case)
* feat: Add extended inputs for promts library variables
* feat: Add maxRows prop to VariableForm input field
* 📩 feat: invite user (#3012)
* feat: basic invite-user script
* feat: add invite user functionality and registration validation middleware
* fix: invite user fixes
* refactor: consolidate direct model access to a central place of functions
* style(Registration): add spinner to continue button
* refactor: import ordrer
* feat: improve invite user script and error handling
* fix: merge conflict
* refactor: remove `console.log` and use `logger`
* fix: token operation and checkinvite issues
* bring back comment and remove console log
* fix: return invalid token when token is not found
* fix: getInvite fix
* refactor: Update Token.js to use async/await syntax for update and delete operations
* feat: Refactor Token.js to use async/await syntax for createToken and findToken functions
* refactor(inviteUser): define functions outside of module.exports
* Update AuthService.js
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* style: improve OpenAI.tsx input field focus styling
* refactor: update import statement in Input.tsx
* refactor: remove multi-line
* refactor: update placeholder text to use localization
* style: new dropdown variable info and markdown styling for info
* Add ReactMarkdown
* chore: styling, import order
* refactor: update ReactMarkdown usage in VariableForm
* style: remove markdown class
* refactor: update mobile styling and use code renderer
* style(InputWithDropDown): update focus trigger style
* style(OptionsPopover): update Save As Preset `focus` and `dark:bg`
---------
Co-authored-by: Konstantin Meshcheryakov <kmeshcheryakov@klika-tech.com>
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
* feat: basic invite-user script
* feat: add invite user functionality and registration validation middleware
* fix: invite user fixes
* refactor: consolidate direct model access to a central place of functions
* style(Registration): add spinner to continue button
* refactor: import ordrer
* feat: improve invite user script and error handling
* fix: merge conflict
* refactor: remove `console.log` and use `logger`
* fix: token operation and checkinvite issues
* bring back comment and remove console log
* fix: return invalid token when token is not found
* fix: getInvite fix
* refactor: Update Token.js to use async/await syntax for update and delete operations
* feat: Refactor Token.js to use async/await syntax for createToken and findToken functions
* refactor(inviteUser): define functions outside of module.exports
* Update AuthService.js
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* wip: initial cache control implementation, add typing for transactions handling
* feat: first pass of Anthropic Prompt Caching
* feat: standardize stream usage as pass in when calculating token counts
* feat: Add getCacheMultiplier function to calculate cache multiplier for different valueKeys and cacheTypes
* chore: imports order
* refactor: token usage recording in AnthropicClient, no need to "correct" as we have the correct amount
* feat: more accurate token counting using stream usage data
* feat: Improve token counting accuracy with stream usage data
* refactor: ensure more accurate than not token estimations if custom instructions or files are not being resent with every request
* refactor: cleanup updateUserMessageTokenCount to allow transactions to be as accurate as possible even if we shouldn't update user message token counts
* ci: fix tests
* refactor(NavLinks -> AccountSettings): add theming, fix minor type issues, and rename component
* fix: closes#3499 - Account settings menu is not keyboard accessible
* fix(DataTable): type issue causing application crash, update contextMap key for storage
* fix: use theme class for valid contrast for light/dark, conversation group names, fix type issues
* fix: searchbar text contrast styling, closes#3469
* style: add theming for prompt cards, fix a11y contrast issues
* a11y: address placeholder text contrast issues in LLM controls section
* chore: Add conditional check for pull request repository in a11y workflow
* style: Update text color contrast to WCAG standard for placeholder and focus states in AssistantPanel components
* feat: new dropdown
* fix: maintain popover active when open
* fix: update DeleteButton and ShareButton component to use useState for managing dialog state
* BREAKING: style improvement of base Button component
* style: update export button
* a11y: ExportAndShareButton
* add border
* quick style fix
* fix: flick issue on convo
* fix: DropDown opens when renaming
* chore: update radix-ui/react-dropdown-menu to latest
* small fix
* style: bookmarks update
* reorder export modal
* feat: imporved dropdowns
* style: a lot of changes; header, bookmarks, export, nav, convo, convoOptions
* fix: small style issues
* fix: button
* fix: bookmarks header menu
* fix: dropdown close glitch
* feat: Improve accessibility and keyboard navigation in ModelSpec component
* fix: Nav related type issues
* style: ConvoOptions theming and focus ring
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* WIP: message audio refactor
* WIP: use MessageAudio by provider
* fix: Update MessageAudio component to use TTSEndpoints enum
* feat: Update useTextToSpeechBrowser hook to handle errors and improve error logging
* feat: Add voice dropdown components for different TTS engines
* docs: update incorrect `voices` example
changed `voice: ''` to `voices: ['alloy']`
* feat: Add brwoser support check for Edge TTS engine component with error toast if not supported
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
* refactor: do not call await inside useCallbacks, rely on updates for dropdown
* fix: remember last selected voice
* refactor: Update Speech component to use TypeScript in useCallback
* refactor: Update Dropdown component styles to match header theme
* refactor: scrollToEnd
* fix(validateConvoAccess): search conversation by ID for proper validation
* feat: Add unique index for conversationId and user in convoSchema
* refactor: Update font sizes 1 rem -> font-size-base in style.css
* fix: Assistants map type issues
* refactor: Remove obsolete scripts
* fix: Update DropdownNoState component to handle both string and OptionType values
* refactor: Remove config/loader.js file
* fix: remove crypto.randomBytes(); refactor: Create reusable function for generating token and hash
* fix: Update health endpoint URL
* refactor: use Constants for saved tag default value, do not place Saved as first always
* refactor: check trimmed currentText before appending parsedText in useSubmitMessage
* refactor: move `scrollToEnd()` to `createdHandler` and increase delay before execution slightly
* chore: Add back TypeScript linting rules for unnecessary conditions and strict boolean expressions
* chore: Update librechat-data-provider package.json version to 0.7.4.0
* feat: gpt-4o-2024-08-06 pricing for tx
* feat: add AWS models to tokenValues in tx.js for pricing transactions
* feat: Update tokenValues in tx.js for AWS models pricing
* refactor: add bedrock prefix values as well (temporary until we update value keys which includes context)
* refactor: optimize tag methods, remove rebuild
* refactor(tags): add lean db operations, fix updateTagsForConversation, remove rebuild button, only send convoId once
* refactor: Update BookmarkMenu to use Constants.NEW_CONVO constant for comparison
* style: Update BookmarkMenu styles and constants, use theming
* refactor: move tags query from package to client workspace
* refactor: optimize ConversationTag document creation and update logic
* style: Update BookmarkMenuItems to use theming
* refactor: JSDocs + try/catch for conversation tags API routes
* refactor: Update BookmarkNav theming classes and new data provider location
* fix: statefulness of conversation bookmarks
- move non-mutation hook to hooks/Conversation
- remove use of deprecated global convo
- update convo infinite data as well as current convo state upon successful tag add
* refactor: Update BookmarkMenu styles and constants, use theming
* refactor: Add lean option to ConversationTag deletion query
* fix(BookmarkTable): position order rendering esp. when new tag is created
* refactor: Update useBookmarkSucess to useBookmarkSuccess for consistency
* refactor: Update ConversationTag creation logic to increment count only if addToConversation is true
* style: theming
* 🌡️ feat: Periodic Health Check to prevent UI Inactivity Connection Errors
* feat: Add refetchOnWindowFocus option for health check
* feat: programmatically scroll to end when a chat request is initiated (and messages have rendered)
* 🛂 feat: Added Security for Conversation Access
* refactor: Update concurrentLimiter and convoAccess middleware to use isEnabled function for Redis check
* refactor: handle access check even if cache is not available (edge case)
* style: fix prompts icon shrinking in command popover
* fix: scroll into view behavior for mentions
* fix: always apply default font size if not found
* refactor: Update useMessageScrolling threshold and debounceRate
* refactor: Improve handling of key up events in useHandleKeyUp hook to only trigger for first char and fix linter issues
* refactor: Update Beta component styling with theme twcss variables
* refactor: theming for Settings, add toggle enable/disable keyboard commands
* fix: correctly handle openai assistants annotations
* fix: Handle adjacent identical citations only for our specific format
* fix: correctly handle adjacent identical citations
* refactor: make regex handling more robust
* fix: skip annotation condition, make regex handling more robust
* refactor: Handle FILE_PATH and FILE_CITATION annotation types in processMessages.spec.js
* ci: unit tests for real file path type annotations
* fix: get user-provided API key using environment variable names as keys
* feat: Add error handling for missing API key and search engine ID
* feat: Add GoogleSearch and TavilySearchResults specs for environment variables handling
---------
Co-authored-by: Dongwoo Jeong <dongwoo.jeong@lge.com>
* fix: regex issue extracting text with images in markdown
* fix: update addImages function to include only the first observed image path in the response message
* ci: tests for addImages function: correct image extraction
* fix(GoogleClient): linting
---------
Co-authored-by: Dongwoo Jeong <dongwoo.jeong@lge.com>
Co-authored-by: Dongwoo Jeong <dongwoo@duck.com>
* chore: playwright setup update
* refactor: update ChatRoute component with accessible loading spinner with live region
* chore(Message): typing
* ci: first pass, a11y testing
* refactor: update lang attribute in index.html to "en-US"
* ci: jsx-a11y dev eslint plugin
* ci: jsx plugin
* fix: Exclude 'vite.config.ts' from TypeScript compilation for testing
* fix(a11y): Remove tabIndex from non-interactive element in MessagesView component
* fix(a11y):
- Visible, non-interactive elements with click handlers must have at least one keyboard listener.eslintjsx-a11y/click-events-have-key-events
- Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.eslintjsx-a11y/no-static-element-interactions
chore: remove unused bookmarks panel
- fix some "Unexpected nullable boolean value in conditional" warnings
* fix(NewChat): a11y, nested button issue, add aria-label, remove implicit role
* fix(a11y):
- partially address #3515 with `main` landmark
other:
- eslint@typescript-eslint/strict-boolean-expressions
* chore(MenuButton): Use button element instead of div for accessibility
* chore: Update TitleButton to use button element for accessibility
* chore: Update TitleButton to use button element for accessibility
* refactor(ChatMenuItem): Improve focus accessibility and code readability
* chore(MenuButton): Update aria-label to dynamically include primaryText
* fix(a11y): SearchBar
- If a form control does not have a properly associated text label, the function or purpose of that form control may not be presented to screen reader users. Visible form labels also provide visible descriptions and larger clickable targets for form controls which placeholders do not.
* chore: remove duplicate SearchBar twcss
* fix(a11y):
- The edit and copy buttons that are visually hidden are exposed to Assistive technology and are announced to screen reader users.
* fix(a11y): visible focus outline
* fix(a11y): The button to select the LLM Model has the aria-haspopup and aria- expanded attributes which makes its role ambuguous and unclear. It functions like a combobox but doesn't fully support that interaction and also fucntions like a dialog but doesn't completely support that interaction either.
* fix(a11y): fix visible focus outline
* fix(a11y): Scroll to bottom button missing accessible name #3474
* fix(a11y): The page lacks any heading structure. There should be at least one H1 and other headings to help users understand the orgainzation of the page and the contents.
Note: h1 won't be correct here so made it h2
* fix(a11y): LLM controls aria-labels
* fix(a11y): There is no visible focus outline to the 'send message' button
* fix(a11y): fix visible focus outline for Fork button
* refactor(MessageRender): add focus ring to message cards, consolidate complex conditions, add logger for setting latest message, add tabindex for card
* fix: focus border color and fix set latest message card condition
* fix(a11y): Adequate contrast for MessageAudio buttton
* feat: Add GitHub Actions workflow for accessibility linting
* chore: Update GitHub Actions workflow for accessibility linting to include client/src/** path
* fix(Nav): navmask and accessibility
* fix: Update Nav component to handle potential undefined type in SearchContext
* fix(a11y): add focus visibility to attach files button #3475
* fix(a11y): discernible text for NewChat button
* fix(a11y): accessible landmark names, all page content in landmarks, ensures landmarks are unique #3514#3515
* fix(Prompts): update isChatRoute prop to be required in List component
* fix(a11y): buttons must have discernible text
- Introduce getSafetySettings method for centralized safety settings
- Apply safety settings uniformly in sendCompletion for all models, including Gemini
- Ensure consistent safety settings application in getCompletion
- Update .env.example to clarify safety settings usage for both APIs
* feat: add tags property in Conversation model
* feat: add ConversationTag model
* feat: add the tags parameter to getConvosByPage
* feat: add API route to ConversationTag
* feat: add types of ConversationTag
* feat: add data access functions for conversation tags
* feat: add Bookmark table component
* feat: Add an action to bookmark
* feat: add Bookmark nav component
* fix: failed test
* refactor: made 'Saved' tag a constant
* feat: add new bookmark to current conversation
* chore: Add comment
* fix: delete tag from conversations when it's deleted
* fix: Update the query cache when the tag title is changed.
* chore: fix typo
* refactor: add description of rebuilding bookmarks
* chore: remove unused variables
* fix: position when adding a new bookmark
* refactor: add comment, rename a function
* refactor: add a unique constraint in ConversationTag
* chore: add localizations
* Allow LDAP login via username
This patch adds the option to login via username instead of using an
email address since the latter may not be unique or may change.
For example, our organization has two main domains and users have a log
and a short form of their mail address. This makes it hard for users to
identify what their primary email address is and causes a lot of
confusion. Using their username instead makes it much easier.
Using a username will also make it easier in the future to not need a
separate bind user to get user attributes. So, this is also a bit of
prep work for that.
* Update config.js
* feat: Enable LDAP login via username
This commit enables the option to login via username instead of using an email address for LDAP authentication. This change is necessary because email addresses may not be unique or may change, causing confusion for users. By using usernames, it becomes easier for users to identify their primary email address. Additionally, this change prepares for future improvements by eliminating the need for a separate bind user to retrieve user attributes.
Co-authored-by: Danny Avila <danny@librechat.ai>
* chore: jsdocs
* chore: import order
* ci: add ldap config tests
---------
Co-authored-by: Lars Kiesow <lkiesow@uos.de>
* chore: bump data-provider
* feat: Add anthropicSettings to endpointSettings
The commit adds the `anthropicSettings` object to the `endpointSettings` in the `schemas.ts` file. This allows for the configuration of settings specific to the `anthropic` model endpoint.
* chore: adjust maxoutputtokens localization
* feat: Update AnthropicClient to use anthropicSettings for default model options and increased output beta header
* ci: new anthropic tests
- Add unique index for messageId and user in messageSchema
- use `updateMessage` for updating the plugins message?
- add better logging for updateMessage
- prevents dupe_key or getKeyIndex error
* feat: `gpt-4o-mini`
* feat: retrival
* fix: Update order of model token values for 'gpt-4o' and 'gpt-4o-mini'
* fix: Update order of model token values for 'gpt-4o' and 'gpt-4o-mini'
* fix: Update order of model token values for 'gpt-4o' and 'gpt-4o-mini'
* fix: add jsdoc
* fix: Update order of model token values for 'gpt-4o' and 'gpt-4o-mini'
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: edge case with debugTraverse function in parsers.js
* chore: Update error message in audio stream processing
* refactor: Add ONE_MINUTE and THIRTY_SECONDS options to Time enum
* fix: logging
* fix: do not throw errors for invalid convo id, simply return undefined
* feat: Add error handling and logging to message route definitions
* feat: Refactor Message.js to improve code organization and readability
* fix: Return undefined instead of throwing error for invalid conversation ID in Message.spec.js
* feat: convert main component to float
* feat: convert the remaining components
* feat: use `recoilState` instead of `recoilValue`
* feat: replaced `AutoSendTextSwitch` to `AutoSendTextSelector`
* feat: use `autoSendText` in the `useSpeechToTextExternal` hook
* fix: `autoSendText` timeout
includedTools expects the pluginKey/tool.name for filtering included tools, which is incompatible with the previous implementation in loadAndFormatTools used for loading assistant tools.
This change uses both filename and tool.name for filtering tools in ToolService.loadAndFormatTools in order to make it compatible with the old implementation and the behaviour of plugin filtering.
Co-authored-by: Benedikt Nordhoff <benedikt.nordhoff@codecentric.de>
* fix: dropdown overflow
* fix: make dropdown work on mobile
* feat: update headlessui to 2.0 and use portal
* feat: rewrite modal using headlessui
* fix: applying of maxHeight
* fix: optimize backdrop for dark mode
* fix: rendering dropdown width
* feat: match small screen layout to radix-ui dialog
* revert: mobile modifications
* fix: modal animations
* fix: z-index
* chore: Migrate from HeadlessUI 1.0 to 2.0
* fix: h2 nesting
* fix: use lighter border for PopoverButtons
* feat: Move modal to the top if using a small screen
* fix: mobile position
* fix: frontend tests
* feat: use row layout in mobile instead of col
* fix: remove config path from tsconfig
* fix: fix dropdown tests (gpt4o ftw!)
* feat: Upgrade to latest headlessui version
* fix:test1
* fix: ThemeSelector test
* fix: re-add speech tab
* style: use pl and pr-3
* fix: speech tab dropdowns
* style: use maxHeight for language
* feat: convert DropdownNoState to v2.0
* fix: use v2 params for voiceDropdown
* style: reduce maxHeight for VoiceDropdown and set fixed width
* chore: rebuild package-lock
* style(fix): copy over the same styles for the settingsTab
* style(fix): use -top-1 for speech tabs
* style(fix): use max-w-[400px]
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix(Speech): speechTab settings update
* fix: get speech config; refactor: moved everything to types and removed file types; feature: not overriding variables selected by user
Related to #3261
Add proxy support to `downloadImage` function in `openidStrategy.js`
* Import `HttpsProxyAgent` from `https-proxy-agent`.
* Add `agent` property to the fetch options in `downloadImage` function if `process.env.PROXY` is set.
* Update the `fetch` call in `downloadImage` function to use the proxy agent if available.
* feat: update useTextToSpeech and useSpeechToText hooks to support external audio endpoints
This commit updates the useTextToSpeech and useSpeechToText hooks in the Input directory to support external audio endpoints. It introduces the useGetExternalTextToSpeech and useGetExternalSpeechToText hooks, which determine whether the audio endpoints should be set to 'browser' or 'external' based on the value of the endpointTTS and endpointSTT Recoil states. The useTextToSpeech and useSpeechToText hooks now use these new hooks to determine whether to use external audio endpoints
* feat: add userSelect style to ConversationModeSwitch label
* fix: remove unused updateTokenWebsocket function and import
The updateTokenWebsocket function and its import are no longer used in the OpenAIClient module. This commit removes the function and import to clean up the codebase
* feat: support external audio endpoints in useTextToSpeech and useSpeechToText hooks
This commit updates the useTextToSpeech and useSpeechToText hooks in the Input directory to support external audio endpoints. It introduces the useGetExternalTextToSpeech and useGetExternalSpeechToText hooks, which determine whether the audio endpoints should be set to 'browser' or 'external' based on the value of the endpointTTS and endpointSTT Recoil states. The useTextToSpeech and useSpeechToText hooks now use these new hooks to determine whether to use external audio endpoints
* feat: update AutomaticPlayback component to AutomaticPlaybackSwitch; tests: added AutomaticPlaybackSwitch.spec
>
> This commit renames the AutomaticPlayback component to AutomaticPlaybackSwitch in the Speech directory. The new name better reflects the purpose of the component and aligns with the naming convention used in the codebase.
* feat: update useSpeechToText hook to include interimTranscript
This commit updates the useSpeechToText hook in the client/src/components/Chat/Input/AudioRecorder.tsx file to include the interimTranscript state. This allows for real-time display of the speech-to-text transcription while the user is still speaking. The interimTranscript is now used to update the text area value during recording.
* feat: Add customConfigSpeech API endpoint for retrieving custom speech configuration
This commit adds a new API endpoint in the file under the directory. This endpoint is responsible for retrieving the custom speech configuration using the function from the module
* feat: update store var and ; fix: getCustomConfigSpeech
* fix: client tests, removed unused import
* feat: Update useCustomConfigSpeechQuery to return an array of custom speech configurations
This commit modifies the useCustomConfigSpeechQuery function in the client/src/data-provider/queries.ts file to return an array of custom speech configurations instead of a single object. This change allows for better handling and manipulation of the data in the application
* feat: Update useCustomConfigSpeechQuery to return an array of custom speech configurations
* refactor: Update variable name in speechTab schema
* refactor: removed unused and nested code
* fix: using recoilState
* refactor: Update Speech component to use useCallback for setting settings
* fix: test
* fix: tests
* feature: ensure that the settings don't change after modifying then through the UI
* remove comment
* fix: Handle error gracefully in getCustomConfigSpeech and getVoices endpoints
* fix: Handle error
* fix: backend tests
* fix: invalid custom config logging
* chore: add back custom config info logging
* chore: revert loadCustomConfig spec
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat(plugins): implement tool filtering in PluginsClient
Add functionality to filter tools based on filteredTools and includedTools
arrays in the request's app locals. This allows for dynamic tool selection
on a per-request basis, enhancing the flexibility of the plugin system.
* test(plugins): add unit tests for tool filtering in PluginsClient
Introduce comprehensive test suite for the new tool filtering feature
in PluginsClient. Cover scenarios including filtering out tools,
including specific tools, prioritization of includedTools over
filteredTools, and behavior when no filters are provided.
* chore: Remove unused legacy Conversation component and update imports
* refactor: optimize backend operations for client requests
* fix: message styling
* refactor: Improve handleKeyUp logic in StreamRunManager.js and handleText.js
* refactor: Improve handleKeyUp logic in StreamRunManager.js and handleText.js
* fix: clear new convo messages on clear all convos
* fix: forgot to pass userId to getConvo
* refactor: update getPartialText to send basePayload.text
* chore: Update prompt description placeholder text
* fix: promptsPathPattern to not include new
* feat: command input and styling change for prompt views
* fix: intended validation
* feat: prompts slash command
* chore: localizations and fix add command during creation
* refactor(PromptsCommand): better label
* feat: update `allPrompGroups` cache on all promptGroups mutations
* refactor: ensure assistants builder is first within sidepanel
* refactor: allow defining emailVerified via create-user script
* move shared conditions and early bail to reduce cognitive complexity, improve readability
* refactor: make condition as close to the original as possible
* chore: adjust comment in chat route
* style: fix original styling of non-multi messages
* refactor: separate messagerender logic from 'Message'
---------
Co-authored-by: RehaS <beratson@gmail.com>
* style: add scrollbar-gutter to prevent layout shift
* style: better styling for simple/advanced tab and remove border-r on smaller screens
* style: better description styling
* style: make sure single response Messages style is the same as pre-multi-stream response feature
* chore: comment back handlePlusCommand
* chore: ignore .git dir
* refactor: pass newConversation to `useSelectMention`
refactor: pass newConversation to Mention component
refactor: useChatFunctions for modular use of `ask` and `regenerate`
refactor: set latest message only for the first index in useChatFunctions
refactor: pass setLatestMessage to useChatFunctions
refactor: Pass setSubmission to useChatFunctions for submission handling
refactor: consolidate event handlers to separate hook from useSSE
WIP: additional response handlers
feat: responsive added convo, clears on new chat/navigating to chat, assistants excluded
feat: Add conversationByKeySelector to select any conversation by index
WIP: handle second submission with messages paired to root
* style: surface-primary-contrast
* refactor: remove unnecessary console.log statement in useChatFunctions
* refactor: Consolidate imports in ChatForm and Input hooks
* refactor: compositional usage of useSSE for multiple streams
* WIP: set latest 'multi' message
* WIP: first pass, added response streaming
* pass: performant multi-message stream
* fix: styling and message render
* second pass: modular, performant multi-stream
* fix: align parentMessageId of multiMessage
* refactor: move resetting latestMultiMessage
* chore: update footer text in Chat component
* fix: stop button styling
* fix: handle abortMessage request for multi-response
* clear messages but bug with latest message reset present
* fix: add delay for additional message generation
* fix: access LAST_CONVO_SETUP by index
* style: add div to prevent layout shift before hover buttons render
* chore: Update Message component styling for card messages
* chore: move hook use order
* fix: abort middleware using unsent field from req.body
* feat: support multi-response stream from initial message
* refactor: buildTree function to improve readability and remove unused code
* feat: add logger for frontend dev
* refactor: use depth to track if message is really last in its branch
* fix(buildTree): default export
* fix: share parent message Id and avoid duplication error for multi-response streams
* fix: prevent addedConvo reset to response convo
* feat: allow setting multi message as latest message to control which to respond to
* chore: wrap setSiblingIdxRev with useCallback
* chore: styling and allow editing messages
* style: styling fixes
* feat: Add "AddMultiConvo" component to Chat Header
* feat: prevent clearing added convos on endpoint, preset, mention, or modelSpec switch
* fix: message styling fixes, mainly related to code blocks
* fix: stop button visibility logic
* fix: Handle edge case in abortMiddleware for non-existant `abortControllers`
* refactor: optimize/memoize icons
* chore(GoogleClient): change info to debug logs
* style: active message styling
* style: prevent layout shift due to placeholder row
* chore: remove unused code
* fix: Update BaseClient to handle optional request body properties
* fix(ci): `onStart` now accepts 2 args, the 2nd being responseMessageId
* chore: bump data-provider
* 🌏 i18n: Improve clarity of English translation
* 🔧 fix(useCategories): replace i18n string to `com_ui_select_a_category`
* 🔨 refactor: avoid using placeholder strings where possible
This commit simplifies the internationalization approach for English language strings by removing the placeholder ones where they are used only once. This makes proper localization possible for Russian language, and possibly others.
Also renamed `com_ui_text_prompt` to `com_ui_prompt_text` to match the alphabetical order.
* 🎨 style(CreatePromptForm): add missing margin-top to the submit button
* chore: add detailed logs
* feat: added a variable to specify which attributes to be stored
* chore: Add new optiona variables
* refactor: change BIND_DN as an option
* chore: revert commits that fail testing
* refactor: use ldapid to retrieve users
* chore: remove unused variable
* chore: reverting unintended changes
* fix: return 404 if authentication fails, in accordance with requireLocalAuth.
* fix: handling when ldap settings do not exist
* chore: remove unnecessary check
* refactor: add error handling in Share model
* refactor: add error handing to API routers
* refactor: display error message when API response is an error
* chore: remove unneccesary JSON.stringify
* chore: revert unintended changes
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* 🗨️ feat: Prompts (#7)
* WIP: MERGE prompts/frontend (#1)
* added schema for prompt and promptgroup, added model methods for prompts, added routes for prompts
* * updated promptGroup Schema
* updated model methods for prompts (get, add, delete)
* slight fixes in prompt routes
* * Created Files Management components
* Created Vector Stores components
* Added file management route in the routes folder
* Completed UI for Files list, Compeleted UI for vector stores list, Completed UI for upload file modal, Completed UI for preview file, Completed UI for preview vector store
* Fixed style and UI fixes for file dashboard, file list and vector stores list
* added responsiveness classes for vector store page
* fixed responsiveness of file page, dashboard page, and main page
* fixed styling and responsiveness issues on dashboard page, file list page and vector store page
* added queries and mutations for prompts and promptGroups, added relevant endpoints in data-provider, added relevant components prompts, added and updated relevant APIs
* added types on mutation queries data service, updated prompt attributes
* feature: Prompts and prompt groups management, added relevant APIs, added types for data service/queries/mutations, added relevant mutation and queries
* chore: typing clarifications
* added drop down on prompts mgmt dashboard
* Fixes: fixed version switching issue on tags update or labels update, added cross button on create prompt group, fixed list updation on prompt group renaiming, added CSV upload button
* Feature: Added oneliner and category attributes in prompt group, added schema for categories, added schema methods and route for categories
* chore: typing and lint issues
* chore: more type and linter fixes
* chore: linting
* chore: prompt controller and backend typing example; MOVE TO CONTROLLER DIRECTORY
* chore: more type fixes
* style: prompt name changes
* chore: more type changes, and stateful prompt name change without flickering
* fix: Return result of savePrompt in patchPrompt API endpoint
* fix: navigation prompt queries; refactor: name 'prompt-groups' to just 'groups'
* refactor: fetch prompt groups rewrite
* refactor(prompts): query/mutation statefulness
* refactor: remove `isActive` field
* refactor: remove labels, consolidate logic
* style: width, layout shift
* refactor: improve hover toggle behavior and styling
* refactor: add useParams hook to PromptListItem for dynamic rendering and add timeout ref for blur timeout
* chore: hide upload button
* refactor: import Button component from correct location in PromptSidePanel
* style: prompt editor styling
* style: fix more layout shifts
* style: container scroll
* refactor: Rename CreatePrompt component to CreatePromptForm
* refactor: use react-hook-form
* refactor: Add Prompts components and routes to Dashboard
* style: skeletons for loading
* fix: optimize makePromptProduction
* refactor: consolidate variables
* feat: create prompt form validation
* refactor: Consolidate variables and update mutation hooks
* style: minor touchups
* chore: Update lucide-react npm dependency to version 0.394.0 and npm audit fix
* refactor: add a new icon for the Prompts heading.
* style: Update PromptsView heading to use h1 instead of h2 and other minor margin issues
* chore: wording
* refactor: Update PromptsView heading to use h1 instead of h2, consolidate variables, and add new icons
* refactor: Prompts Button for Mobile
* feature: added category field in prompt group, added relevant API and static data on BE to support FE UI for category in prompt group
* chore: template for prompt cards
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* WIP: Prompts/frontend Continued (#2)
* chore: loading style, remove unused component
* feat: Add CategorySelector component for prompt group category selection
* feat: add categories to create prompt
* feat: prompt versions styling
* feat: optimistic updates for prompt production state
* refactor: optimize form state and show if prompt field is dirty with cross icon, also other styling changes
* chore: remove unused code and localizations
* fix: light mode styling
* WIP: SidePanel Prompts
* refactor: move to groups directory
* refactor: rename GroupsSidePanel to GroupSidePanel and update imports
* style: ListCard
* refactor: isProduction changes
* refactor: infinite query with productionPrompt
* refactor: optimize snippets and prompts, and styling
* refactor: Update getSnippet function to accept a length parameter
* chore: localizations
* feat: prompts navigation to chat and vice versa
* fix: create prompt
* feat: remember last selected category for creating prompts
* fix(promptGroups): fix pagination and add usePromptGroupsNav hook
* Prompts/frontend 3 (#3)
* fix: stateful issues with prompt groups
* style: improved layout
* refactor: improve variable naming in Eng.ts
* refactor: theme selector styling improvements
* added prompt cards on chat new page, with dark mode, added API to fetch random prompts, added types for useQuery
Slightly improved usePromptGroupNav logic to fetch updated result for pageSize, updated prompt cards view with darkmode and responsiveness
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
fixed page size option buttons styling to match the theme
added dark mode on create prompt page and prompt edit/preview page
* WIP: Prompts/frontend (#4)
* fix: optimize and fix paginated query
* fix: remove unique constraint on names
* refactor: button links and styling
* style: menu border light mode
* feat: Add Auto-Send Switch component for prompts groups
* refactor(ChatView): use form context for submission text
* chore: clear convo state on navigation to dashboard routes
* chore: save prompt edit name on tab, remove console log
* feat: basic prompt submission
* refactor: move Auto-Send Switch
* style(ListCard): border styling
* feat: Add function to detect variables in text
* feat: Add OriginalDialog component to UI library
* chore(ui): Update SelectDropDown options list class to use text-xs size
* refactor: submitMessage hook now includes submitPrompt, make compatible to document query selector
* WIP: Variable Dialog
* feat: variable submission working for both auto-send and non-autosend
* feat: dashboard breadcrumbs and prompts/chat navigation
* refactor: dashboard breadcrumb and dashboard link to chat navigation
* refactor: Update VariableDialog and VariableForm styles
* Prompts: Admin features (#5)
* fix: link issue
* fix: usePromptGroupsNav add missing dep.
* style: dashbreadcrumb and sidepanel text color
* temp fix: remove refetch on pageNumber change
* fix: handle multiple variable replacement
* WIP: create project schema and add project groups to fetch
* feat: Add functionality to add prompt group IDs to a project
* feat: Add caching for startup config in config route
* chore: remove prompt landing
* style: Update Skeleton component with additional background styling
* chore: styling and types
* WIP: SharePrompt first draft
* feat(SharePrompt): form validation
* feat: shared global indicators
* refactor: prompt details
* refactor: change NoPromptGroup directory
* feat: preview prompt
* feat: remove/add global prompts, add rbac-related enums
* refactor: manage prompts location
* WIP: first draft admin settings for prompts
* feat: SystemRoles enum
* refactor: update PromptDetails component styling
* style: ellipsis custom class for showing more preview text
* WIP: initial role schema and initialization
* style: improved margins for single unordered lists
* fix: use custom chat form context to prevent re-renders from FormProvider
* feat: Role mutations for Prompt Permissions
* feat: fetch user role
* feat: update AdminSettings form default values from user role values
* refactor: rename PromptPermissions to Permissions for general definitions
* feat: initial role checks
* feat: Add optional `bodyProps` parameter to generateCheckAccess middleware
* refactor: UI access checks
* Prompts: delete (#6)
* Fixed delete prompt version API, fixed types and logic for prompt version deletion, updated prompt delete mutation logic
* chore: Update return type of deletePrompt function in Prompt.js
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* chore: Update package-lock.json version to 0.7.4-rc1 and fast-xml-parser to 4.4.0
* feat: toast for saving admin settings, add timer no-access navigation
* feat: always make prod
* feat: Add localization to category labels in CategorySelector component
* feat: Update category label localization in CategorySelector component
* fix: Enable making prompt production in Prompt API
---------
Co-authored-by: Fawadpot <contactfawada@gmail.com>
* feat: Add helper fn for dark mode detection in ThemeProvider
* style: surface-primary definition
* fix(useHasAccess): utilize user.role and not just USER role
* fix: empty category and role fetch
* refactort: increase max height to options list and use label if no localization is found
* fix: update CategorySelector to handle empty category value and improve localization
* refactor: move prompts to own store/reactquery modules, add in filter WIP
* refactor: Rename AutoSendSwitch to AutoSendPrompt
* style: theming commit
* style: fix slight coloring issue for convos in dark mode
* style: better composition for prompts side panel
* style: remove gray-750 and make it gray-850
* chore: adjust theming
* feat: filter all prompt groups and properly remove prompts from projects
* refactor: optimize delete prompt groups further
* chore: localization
* feat: Add uniqueProperty filtering to normalizeData function
* WIP: filter prompts
* chore: Update FilterPrompts component to include User icon in FilterItem
* feat(FilterPrompts): set categories
* feat: more system filters and show selected category icon
* style: always make prod, flips switch to avoid mis-clicks
* style: ui/ux loading/no prompts
* chore: style FilterPrompts ChatView
* fix: handle missing role edge case
* style: special variables
* feat: special variables
* refactor: improve replaceSpecialVars function in prompts.ts
* feat: simple/advanced editor modes
* chore: bump versions
* feat: localizations and hide production button on simple mode
* fix: error connecting layout shift
* fix: prompts CRUD for admins
* fix: secure single group fetch
* style: sidepanel styling
* style(PromptName): bring edit button closer to name
* style: mobile prompts header
* style: mobile prompts header continued
* style: align send prompts switch right
* feat: description
* Update special variables description in Eng.ts
* feat: update/create/preview oneliner
* fix: allow empty oneliner update
* style: loading improvement and always make selected prompt Production if simple mode
* fix: production index set and remove unused props
* fix(ci): mock initializeRoles
* fix: address #3128
* fix: address #3128
* feat: add deletion confirmation dialog
* fix: mobile UI issues
* style: prompt library UI update
* style: focus, logcal tab order
* style: Refactor SelectDropDown component to improve code readability and maintainability
* chore: bump data-provider
* chore: fix labels
* refactor: confirm delete prompt version
---------
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
Related to #3084
Implements URL encoding for email addresses in verification links and decodes them upon verification.
- **Encode email addresses** in `sendVerificationEmail` and `resendVerificationEmail` functions using `encodeURIComponent` to ensure special characters like `+` are correctly handled in the verification link.
- **Decode email addresses** in the `verifyEmail` function using `decodeURIComponent` to accurately retrieve and validate the email address from the verification link against the database.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/danny-avila/LibreChat/issues/3084?shareId=9c32df30-4156-4082-a3eb-fff54eaba5b3).
* Google tag manager integration
* change location of react-gtm-module package
* refactor: move react-gtm-module usage from Chat/Footer to useAppStartup hook
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* feat: Add index to conversationId field in messageSchema
* refactor: prevent immediate event close on error
* refactor: use undici instead of node-fetch in non-Bun environment
* feat: added "Save draft locally" to Message settings
* feat: add hook to save chat input as draft every second
* fix: use filepath if the file does not have a preview prop
* fix: not to delete temporary files when navigating to a new chat
* chore: translations
* chore: import order
* chore: import order
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* fix: user.id assignment in jwtStrategy.js
* refactor(sendEmail): pass params as object, await email sending to propogate errors and restrict registration flow
* fix(Conversations): handle missing updatedAt field
* refactor: use `processDeleteRequest` when deleting user account for user file deletion
* refactor: delete orphaned files when deleting user account
* fix: remove unnecessary 404 status code in server/index.js
* feat: verification email
* chore: email verification invalid; localize: update
* fix: redirect to login when signup: fix: save emailVerified correctly
* docs: update ALLOW_UNVERIFIED_EMAIL_LOGIN; fix: don't accept login only when ALLOW_UNVERIFIED_EMAIL_LOGIN = true
* fix: user needs to be authenticated
* style: update
* fix: registration success message and redirect logic
* refactor: use `isEnabled` in ALLOW_UNVERIFIED_EMAIL_LOGIN
* refactor: move checkEmailConfig to server/utils
* refactor: use req as param for verifyEmail function
* chore: jsdoc
* chore: remove console log
* refactor: rename `createNewUser` to `createSocialUser`
* refactor: update typing and add expiresAt field to userSchema
* refactor: begin use of user methods over direct model access for User
* refactor: initial email verification rewrite
* chore: typing
* refactor: registration flow rewrite
* chore: remove help center text
* refactor: update getUser to getUserById and add findUser methods. general fixes from recent changes
* refactor: Update updateUser method to remove expiresAt field and use $set and $unset operations, createUser now returns Id only
* refactor: Update openidStrategy to use optional chaining for avatar check, move saveBuffer init to buffer condition
* refactor: logout on deleteUser mutatation
* refactor: Update openidStrategy login success message format
* refactor: Add emailVerified field to Discord and Facebook profile details
* refactor: move limiters to separate middleware dir
* refactor: Add limiters for email verification and password reset
* refactor: Remove getUserController and update routes and controllers accordingly
* refactor: Update getUserById method to exclude password and version fields
* refactor: move verification to user route, add resend verification option
* refactor: Improve email verification process and resend option
* refactor: remove more direct model access of User and remove unused code
* refactor: replace user authentication methods and token generation
* fix: add user.id to jwt user
* refactor: Update AuthContext to include setError function, add resend link to Login Form, make registration redirect shorter
* fix(updateUserPluginsService): ensure userPlugins variable is defined
* refactor: Delete all shared links for a specific user
* fix: remove use of direct User.save() in handleExistingUser
* fix(importLibreChatConvo): handle missing createdAt field in messages
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor: checking `ALLOW_SOCIAL_REGISTRATION` with `isEnabled`
* feat: Add findUserByEmail function to UserService
This commit adds a new function, , to the module. This function retrieves a user document from the database based on the provided email. It returns the user document if found, otherwise it returns null. If there is a problem during user retrieval, an error is thrown.
* refactor: add socialLogin to remove repetitive code
* feat: password reset disable option; fix: account email leak
* fix(LoginSpec): typo
* test: fixed LoginForm test
* fix: disable password reset when undefined
* refactor: use a helper function
* fix: tests
* feat: Remove unused error message in password reset process
* chore: Update password reset email message
* refactor: only allow password reset if explicitly allowed
* feat: Add password reset email service configuration check
The code changes in `checks.js` add a new function `checkPasswordReset()` that checks if the email service is configured when password reset is enabled. If the email service is not configured, a warning message is logged. This change ensures secure password reset functionality by prompting the user to configure the email service.
Co-authored-by: Berry-13 <root@Berry>
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* chore: remove import order rules
* refactor: simplify password reset logic and align against Observable Response Discrepancy
* chore: make password reset warning more prominent
* chore(AuthService): better logging for password resets, refactor requestPasswordReset to use req object, fix sendEmail error when email config is not present
* refactor: fix styling of password reset email message
* chore: add missing type for passwordResetEnabled, TStartupConfig
* fix(LoginForm): prevent login form flickering
* fix(ci): Update login form to use mocked startupConfig for rendering correctly
* refactor: Improve password reset UI, applies DRY
* chore: Add logging to password reset validation middleware
* chore(CONTRIBUTING): Update import order conventions
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
Co-authored-by: Berry-13 <root@Berry>
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* initial commit
* fix: UserController bugs; fix: lint errors
* fix: delete files
* language support
* style(DeleteAccount): update to the latest style
* style: fix after merge main
* chore: Add canDeleteAccount middleware for user deletion endpoint
* chore: renamed to ALLOW_ACCOUNT_DELETION
* fix(canDeleteAccount): use uppercase admin role
* chore: imports order
* chore: Enable account deletion by default if omitted/commented out
* chore: Add logging for user account deletion
* chore: Bump data-provider package version to 0.6.6
* chore: Import Transaction model in UserController
* chore: Update CONFIG_VERSION to 1.1.4
* chore: Update user account deletion logging
* chore: Refactor user account deletion logic
---------
Co-authored-by: Berry-13 <root@Berry>
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
The useMentions hook in the client/src/hooks/Input/useMentions.ts file has been updated to handle cases where the assistant lists for the endpoints 'assistants' and 'azureAssistants' are empty. This change ensures that the hook does not throw an error when attempting to access assistantListMap[EModelEndpoint.assistants] or assistantListMap[EModelEndpoint.azureAssistants]. Instead, it defaults to an empty array for these cases.
* Added necessary "ports" section for it to work by default
* Added (commented out) example GCP Vertex volume mount for auth config and for ENV variable.
* refactor(EditPresetDialog): dynamically update current editable preset model on endpoint change
* feat: Add null check for models in EditPresetDialog
* chore(AlertDialogPortal): typing
* fix(EditPresetDialog): prevent Unknown endpoint edge case for custom endpoints
* fix: remove double initialization of speech routes
* refactor(useMessageHelpers): more consistent latestMessage updates based on unique textKey and early returns when setting
* feat: TTS/STT rate limiters
* chore: remove console log
* fix: make modular chat true by default
* refactor(ToolService): streamline logging and tool error handling, also ensure generated outputs always have `output` field
* refactor(useSSE): error message for server connection issue
* refactor: add back capture group of sensitive information.js
* hotfix: cohere chinese character unicode issue, return aggregated reply
* chore: remove unused code
* refactor: Update NewChatButtonIcon component to use JSX syntax
The NewChatButtonIcon component in the Nav folder has been updated to use JSX syntax instead of calling the Icon function directly. This change improves code readability and maintainability.
* remove use memo
* refactor: allow passing `select` to messages db query
* fix: initial fix for non-recursive messages
* ci: first pass, importers test rewrite
* fix(groupConversationsByDate): handle edge case of conversation.updatedAt being null
* fix: correctly handle non-recursive uploads
* feat: imports non-recursive conversations with branches correctly
* feat: support retaining original options on import
* refactor: Allow `messageTree` field for Import of non-recursive conversations
* 🚑 fix: re-fetch messages when exporting
* Revert "🚑 fix: re-fetch messages when exporting"
This reverts commit 693b86e955.
* 🚑 fix: use the same logic to get export data as useChatHelper
* refactor(useExportConversation): use query cache to build messages tree on request
* chore: organize imports
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* chore: use node-fetch for OpenAIClient fetch key for non-crashing usage of AbortController in Bun runtime
* chore: variable order
* fix(useSSE): prevent finalHandler call in abortConversation to update messages/conversation after user navigated away
* chore: params order
* refactor: organize intermediate message logic and ensure correct variables are passed
* fix: Add stt and tts routes before upload limiters, prevent bans
* fix(abortRun): temp fix to delete unfinished messages to avoid message thread parent relationship issues
* refactor: Update AnthropicClient to use node-fetch for fetch key and add proxy support
* fix(gptPlugins): ensure parentMessageId/messageId relationship is maintained
* feat(BaseClient): custom fetch function to analyze/edit payloads just before sending (also prevents abortController crash on Bun runtime)
* feat: `directEndpoint` and `titleMessageRole` custom endpoint options
* chore: Bump version to 0.6.6 in data-provider package.json
* 🔧 fix: prevent unnecessary re-rendering of components using useLocalize hook
The useLocalize hook now uses useCallback to create a memoized version of the localize function. This will prevent unnecessary recalculations when the language value changes.
* 🚑 fix: not reset the bodyText if it has a value set.
* ♻️ refactor: Login form improvement
* display error message when API is down
* add loading animation to Login form while fetching data
* optimize startupConfig to fetch data only on initial render to prevent unnecessary API calls
* 🚑 fix: clear authentication error messages on successful login
* ♻️ refactor: componentize duplicate codes on registration and login screens
* chore: update types
* refactor: layout rendering order
* refactor: startup title fix
* refactor: reset/request-reset-password under new AuthLayout
* ci: fix Login.spec.ts
* ci: fix registration.spec.tsx
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* An issue where the InfiniteQuery was missing data
* Post add/delete operations, inconsistencies between client-side data structures and the database could lead to data being missed or duplicated.
* To address this, implemented normalization of client data following add/delete operations.
* performed refetching of data in the last page when necessary to ensure consistency.
* fix: hide audio element on mobile
* chore: add tts docs link
* fix: select voice option on first render
* fix: NotAllowedError, prevent async playback for mobile triggers, consolidate MessageAudio code, user user-triggered unmutes
* fix: Firefox/unsupported type for MediaSource hack
* refactor(STT): make icon red when recording. consolidate logic to AudioRecorder component
* fix: revert Redis changes to use separate client for sessions
* fix: voice setting for autoplayback TTS
* fix(useTextToSpeechExternal): resolve stateful playback issues and consolidate state logic
* refactor: initialize tts voice and provider schema once per request
* fix(tts): edge case, longer text inputs. TODO: use continuous stream for longer text inputs
* fix(tts): pause global audio on conversation change
* refactor: keyvMongo ban cache to allow db updates for unbanning, to prevent server restart
* chore: eslint fix
* refactor: make ban cache exclusively keyvMongo
* Update TextChat.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SubmitButton.jsx
* Create ListeningIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update ListeningIcon.tsx
* Update ListeningIcon.tsx
* Create SpeechRecognition.tsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Create SpeechSynthesis.tsx
* Update index.jsx
* Update SpeechSynthesis.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Squashed commit of the following:
commit 28230d9305
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5a
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d3050
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675b
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a2
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704f
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f381
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe411569
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a569020312
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d4683
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f1
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c752
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d307
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa76
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c21
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a97
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d88
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc78
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
* Create VolumeMuteIcon.tsx
* Create VolumeIcon.tsx
* Update index.ts
* Update SubmitButton.jsx
* Update SubmitButton.jsx
* Update TextChat.jsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update SpeechRecognition.tsx
* Update TextChat.jsx
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update useServerStream.ts
* Update useServerStream.ts
* Update HoverButtons.tsx
* Update VolumeIcon.tsx
* Update VolumeMuteIcon.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update SpeechSynthesis.tsx
* Update HoverButtons.tsx
* Update SpeechSynthesis.tsx
* Update package.json
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Update SpeechRecognition.tsx
* Squashed commit of the following:
commit 1019529634
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:12:14 2023 -0500
Update SpeechRecognition.tsx
commit 67f111ccd0
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:08:48 2023 -0500
Update SpeechRecognition.tsx
commit 0b35dbe196
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 23:04:50 2023 -0500
Update SpeechRecognition.tsx
commit 6686126dc0
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:49:08 2023 -0500
Update SpeechRecognition.tsx
commit 5b80ddfba7
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:45:02 2023 -0500
Update package.json
commit 39e84efa81
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:35:48 2023 -0500
Update SpeechSynthesis.tsx
commit 4c6d067cb9
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:24:29 2023 -0500
Update HoverButtons.tsx
commit c5ce576fb8
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:13:20 2023 -0500
Update SpeechSynthesis.tsx
commit d95fa19539
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:11:38 2023 -0500
Update SpeechSynthesis.tsx
commit c794f07678
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 22:03:34 2023 -0500
Update HoverButtons.tsx
commit 7ae0e7e97c
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:59:45 2023 -0500
Update HoverButtons.tsx
commit e9882dedad
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:58:07 2023 -0500
Update SpeechSynthesis.tsx
commit 95cf300782
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:44:49 2023 -0500
Update HoverButtons.tsx
commit 37c828d7fb
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:30:34 2023 -0500
Update VolumeMuteIcon.tsx
commit 6133531737
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:29:54 2023 -0500
Update VolumeIcon.tsx
commit 4b4afcdd37
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 21:20:14 2023 -0500
Update HoverButtons.tsx
commit 609d1dfefb
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:49:52 2023 -0500
Update useServerStream.ts
commit 875ce4b77e
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:48:26 2023 -0500
Update useServerStream.ts
commit 8ed04e496b
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:37:59 2023 -0500
Update HoverButtons.tsx
commit 4b30c132df
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:14:01 2023 -0500
Update useServerStream.ts
commit c041c329cf
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 20:07:14 2023 -0500
Update useServerStream.ts
commit 3e36c16817
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:36:21 2023 -0500
Update HoverButtons.tsx
commit c7eea96759
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:28:03 2023 -0500
Update TextChat.jsx
commit 5542f8e85d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:21:50 2023 -0500
Update SpeechRecognition.tsx
commit 9a27e56f8b
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:16:01 2023 -0500
Update TextChat.jsx
commit 7f101bd122
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:09:51 2023 -0500
Update SpeechRecognition.tsx
commit d405454bf5
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:03:34 2023 -0500
Update SpeechRecognition.tsx
commit 6033eb3ed1
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 19:01:06 2023 -0500
Update TextChat.jsx
commit 9a3e67fcd2
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 18:53:19 2023 -0500
Update TextChat.jsx
commit 6583877cb3
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:53:18 2023 -0500
Update SubmitButton.jsx
commit 8d5114bfae
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:39:20 2023 -0500
Update SubmitButton.jsx
commit 29a5b55883
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:28:03 2023 -0500
Update index.ts
commit b03001d01d
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:25:43 2023 -0500
Create VolumeIcon.tsx
commit 863af2c959
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 17:21:43 2023 -0500
Create VolumeMuteIcon.tsx
commit ad3c78f867
Merge: ed4b25b228230d93
Author: bsu3338 <bsu3338@users.noreply.github.com>
Date: Sun Sep 3 16:49:56 2023 -0500
Merge branch 'danny-avila:main' into Speech-September
commit ed4b25b2c1
Author: bsu3338 <bsu3338@yahoo.com>
Date: Sun Sep 3 16:49:03 2023 -0500
Squashed commit of the following:
commit 28230d9305
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5a
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d3050
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675b
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a2
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704f
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f381
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe411569
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a569020312
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d4683
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
commit d38e463d34
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 13:44:40 2023 -0400
fix(bingAI): markdown and error formatting for final stream response (#829)
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
commit 7dc27b10f1
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 22 18:44:59 2023 -0400
feat: Edit AI Messages, Edit Messages in Place (#825)
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
commit db77163f5d
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 22 14:15:14 2023 +0200
docs: update chimeragpt (#826)
* Update free_ai_apis.md
* Update free_ai_apis.md
commit 4a4e803df3
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 21 20:15:18 2023 +0200
style(Dialog): Improved Close Button ("X") position (#824)
commit 909b00c752
Author: Daniel Avila <messagedaniel@protonmail.com>
Date: Sun Aug 20 21:04:36 2023 -0400
fix(HoverButtons): light/dark styling to match official site
commit 61dcb4d307
Author: Naosuke Yokoe <ankerasoy@gmail.com>
Date: Sat Aug 19 20:11:31 2023 +0900
feat: Azure Cognitive Search Plugin (#815)
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
commit 3c7f67fa76
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:40:33 2023 -0400
fix(abortMiddleware): handle early abort error where userMessage.conversationId is undefined. In this case, the userId will be used as the abortKey
commit c74c68a135
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:10:30 2023 -0400
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
commit 8b4d3c2c21
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:04:29 2023 -0400
refactor(routes): convert to TS
commit d612cfcb45
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 18 12:02:39 2023 -0400
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
commit c40b95f424
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 18 16:11:00 2023 +0200
feat: Disable Registration with social login (#813)
* Google, Github and Discord
* update .env.example with ALLOW_SOCIAL_REGISTRATION
* fix some conflict
* refactor strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit 46ed5aaccd
Author: Patrick <psarnowski@gmail.com>
Date: Fri Aug 18 09:38:24 2023 -0400
Show the response scores from Bing. (#814)
commit 1dacfa49f0
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 17 20:32:31 2023 +0200
update profile picture (#792)
commit afd43afb60
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 17 12:50:05 2023 -0400
feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808)
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
commit ae5b7d3d53
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Tue Aug 15 18:27:54 2023 -0400
fix(PluginsClient.js): fix ChatOpenAI Azure Config Issue (#812)
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
commit b85f3bf91e
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Tue Aug 15 18:42:24 2023 +0200
update from lang to localize (#810)
commit 80aab73bf6
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:19:04 2023 -0400
chore: rebuilt package-lock file
commit bbe4931a97
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Mon Aug 14 19:13:24 2023 -0400
refactor(ScreenshotContext): use html-to-image for lighter bundle, faster processing
commit 74802dd720
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 14 17:51:03 2023 +0200
chore: Translation Fixes, Lint Error Corrections, and Additional Translations (#788)
* fix translation and small lint error
* changed from localize to useLocalize hook
* changed to useLocalize
commit b64cc71d88
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:23:00 2023 -0400
chore(docker-compose.yml): comment out meilisearch ports in docker-compose.yml (#807)
commit 89f260bc78
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 10:12:00 2023 -0400
fix(CodeBlock.tsx): fix copy-to-clipboard functionality. The code has been updated to use the copy function from the copy-to-clipboard library instead of the (#806)
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
commit d00c7354cd
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 14 09:45:44 2023 -0400
fix: Corrected Registration Validation, Case-Insensitive Variable Handling, Playwright workflow (#805)
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
commit 1aa4b34dc6
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 11 19:02:52 2023 +0200
added the dot (.) username rules (#787)
commit 28230d9305
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Sun Sep 3 02:44:26 2023 +0200
feat: delete button confirm (#875)
* base for confirm delete
* more like OpenAI
commit 2b54e3f9fe
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 14:20:51 2023 -0400
update: install script (#858)
commit 1cd0fd9d5a
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Fri Sep 1 08:12:35 2023 -0400
doc: Hugging Face Deployment (#867)
* docs: update ToC
* docs: update ToC
* update huggingface.md
* update render.md
* update huggingface.md
* update mongodb.md
* update huggingface.md
* update README.md
commit aeeb3d3050
Author: Mu Yuan <yuanmu.email@gmail.com>
Date: Thu Aug 31 07:21:27 2023 +0800
Update Zh.tsx (#862)
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
commit 80e2e2675b
Author: Raí <140329135+itzraiss@users.noreply.github.com>
Date: Mon Aug 28 18:05:46 2023 -0300
Translation of 'com_ui_pay_per_call:' to Spanish and Portuguese that were missing. (#857)
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
* Update Es.tsx
commit 3574d0b823
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:49:26 2023 -0400
docs: make_your_own.md formatting fix for mkdocs (#855)
commit d672ac690d
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 14:24:10 2023 -0400
Release v0.5.8 (#854)
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
commit d3e7627046
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Mon Aug 28 12:03:08 2023 -0400
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
commit 66b8580487
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Mon Aug 28 09:18:25 2023 -0400
docs: third-party tools (#848)
* docs: third-party tools
* docs: third-party tools
* Update third-party.md
* Update third-party.md
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
commit 9791a78161
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Mon Aug 28 15:14:05 2023 +0200
adjust the animation (#843)
commit 3797ec6082
Author: Ronith <87087292+ronith256@users.noreply.github.com>
Date: Mon Aug 28 18:43:50 2023 +0530
feat: Add Code Interpreter Plugin (#837)
* feat: Add Code Interpreter Plugin
Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment
## Issues
- Code execution is not sandboxed.
* Add Docker Sandbox for Python Server
commit e2397076a2
Author: Alex Zhang <ztc2011@gmail.com>
Date: Mon Aug 28 00:55:34 2023 +0800
🌐: Chinese Translation (#846)
commit 50c15c704f
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:59 2023 -0400
Language translation: Polish (#840)
* Language translation: Polish
* Language translation: Polish
* Revert changes in language-contributions.md
commit 29d3640546
Author: Fuegovic <32828263+fuegovic@users.noreply.github.com>
Date: Sat Aug 26 19:36:25 2023 -0400
docs: updates (#841)
commit 39c626aa8e
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:29:19 2023 -0400
fix: isEdited edge case where latest Message is not saved due to aborting too quickly
commit ae5c06f381
Author: Danny Avila <messagedaniel@protonmail.com>
Date: Fri Aug 25 09:13:50 2023 -0400
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
commit 9ef1686e18
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Thu Aug 24 20:24:47 2023 -0400
Update mkdocs.yml
commit 5bbe411569
Author: Flynn <dev@flynnbuckingham.com>
Date: Thu Aug 24 20:20:37 2023 -0400
Add podman installation instructions. Update dockerfile to stub env (#819)
* Added podman container installation docs. Updated dockerfile to stub env file if not present in source
* Fix typos
commit 887fec99ca
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:11:27 2023 +0200
🌐: Russian Translation (#830)
commit 007d51ede1
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Fri Aug 25 02:10:48 2023 +0200
feat: facebook login (#820)
* Facebook strategy
* Update user_auth_system.md
* Update user_auth_system.md
commit a569020312
Author: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Date: Thu Aug 24 21:59:11 2023 +0200
Fix Meilisearch error and refactor of the server index.js (#832)
* fix meilisearch error at startup
* limit the nesting
* disable useless console log
* fix(indexSync.js): removed redundant searchEnabled
* refactor(index.js): moved configureSocialLogins to a new file
* refactor(socialLogins.js): removed unnecessary conditional
commit 37347d4683
Author: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Date: Wed Aug 23 16:14:17 2023 -0400
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex …
* Update package-lock.json
* Update SubmitButton.tsx
* Update SpeechRecognition.tsx
* fix: typescript error
* style: moved to new UI
* fix:(SpeechRecognition) lint error
* moved everything to hooks
* feat: support stt external
* fix(useExternalSpeechRecognition): recording the audio
* feat: whisper api support
* refactor(SpeechReecognition); fix(HoverButtons): set isSpeakling correctly
* fix: spelling errors
* fix: renamed files
* BIG FIX
* feat: whisper support
* fixed some ChatForm bugs and added the tts route
* handling more errors
* Fix audio stream initialization and cleanup in useSpeechToTextExternal
* feat: Elevenlabs TTS
* fixed some req issues
* fix: stt not activating on Mac
* fix: send audio blob to frontend
* fix(ChatForm): startupConfig var
* Update text-to-speech and speech-to-text services
* handle more errors correctly
* Remove console.log statements
* feat: added manual trigger with button
* fix: SpeechToText and SpeechToTextExernal + AudioRecorder
* refactor: TTS component
* chore: removed unused variable
* feat: azure stt
* feat: dedicated speech panel
* feat: STT button switch: fix: TextArea pr value adapted
* refactor: textToSpeech function and useTextToSpeechMutation
* fix: typo data-service
* fix: blob backend to frontend
* feat: TTS button for external
* feat: librechat.yaml
* style: spinner when loading TTS
* feat: hold click to download file
* style: disabled when apiKey not provided
* fix: typo startupConfig?.speechToTextExternal
* style: update icons
* fix(useTextToSpeech): set isSpeaking when audio finish
* fix: small issues with local TTS
* style: update settings dark theme
* docs: STT & TTS
* WIP: chat audio automatic; docs(custom_config): update to new .yaml version; chore: updated librechat.yaml version
* fix: send button disabled
* fix: interval update
* localization
* removed unused test code
* revert interval update to 100
* feat: auto-send message
* fix: chat audio automatic, default false
* refactor: moved all logic to hooks
* chore: renamed ChatAudio to conversationMode
* refactor: organized Speech panel
* feat: autoSendText switch
* feat: moved chataudio to conversationMode and improved error handling; docs: update localai model
* refactor: Auto transcribe audio
* test: AutoSendTextSwitch, AutoTranscribeAudioSwitch and ConversationModeSwitch.spec: refactor: removed hark
* fix: various speechTab fixes
* refactor(useSpeechToTextBrowser):: handle more errors
* feat: engine select
* feat: advanced mode
* chore: converted hooks to TS
* feat: cache TTS
* feat: delete cache; fix: cache issues
* refactor(useTextToSpeechExternal): removed unused import
* feat: cache switch; refactor: moved to dir STT/TTS
* tests: CacheTTS, TextToSpeech, SpeechToText
* feat: custom elevenlabs compatibility
* fix(useTextToSpeechExternal): cache switch not working
* feat: animation for STT
* fix: settings var not working
* chore: remove unused var
* feat: voice dropdown; refactor: yaml changes
* fix(textToSpeech): remove undefined properties
* refactor: Remove console logs and unused variable
* fix: TTS; feat: support coqui and piper
* fix: some STT issues
* fix: stt test
* fix: STT backend sending wrong data
* BREAKING: switch to react-speech-recognition, add regenerator-runtime/runtime in main.jsx
* feat: websocket backend
* foundations for websocket
* first pass elevenlabs streaming
* streaming audio
* stream changes
* input streaming implementation
* fix: client build errors
* WIP: streaming rewrite
* audio stream working but not the loop
* WIP: looping audio stream working
* WIP tts routes rewrite
* feat: track SSE runs by runId, which enables us to better track audio streams per message request
* chore: set activeRunId on data.created
* rate limit tts and only allow once
* WIP: streaming audio
* refactor(useSSE): simplify messageId/parentMessageId assignment in message stream
* delete unused component
* streaming working
* first pass but need to investigate forever pending bug
* optimize audio stream handling client and initial request
* fix(StreamAudio): null exception
* refactor(tts): add limiters for db polling and timeout promise by intervals and not elapsed time
* refactor(textToSpeech): reduce polling delay
* feat(StreamAudio): add caching
* refactor: rename global variable, add setIsPlaying, remove mediasource ref
* feat: use custom hook for audioRef to help determine audio end state
* fix: voices mutation -> query
* fix: voices mutation -> query 2/2
* feat: successful TTS for manual playback
* fix: tts voice init
* feat: playback rate
* feat: global audio toggles
* chore: Add renderIcon function for chat message hover buttons, update schemas with notes
* chore: add debug logging instead of console.logs
* fix: edge case undefined user id
* feat: Automatic Playback switch
* feat: add caching bump data-provider
* chore: tts add auth
* use global state for audio run
* feat: assistants support for TTS read aloud
* ci: uncomment tests for now until they are refactored
* stream audio tests are WIP
* refactor: make automatic playback false as default
---------
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
Co-authored-by: bsu3338 <bsu3338@yahoo.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
Co-authored-by: Berry-13 <marco13beretta@gmail.com>
Co-authored-by: Super User <root@Berry>
Co-authored-by: Marco Beretta <marco13beretta@proton.me>
* Update Google default model and parameters
* Update .env.example Vertex AI Models to reflect latest version and deprecate bison family
* Update Vertex AI model list in .env.example
* 🤖 Assistants V2 Support: Part 1
- Separated Azure Assistants to its own endpoint
- File Search / Vector Store integration is incomplete, but can toggle and use storage from playground
- Code Interpreter resource files can be added but not deleted
- GPT-4o is supported
- Many improvements to the Assistants Endpoint overall
data-provider v2 changes
copy existing route as v1
chore: rename new endpoint to reduce comparison operations and add new azure filesource
api: add azureAssistants part 1
force use of version for assistants/assistantsAzure
chore: switch name back to azureAssistants
refactor type version: string | number
Ensure assistants endpoints have version set
fix: isArchived type issue in ConversationListParams
refactor: update assistants mutations/queries with endpoint/version definitions, update Assistants Map structure
chore: FilePreview component ExtendedFile type assertion
feat: isAssistantsEndpoint helper
chore: remove unused useGenerations
chore(buildTree): type issue
chore(Advanced): type issue (unused component, maybe in future)
first pass for multi-assistant endpoint rewrite
fix(listAssistants): pass params correctly
feat: list separate assistants by endpoint
fix(useTextarea): access assistantMap correctly
fix: assistant endpoint switching, resetting ID
fix: broken during rewrite, selecting assistant mention
fix: set/invalidate assistants endpoint query data correctly
feat: Fix issue with assistant ID not being reset correctly
getOpenAIClient helper function
feat: add toast for assistant deletion
fix: assistants delete right after create issue for azure
fix: assistant patching
refactor: actions to use getOpenAIClient
refactor: consolidate logic into helpers file
fix: issue where conversation data was not initially available
v1 chat support
refactor(spendTokens): only early return if completionTokens isNaN
fix(OpenAIClient): ensure spendTokens has all necessary params
refactor: route/controller logic
fix(assistants/initializeClient): use defaultHeaders field
fix: sanitize default operation id
chore: bump openai package
first pass v2 action service
feat: retroactive domain parsing for actions added via v1
feat: delete db records of actions/assistants on openai assistant deletion
chore: remove vision tools from v2 assistants
feat: v2 upload and delete assistant vision images
WIP first pass, thread attachments
fix: show assistant vision files (save local/firebase copy)
v2 image continue
fix: annotations
fix: refine annotations
show analyze as error if is no longer submitting before progress reaches 1 and show file_search as retrieval tool
fix: abort run, undefined endpoint issue
refactor: consolidate capabilities logic and anticipate versioning
frontend version 2 changes
fix: query selection and filter
add endpoint to unknown filepath
add file ids to resource, deleting in progress
enable/disable file search
remove version log
* 🤖 Assistants V2 Support: Part 2
🎹 fix: Autocompletion Chrome Bug on Action API Key Input
chore: remove `useOriginNavigate`
chore: set correct OpenAI Storage Source
fix: azure file deletions, instantiate clients by source for deletion
update code interpret files info
feat: deleteResourceFileId
chore: increase poll interval as azure easily rate limits
fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records
file source icons
update table file filters
chore: file search info and versioning
fix: retrieval update with necessary tool_resources if specified
fix(useMentions): add optional chaining in case listMap value is undefined
fix: force assistant avatar roundedness
fix: azure assistants, check correct flag
chore: bump data-provider
* fix: merge conflict
* ci: fix backend tests due to new updates
* chore: update .env.example
* meilisearch improvements
* localization updates
* chore: update comparisons
* feat: add additional metadata: endpoint, author ID
* chore: azureAssistants ENDPOINTS exclusion warning
Fixes an issue where the "command+click" was not being recognized on
MacOS. The desired behavior was working fine on Windows using
"ctrl+click", but the MacOS equivalent was broken.
This was preventing new tabs from opening while holding "command" (meta
key) on MacOS and clicking.
I verified this change fixes the issue by building locally and testing.
* ✨ feat(types): add necessary types for shared link feature
* ✨ feat: add shared links functions to data service
Added functions for retrieving, creating, updating, and deleting shared links and shared messages.
* ✨ feat: Add useGetSharedMessages hook to fetch shared messages by shareId
Adds a new hook `useGetSharedMessages` which fetches shared messages based on the provided shareId.
* ✨ feat: Add share schema and data access functions to API models
* ✨ feat: Add share endpoint to API
The GET /api/share/${shareId} is exposed to the public, so authentication is not required. Other paths require authentication.
* ♻️ refactor(utils): generalize react-query cache manipulation functions
Introduces generic functions for manipulating react-query cache entries, marking a refinement in how query cache data is managed. It aims to enhance the flexibility and reusability of the cache interaction patterns within our application.
- Replaced specific index names with more generic terms in queries.ts, enhancing consistency across data handling functions.
- Introduced new utility functions in collection.ts for adding, updating, and deleting data entries in an InfiniteData<TCollection>. These utility functions (`addData`, `updateData`, `deleteData`, `findPage`) are designed to be re-usable across different data types and collections.
- Adapted existing conversation utility functions in convos.ts to leverage these new generic utilities.
* ✨ feat(shared-link): add functions to manipulate shared link cache list
implemented new utility functions to handle additions, updates, and deletions in the shared link cache list.
* ✨ feat: Add mutations and queries for shared links
* ✨ feat(shared-link): add `Share` button to conversation list
- Added a share button in each conversation in the conversation list.
- Implemented functionality where clicking the share button triggers a POST request to the API.
- The API checks if a share link was already created for the conversation today; if so, it returns the existing link.
- If no link was created for today, the API will create a new share link and return it.
- Each click on the share button results in a new API request, following the specification similar to ChatGPT's share link feature.
* ♻️ refactor(hooks): generalize useNavScrolling for broader use
- Modified `useNavScrolling` to accept a generic type parameter `TData`, allowing it to be used with different data structures besides `ConversationListResponse`.
- Updated instances in `Nav.tsx` and `ArchivedChatsTable.tsx` to explicitly specify `ConversationListResponse` as the type argument when invoking `useNavScrolling`.
* ✨ feat(settings): add shared links listing table with delete functionality in settings
- Integrated a delete button for each shared link in the table, allowing users to remove links as needed.
* ♻️ refactor(components): separate `EndpointIcon` from `Icon` component for standalone use
* ♻️ refactor: update useGetSharedMessages to return TSharedLink
- Modified the useGetSharedMessages hook to return not only a list of TMessage but also the TSharedLink itself.
- This change was necessary to support displaying the title and date in the Shared Message UI, which requires data from TSharedLink.
* ✨ feat(shared link): add UI for displaying shared conversations without authentication
- Implemented a new UI component to display shared conversations, designed to be accessible without requiring authentication.
- Reused components from the authenticated Messages module where possible. Copied and adapted components that could not be directly reused to fit the non-authenticated context.
* 🔧 chore: Add translations
Translate labels only. Messages remain in English as they are possibly subject to change.
* ♻️ refactor: add icon and tooltip props to EditMenuButton component
* moved icon and popover to arguments so that EditMenuButton can be reused.
* modified so that when a ShareButton is closed, the parent DropdownMenu is also closed.
* ♻️irefactor: added DropdownMenu for Export and Share
* ♻️ refactor: renamed component names more intuitive
* More accurate naming of the dropdown menu.
* When the export button is closed, the parent dropdown menu is also closed.
* 🌍 chore: updated translations
* 🐞 Fix: OpenID Profile Image Download (#2757)
* Add fetch requirement
Fixes - error: [openidStrategy] downloadImage: Error downloading image at URL "https://graph.microsoft.com/v1.0/me/photo/$value": TypeError: response.buffer is not a function
* Update openidStrategy.js
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* 🚑 fix(export): Issue exporting Conversation with Assistants (#2769)
* 🚑 fix(export): use content as text if content is present in the message
If the endpoint is assistants, the text of the message goes into content, not message.text.
* refactor(ExportModel): TypeScript, remove unused code
---------
Co-authored-by: Yuichi Ohneda <ohneda@gmail.com>
* 📤style: export button icon (#2752)
* refactor(ShareDialog): logic and styling
* refactor(ExportAndShareMenu): imports order and icon update
* chore: imports
* chore: imports/render logic
* feat: message branching
* refactor: add optional config to useGetStartupConfig
* refactor: disable endpoints query
* chore: fix search view styling gradient in light mode
* style: ShareView gradient styling
* refactor(Share): use select queries
* style: shared link table buttons
* localization and dark text styling
* style: fix clipboard button layout shift app-wide and add localization for copy code
* support assistants message content in shared links, add useCopyToClipboard, add copy buttons to Search Messages and Shared Link Messages
* add localizations
* comparisons
---------
Co-authored-by: Yuichi Ohneda <ohneda@gmail.com>
Co-authored-by: bsu3338 <bsu3338@users.noreply.github.com>
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
* 🚑 fix(export): use content as text if content is present in the message
If the endpoint is assistants, the text of the message goes into content, not message.text.
* refactor(ExportModel): TypeScript, remove unused code
---------
Co-authored-by: Yuichi Ohneda <ohneda@gmail.com>
* Add fetch requirement
Fixes - error: [openidStrategy] downloadImage: Error downloading image at URL "https://graph.microsoft.com/v1.0/me/photo/$value": TypeError: response.buffer is not a function
* Update openidStrategy.js
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* fix(schemas): interchangeability between chatGptLabel <> modelLabel
* fix: display error message from enforceModelSpecs when conversation already existed
* fix(Mention): use activeIndex on mention tab/enter
* fix: correctly navigate to new conversation when deleting/archiving a new, active convo
* refactor(Nav): delegate Search-specific variables/hooks to SearchContext
* fix: safely determine firstTodayConvoId if convo is undefined
* chore: remove empty line
* feat: initial render of search messages
* feat: SearchButtons
* update Ko.ts
* update localizations with new key phrases
* chore: localization comparisons
* fix: clear conversation state on searchQuery navigation
* style: search messages view styling
* refactor(Convo): consolidate logic to navigateWithLastTools from useNavigateToConvo
* fix(SearchButtons): styling and correct navigation logic
* fix(SearchBar): invalidate all message queries and invoke `clearText` if onChange value is empty
* refactor(NewChat): consolidate new chat button logic to NewChatButtonIcon
* chore: localizations for Nav date groups
* chore: update comparisons
* fix: early return from sendRequest to avoid quick searchQuery reset
* style: Link Icon
* chore: bump tiktoken, use o200k_base for gpt-4o
* 🚀 feat: gpt-4o
* update readme.md
* feat: Add new test case for getMultiplier function
* feat: Refactor getMultiplier function to use valueKey variable
* v0.7.2
* chore: uninstall hnswlib-node
* bump package provider
* bump librechat-data-provider in lockfile
* README: ross index
* chore: center star history
* feat: Minor design changes to mimic OpenAI's latest login page
* fix: Optimize ThemeSelector for mobile
* fix: Use a svg for the logo for transperency in dark mode
* feat: Update styles for Registration
* feat: Update error colors for login & registration
* fix: remove medium font
* wip: Dropdown menu
* feat: Update dropdown to match ChatGPT
* feat: Improve rounding and padding
* feat: Add UI Updates to RequestPasswordReset, PasswordRest and increase width for theme dropdown
* fix: Modify the My Files modal's width to not touch the screen
* feat: fix scrolling for dropdown, and make border width lighter
* feat: Match popup menu design to OpenAI (p1/2)
* fix+feat: fix dark mode, add user email, add lighter borders
* fix: Add border color on focus of chat input.
* feat: Move Export Conversation to a seperate button (testing)
* fix: Properly center Login, Registration, Reset Password Flow
* fix: Border colors on dark mode for settings modal
* feat: Improve wording for settings menu
* fix: Optimize settings modal for mobile and fix height for modal
* feat: Optimize for desktop
* fix: make TooltipTrigger asChild of button, improve settings mobile responsiveness
* feat: Handle dropdowns properly
TODO: Make height dynamic, fix dark mode colors
* fix: input styles
fix: make endpoint icon smaller
* feat: Update UI to Match ChatGPT Style
- Updated the dropdown styles to match the aesthetic of ChatGPT.
- Decreased spacing within the conversation area for cleanliness.
- Replaced the current archive icon with the ChatGPT's icon.
* fix: fix colors for EditMenuButton & ArchiveButton for dark mode and light mode
* fix: ui fixes
* fix: Fix Conversation UI Bugs
* fix: transparency of HoverToggle to make buttons not visible
* fix: dark mode HoverToggle & compress menu item spacing
* fix: responsiveness of export icon
* fix: first mentionitem is set to always be highlighted
* fix: improve hover state to text instead of bg
* feat: Update icons to ChatGPT Style
* fix: dark mode hover for PanelFileCell
* fix: change navlinks z-index to 100
* fix: hover states for DataTable
* feat: Move ExportButton to seperate component
* chore: remove unused imports
* chore: make frequent 'error' log into 'debug' log
* feat: add maxContextTokens as a conversation field
* refactor(settings): increase popover height
* feat: add DynamicInputNumber and maxContextTokens to all endpoints that support it (frontend), fix schema
* feat: maxContextTokens handling (backend)
* style: revert popover height
* feat: max tokens
* fix: Ollama Vision firebase compatibility
* fix: Ollama Vision, use message_file_map to determine multimodal request
* refactor: bring back MobileNav and improve title styling
* 🤖 feat(google): Add safety settings configuration
- Implement safety settings configuration in GoogleClient.js
- Add safety settings variables in .env.example
- Update documentation to explain safety settings and clarify model usage
* fix(google): Apply safety settings only to Gemini models
Previously, the safety settings were being applied to all models, regardless of whether they were Gemini models or not. This commit ensures that the safety settings are only applied to models that contain the "gemini" string in their name.
The changes include:
- Extracting the model name from `payload.parameters.model`
- Checking if the model name exists and contains the "gemini" string
- Only applying the safety settings if the model name contains "gemini"
- Ignoring the safety settings for non-Gemini models
This fix ensures that the safety settings are only used for the intended Gemini models, and not applied to other models where they may not be applicable.
* Update GoogleClient.js
* fix(google): Apply safety settings only to Gemini models
---------
Co-authored-by: Oliver Faust <oliver@f4ust.de>
* refactor: checkVisionRequest, search availableModels for valid vision model instead of using default
* feat: install ollama-js, add typedefs
* feat: Ollama Vision Support
* ci: fix test
* chore: remove unused mobile nav
* fix: mobile nav fix for 'more' and 'archive' buttons div
* refactor(useTextarea): rewrite handleKeyUp for backwards compatibility
refactor(useTextarea): rewrite handleKeyUp for backwards compatibility
* experimental: add processing delay to azure streams for better performance/UX
* experiemental: adjust gpt-3 azureDelay
* fix: perplexity titles
* 🔧chore: add internationalization labels for archive feature
* ✨ feat: Add function to useArchiveConversationMutation()
This commit adds a new mutation function `useArchiveConversationMutation()` for archiving conversations. This function takes the ID string of the conversation to be archived and returns a mutation result object. Upon successful archiving, it removes and refreshes the conversation from the query data cache.
While ChatGPT PATCHes the archived status by sending `{is_archived: true}` to the URL `/backend-api/conversation/$conversation_id`, this implementation uses the `dataService.updateConversation(payload)` with a POST method, aligning with the existing code conventions.
* ✨ feat(api): add is_archived field to Conversation schema and update getConvosByPage method
This commit adds a new field `is_archived` with a default value of false to the Conversation schema. It also modifies the `getConvosByPage` method within the Conversation API to adjust the query to only target conversations where `is_archived` is set to false or where the `is_archived` field does not exist. The function `getConvosQueried`, which returns conversations for a specified Conversation ID, was determined not to require consideration of whether `is_archived` is true or false, and thus was not modified.
* ♻️ refactor: add className prop to DotsIcon component
To enhance the versatility of the DotsIcon component, this commit introduces the ability to specify a className prop, allowing for greater customization.
* ✨ feat(ui): add Edit Button to group Title change and Conversation delete buttons
Added a new Edit Button to the conversations, similar to the ChatGPT UI, which groups options for editing the conversation title and deleting conversations. This grouping is accessible through a dialogue that appears when the three-dot icon is clicked.
* ♻️ refactor(ui): enhance Delete Button to accept className and label options
Enhanced the Delete Button component to accept a `className` for customization and an optional `appendLabel`. The DeleteButton component is used by both `Convo.tsx` and `Conversation.tsx`, but currently only `Convo.tsx` is active and `Conversation.tsx `is apparently not used; removing `Conversation.tsx` may eliminate the need for the `appendLabel` property in the future.
* ♻️ refactor(ui): enhance RenameButton to accept label options
Added the ability to optionally display labels; the Rename Button component is used by both `Convo.tsx` and `Conversation.tsx`, but currently only `Convo.tsx` is active and `Conversation.tsx `is apparently not used; removing `Conversation.tsx` may eliminate the need for the `appendLabel` property in the future.
* 🔧 chors: additional localization labels
* ♻️ refactor: change is_archived property of conversation to camelCase
* Refactor the is_archived property of conversation to camelCase (isArchived) to adhere to the existing code conventions
* Modify the function that retrieves conversations to accept the isArchived parameter
* ♻️ refactor: add archiveConversation mutation
I thought I could divert dataService.updateConversation, but added a new archiveConversation because the request types are different. It might be better to make them common, but to avoid side effects, I added a new function this time.
Added process to deleteConversationMutation to delete archived conversations
* ✨ feat: Add the function to hide a cancel button in DialogTemplate component
The Cancel button is not needed when displaying the archive list, so I made the Cancel button optional.
* ♻️ refactor: Add support for filtering archived conversations in Nav component
This commit modifies the Nav component to add the ability to filter out archived conversations when fetching data. This is done by adding `isArchived: false` to the query parameters for both the `useConversationsInfiniteQuery()` and `useSearchInfiniteQuery()` hooks, effectively excluding any archived conversations from the results returned.
* ♻️ refactor: add Tooltip to DeleteButton
* Add Tooltip to DeleteButton component
* Display Tooltip when DeleteButton only shows an Icon without text
* ✨ feat(ui): add ArchiveButton component for archiving conversations
To be compatible with the ChatGPT UI, no confirmation dialog is displayed when ArchiveButton is clicked. The basic behavior conforms to DeleteButton and RenameButton.
* ✨ feat(ui): add Archive button to list of conversations
Modify the Nav of the conversation list to include a dropdown that contains the Rename and Delete options, similar to the ChatGPT UI. Additionally, an Archive button has been added adjacent to the dropdown menu.
* ✨ feat: Add ArchivedChatsTable component
Adds the `ArchivedChatsTable` component, which displays a table of archived chats. It has been implemented to be as compatible with the ChatGPT UI as possible.
* 🚑 fix(tooltip): increase z-index to ensure visibility over Dialog
Resolve an issue where tooltips were not visible when displayed over a Dialog. The z-index of `DialogPrimitive.Portal` in `Dialog.tsx` is set to 999. Since the rationale for this value is unclear, the z-index of the tooltip has been increased to 1000 to guarantee its visibility above the Dialog component.
* 🔧 chors: add internationalization labels
* typedef for ImportBatchBuilder
* feat: first pass, fork conversations
* feat: fork - getMessagesUpToTargetLevel
* fix: additional tests and fix getAllMessagesUpToParent
* chore: arrow function return
* refactor: fork 3 options
* chore: remove unused genbuttons
* chore: remove unused hover buttons code
* feat: fork first pass
* wip: fork remember setting
* style: user icon
* chore: move clear chats to data tab
* WIP: fork UI options
* feat: data-provider fork types/services/vars and use generic MutationOptions
* refactor: use single param for fork option, use enum, fix mongo errors, use Date.now(), add records flag for testing, use endpoint from original convo and messages, pass originalConvo to finishConversation
* feat: add fork mutation hook and consolidate type imports
* refactor: use enum
* feat: first pass, fork mutation
* chore: add enum for target level fork option
* chore: add enum for target level fork option
* show toast when checking remember selection
* feat: splitAtTarget
* feat: split at target option
* feat: navigate to new fork, show toasts, set result query data
* feat: hover info for all fork options
* refactor: add Messages settings tab
* fix(Fork): remember text info
* ci: test for single message and is target edge case
* feat: additional tests for getAllMessagesUpToParent
* ci: additional tests and cycle detection for getMessagesUpToTargetLevel
* feat: circular dependency checks for getAllMessagesUpToParent
* fix: getMessagesUpToTargetLevel circular dep. check
* ci: more tests for getMessagesForConversation
* style: hover text for checkbox fork items
* refactor: add statefulness to conversation import
* Basic implementation of ChatGPT conversation import
* remove debug code
* Handle citations
* Fix updatedAt in import
* update default model
* Use job scheduler to handle import requests
* import job status endpoint
* Add wrapper around Agenda
* Rate limits for import endpoint
* rename import api path
* Batch save import to mongo
* Improve naming
* Add documenting comments
* Test for importers
* Change button for importing conversations
* Frontend changes
* Import job status endpoint
* Import endpoint response
* Add translations to new phrases
* Fix conversations refreshing
* cleanup unused functions
* set timeout for import job status polling
* Add documentation
* get extra spaces back
* Improve error message
* Fix translation files after merge
* fix translation files 2
* Add zh translation for import functionality
* Sync mailisearch index after import
* chore: add dummy uri for jest tests, as MONGO_URI should only be real for E2E tests
* docs: fix links
* docs: fix conversationsImport section
* fix: user role issue for librechat imports
* refactor: import conversations from json
- organize imports
- add additional jsdocs
- use multer with diskStorage to avoid loading file into memory outside of job
- use filepath instead of loading data string for imports
- replace console logs and some logger.info() with logger.debug
- only use multer for import route
* fix: undefined metadata edge case and replace ChatGtp -> ChatGpt
* Refactor importChatGptConvo function to handle undefined metadata edge case and replace ChatGtp with ChatGpt
* fix: chatgpt importer
* feat: maintain tree relationship for librechat messages
* chore: use enum
* refactor: saveMessage to use single object arg, replace console logs, add userId to log message
* chore: additional comment
* chore: multer edge case
* feat: first pass, maintain tree relationship
* chore: organize
* chore: remove log
* ci: add heirarchy test for chatgpt
* ci: test maintaining of heirarchy for librechat
* wip: allow non-text content type messages
* refactor: import content part object json string
* refactor: more content types to format
* chore: consolidate messageText formatting
* docs: update on changes, bump data-provider/config versions, update readme
* refactor(indexSync): singleton pattern for MeiliSearchClient
* refactor: debug log after batch is done
* chore: add back indexSync error handling
---------
Co-authored-by: jakubmieszczak <jakub.mieszczak@zendesk.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
* add integration with Apple MLX
* fix: apple icon + image mkd link
---------
Co-authored-by: “Extremys” <“Extremys@email.com”>
Co-authored-by: Danny Avila <danny@librechat.ai>
* WIP: first pass ModelSpecs
* refactor(onSelectEndpoint): use `getConvoSwitchLogic`
* feat: introduce iconURL, greeting, frontend fields for conversations/presets/messages
* feat: conversation.iconURL & greeting in Landing
* feat: conversation.iconURL & greeting in New Chat button
* feat: message.iconURL
* refactor: ConversationIcon -> ConvoIconURL
* WIP: add spec as a conversation field
* refactor: useAppStartup, set spec on initial load for new chat, allow undefined spec, add localStorage keys enum, additional type fields for spec
* feat: handle `showIconInMenu`, `showIconInHeader`, undefined `iconURL` and no specs on initial load
* chore: handle undefined or empty modelSpecs
* WIP: first pass, modelSpec schema for custom config
* refactor: move default filtered tools definition to ToolService
* feat: pass modelSpecs from backend via startupConfig
* refactor: modelSpecs config, return and define list
* fix: react error and include iconURL in responseMessage
* refactor: add iconURL to responseMessage only
* refactor: getIconEndpoint
* refactor: pass TSpecsConfig
* fix(assistants): differentiate compactAssistantSchema, correctly resets shared conversation state with other endpoints
* refactor: assistant id prefix localStorage key
* refactor: add more LocalStorageKeys and replace hardcoded values
* feat: prioritize spec on new chat behavior: last selected modelSpec behavior (localStorage)
* feat: first pass, interface config
* chore: WIP, todo: add warnings based on config.modelSpecs settings.
* feat: enforce modelSpecs if configured
* feat: show config file yaml errors
* chore: delete unused legacy Plugins component
* refactor: set tools to localStorage from recoil store
* chore: add stable recoil setter to useEffect deps
* refactor: save tools to conversation documents
* style(MultiSelectPop): dynamic height, remove unused import
* refactor(react-query): use localstorage keys and pass config to useAvailablePluginsQuery
* feat(utils): add mapPlugins
* refactor(Convo): use conversation.tools if defined, lastSelectedTools if not
* refactor: remove unused legacy code using `useSetOptions`, remove conditional flag `isMultiChat` for using legacy settings
* refactor(PluginStoreDialog): add exhaustive-deps which are stable react state setters
* fix(HeaderOptions): pass `popover` as true
* refactor(useSetStorage): use project enums
* refactor: use LocalStorageKeys enum
* fix: prevent setConversation from setting falsy values in lastSelectedTools
* refactor: use map for availableTools state and available Plugins query
* refactor(updateLastSelectedModel): organize logic better and add note on purpose
* fix(setAgentOption): prevent reseting last model to secondary model for gptPlugins
* refactor(buildDefaultConvo): use enum
* refactor: remove `useSetStorage` and consolidate areas where conversation state is saved to localStorage
* fix: conversations retain tools on refresh
* fix(gptPlugins): prevent nullish tools from being saved
* chore: delete useServerStream
* refactor: move initial plugins logic to useAppStartup
* refactor(MultiSelectDropDown): add more pass-in className props
* feat: use tools in presets
* chore: delete unused usePresetOptions
* refactor: new agentOptions default handling
* chore: note
* feat: add label and custom instructions to agents
* chore: remove 'disabled with tools' message
* style: move plugins to 2nd column in parameters
* fix: TPreset type for agentOptions
* fix: interface controls
* refactor: add interfaceConfig, use Separator within Switcher
* refactor: hide Assistants panel if interface.parameters are disabled
* fix(Header): only modelSpecs if list is greater than 0
* refactor: separate MessageIcon logic from useMessageHelpers for better react rule-following
* fix(AppService): don't use reserved keyword 'interface'
* feat: set existing Icon for custom endpoints through iconURL
* fix(ci): tests passing for App Service
* docs: refactor custom_config.md for readability and better organization, also include missing values
* docs: interface section and re-organize docs
* docs: update modelSpecs info
* chore: remove unused files
* chore: remove unused files
* chore: move useSetIndexOptions
* chore: remove unused file
* chore: move useConversation(s)
* chore: move useDefaultConvo
* chore: move useNavigateToConvo
* refactor: use plugin install hook so it can be used elsewhere
* chore: import order
* update docs
* refactor(OpenAI/Plugins): allow modelLabel as an initial value for chatGptLabel
* chore: remove unused EndpointOptionsPopover and hide 'Save as Preset' button if preset UI visibility disabled
* feat(loadDefaultInterface): issue warnings based on values
* feat: changelog for custom config file
* docs: add additional changelog note
* fix: prevent unavailable tool selection from preset and update availableTools on Plugin installations
* feat: add `filteredTools` option in custom config
* chore: changelog
* fix(MessageIcon): always overwrite conversation.iconURL in messageSettings
* fix(ModelSpecsMenu): icon edge cases
* fix(NewChat): dynamic icon
* fix(PluginsClient): always include endpoint in responseMessage
* fix: always include endpoint and iconURL in responseMessage across different response methods
* feat: interchangeable keys for modelSpec enforcing
* fix(useMessageHelpers): define iconEndpoint
* fix: rely on Assistant Switcher effect for defining `assistant_id`, ensure ChatRoute `newConversation` only fires once
* Disabled paste prevention in the confirm password field when resetting passwords.
* chore(ResetPassword): remove comments
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
* feat: `stop` conversation parameter
* feat: Tag primitive
* feat: dynamic tags
* refactor: update tag styling
* feat: add stop sequences to OpenAI settings
* fix(Presentation): prevent `SidePanel` re-renders that flicker side panel
* refactor: use stop placeholder
* feat: type and schema update for `stop` and `TPreset` in generation param related types
* refactor: pass conversation to dynamic settings
* refactor(OpenAIClient): remove default handling for `modelOptions.stop`
* docs: fix Google AI Setup formatting
* feat: current_model
* docs: WIP update
* fix(ChatRoute): prevent default preset override before `hasSetConversation.current` becomes true by including latest conversation state as template
* docs: update docs with more info on `stop`
* chore: bump config_version
* refactor: CURRENT_MODEL handling
* fix: remove use of transactions
* fix: remove use of transactions
* refactor(actions): perform OpenAI API operation first, before attempting database updates
* refactor(vite): suppress known warnings
* fix: allow known code filetypes if there is a mismatch of expected type, or originalFile.type is empty
* refactor(useFileHandling): naming, use variable
* chore: bump data-provider
* feat: script to check recent dependency updates
* fix: override vite/rollup version for vite build fix
- also remove unused vite-plugin-html
- add vite build to file output command
* chore: bump rollup override to last known working version (v4.16.0 is breaking)
* chore(vite): increase file size cache for workbox
* fix: resolve openai to last known version using assistants v1 latest features and default header
* chore: update openrouter examples
* added pwa setup via vite config
Added apple status bar meta data
added maskable 512 icon for chrome and android devices
added vite-plugin-pwa
updated vite config to setup the pwa service worker and manifest upon build
* fix(vite): avoid pre-caching generated images
* chore: add manual chunking of larger vendor package
* chore: remove comments
---------
Co-authored-by: davecrab <65996799+davecrab@users.noreply.github.com>
* chore: replace violation cache accessors with enum
* chore: fix test
* chore(fileSchema): index timestamps
* fix(ActionService): use encoding/caching strategy for handling assistant function character length limit
* refactor(actions): async `domainParser` also resolve retrieved model (which is deployment name) to user-defined model
* style(AssistantAction): add `whitespace-nowrap` for ellipsis
* refactor(ActionService): if domain is less than or equal to encoded domain fixed length, return domain with replacement of separator
* refactor(actions): use sessions/transactions for updating Assistant Action database records
* chore: remove TTL from ENCODED_DOMAINS cache
* refactor(domainParser): minor optimization and add tests
* fix(spendTokens): use txData.user for token usage logging
* refactor(actions): add helper function `withSession` for database operations with sessions/transactions
* fix(PluginsClient): logger debug `message` field edge case
* fix(useCreateAssistantMutation): force re-render of assistants map by avoiding use shallow reference of listRes.data
* fix(AppService): regression by not including azure assistant defaults when no assistant endpoint values are set
* chore: bump example config version
* refactor(AppService): issue warnings from separate modules where possible
* refactor(AppService): consolidate AppService logic to separate modules as much as possible
* chore: bump data-provider
* chore: remove unn. variable definition
* chore: warning wording
* Improved and additional German translations
* Improved and added german translations and removed language translations here
* Spelling error fixed
* Use single quotes instead of double
* Use single quotes instead of double
* avatar fix
* chore: ensure `imageOutputType` is always defined
* ci(AppService): extra test for default value
* chore: replace default value for `desiredFormat` with `EImageOutputType` enum
* WIP: gemini-1.5 support
* feat: extended vertex ai support
* fix: handle possibly undefined modelName
* fix: gpt-4-turbo-preview invalid vision model
* feat: specify `fileConfig.imageOutputType` and make PNG default image conversion type
* feat: better truncation for errors including base64 strings
* fix: gemini inlineData formatting
* feat: RAG augmented prompt for gemini-1.5
* feat: gemini-1.5 rates and token window
* chore: adjust tokens, update docs, update vision Models
* chore: add back `ChatGoogleVertexAI` for chat models via vertex ai
* refactor: ask/edit controllers to not use `unfinished` field for google endpoint
* chore: remove comment
* chore(ci): fix AppService test
* chore: remove comment
* refactor(GoogleSearch): use `GOOGLE_SEARCH_API_KEY` instead, issue warning for old variable
* chore: bump data-provider to 0.5.4
* chore: update docs
* fix: condition for gemini-1.5 using generative ai lib
* chore: update docs
* ci: add additional AppService test for `imageOutputType`
* refactor: optimize new config value `imageOutputType`
* chore: bump CONFIG_VERSION
* fix(assistants): avatar upload
* Patch for OpenID username
`username` is generally based on email, rather than `given_name`. The challenge with `given_name` is that it can be a multi-value array (ex: "Nick, Fullname"), which completely breaks the system with:
```
LibreChat | ValidationError: User validation failed: username: Cast to string failed for value "[ 'Nickname', 'Firstname' ]" (type Array) at path "username"
LibreChat | at Document.invalidate (/app/node_modules/mongoose/lib/document.js:3200:32)
LibreChat | at model.$set (/app/node_modules/mongoose/lib/document.js:1459:12)
LibreChat | at model.set [as username] (/app/node_modules/mongoose/lib/helpers/document/compile.js:205:19)
LibreChat | at OpenIDConnectStrategy._verify (/app/api/strategies/openidStrategy.js:127:27)
LibreChat | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```
* Update openidStrategy.js
* refactor(openidStrategy): add helper function for stringy username
---------
Co-authored-by: Danny Avila <danny@librechat.ai>
* refactor(getFiledownload): explicit accept of `application/octet-stream`
* chore: test compose file
* chore: test compose file fix
* chore(files/download): add more logs
* Fix proxy_pass URLs in nginx.conf
* fix: proxy_pass URLs in nginx.conf to fix file downloads from URL
* chore: move test compose file to utils dir
* refactor(useFileDownload): simplify API request by passing `file_id` instead of `filepath`
* fix(processModelData): handle `openrouter/auto` edge case
* fix(Tx.create): prevent negative multiplier edge case and prevent balance from becoming negative
* fix(NavLinks): render 0 balance properly
* refactor(NavLinks): show only up to 2 decimal places for balance
* fix(OpenAIClient/titleConvo): fix cohere condition and record token usage for `this.options.titleMethod === 'completion'`
* chore: fix type issue with File Table fakeData
* refactor: new lazy loading image strategy and load images/files as part of Message Container
* feat: resubmit files when editing messages with attached files
* fix(useTextarea): trigger SendButton re-render on undo and clearing text
* refactor(PresetItems): show pin icon for default preset
* fix(ChatRoute): do not use conversation.model for useEffect, do not set default Preset if real model list is not yet fetched
Sometimes Traefik created a race condition where LibreChat was up on tcp/3080, and while Traefik was up on tcp/443, it could not route to the LibreChat container due to the multiple interfaces -- depending on how they came up. This is easily solved by simply using one interface.
* refactor(client): remove double caching of models via recoil to rely exclusively on react-query
* chore(useConversation): add modelsQuery.data dep to callback
* fix(deleteVectors): handle errors gracefully
* chore: update docs based on new alternate env vars prefixed with RAG to avoid conflicts with LibreChat keys
* docs: update URL to access ollama and comment on 'host.docker.internal'
* Update ai_endpoints.md
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
When creating volumes for /app/client/public/images and /app/api/logs
docker will inherit the permissions from the existing directores in the
image. Since they are missing it defaults to root, and since
librechat now uses the "node" user instead of "root" storing images,
files and logs will fail.
Fix by creating those directories in the docker image with the node
user, so that if docker creates the volumes the permissions are inherited
and the directories are owned by "node" and not "root".
* chore: ts-ignore fake conversation data used for testing
* chore(useTextarea): import helper functions to declutter hook
* fix(Textarea): reset textarea value explicitly by resetting `textAreaRef.current.value`
* fix(processMessages): properly handle assistant file citations and add sources list
* feat: improve file download UX by making any downloaded files accessible within the app post-download
* refactor(processOpenAIImageOutput): correctly handle two different outputs for images since OpenAI generates a file in their storage, shares filepath for image rendering
* refactor: create `addFileToCache` helper to use across frontend
* refactor: add ImageFile parts to cache on processing content stream
* chore: add TEndpoint type/typedef
* refactor(loadConfigModels.spec): stricter default model matching (fails with current impl.)
* refactor(loadConfigModels): return default models on endpoint basis and not fetch basis
* refactor: rename `uniqueKeyToNameMap` to `uniqueKeyToEndpointsMap` for clarity
* WIP: basic route for file downloads and file strategy for generating readablestream to pipe as res
* chore(DALLE3): add typing for OpenAI client
* chore: add `CONSOLE_JSON` notes to dotenv.md
* WIP: first pass OpenAI Assistants File Output handling
* feat: first pass assistants output file download from openai
* chore: yml vs. yaml variation to .gitignore for `librechat.yml`
* refactor(retrieveAndProcessFile): remove redundancies
* fix(syncMessages): explicit sort of apiMessages to fix message order on abort
* chore: add logs for warnings and errors, show toast on frontend
* chore: add logger where console was still being used
* fix(initializeClient.spec.js): remove condition failing test on local installations
* docs: remove comments and invalid html as is required by embeddings generator and add new documentation guidelines
* experimental: use TextareaAutosize wrapper with useLayoutEffect to hopefully fix random textarea jankiness
* fix(Textarea): force a resize when placeholder text changes
* style(ScrollToBottom): update styling for scroll button
* style: memoize values and improve side panel toggle states
* refactor(SidePanel): more control for toggle states, new hide panel button, and improve toggle state logic
* chore: hide resizable panel handle on smaller screens
The default `.env` contains the line `ASSISTANTS_API_KEY=user_provided`. When pre-configuring Azure OpenAI models, this setting makes it impossible to use assistants due to a missing user provided key. Only by commenting the line out the Azure setup works.
* refactor: use debug statement runStepCompleted message
* fix(ChatRoute): prevent use of `newConversation` from reseting `latestMessage`, which would fire asynchronously and finalize after `latestMessage` was already correctly set
* fix(assistants): default query to limit of 100 and `desc` order
* refactor(useMultiSearch): use object as params and fix styling for assistants
* feat: informative message for thread initialization failing due to long message
* refactor(assistants/chat): use promises to speed up initialization, initialize shared variables, include `attachedFileIds` to streamRunManager
* chore: additional typedefs
* fix(OpenAIClient): handle edge case where attachments promise is resolved
* feat: createVisionPrompt
* feat: Vision Support for Assistants
* feat: add claude-3-haiku-20240307 to default anthropic list
* refactor: optimize `saveMessage` calls mid-stream via throttling
* chore: remove addMetadata operations and consolidate in BaseClient
* fix(listAssistantsForAzure): attempt to specify correct model mapping as accurately as possible (#2177)
* refactor(client): update last conversation setup with current assistant model, call newConvo again when assistants load to allow fast initial load and ensure assistant model is always the default, not the last selected model
* refactor(cache): explicitly add TTL of 2 minutes when setting titleCache and add default TTL of 10 minutes to abortKeys cache
* feat(AnthropicClient): conversation titling using Anthropic Function Calling
* chore: remove extraneous token usage logging
* fix(convos): unhandled edge case for conversation grouping (undefined conversation)
* style: Improved style of Search Bar after recent UI update
* chore: remove unused code, content part helpers
* feat: always show code option
* feat: new vector file processing strategy
* chore: remove unused client files
* chore: remove more unused client files
* chore: remove more unused client files and move used to new dir
* chore(DataIcon): add className
* WIP: Model Endpoint Settings Update, draft additional context settings
* feat: improve parsing for augmented prompt, add full context option
* chore: remove volume mounting from rag.yml as no longer necessary
* chore: bump openai to 4.29.0 and npm audit fix
* chore: remove unnecessary stream field from ContentData
* feat: new enum and types for AssistantStreamEvent
* refactor(AssistantService): remove stream field and add conversationId to text ContentData
> - return `finalMessage` and `text` on run completion
> - move `processMessages` to services/Threads to avoid circular dependencies with new stream handling
> - refactor(processMessages/retrieveAndProcessFile): add new `client` field to differentiate new RunClient type
* WIP: new assistants stream handling
* chore: stores messages to StreamRunManager
* chore: add additional typedefs
* fix: pass req and openai to StreamRunManager
* fix(AssistantService): pass openai as client to `retrieveAndProcessFile`
* WIP: streaming tool i/o, handle in_progress and completed run steps
* feat(assistants): process required actions with streaming enabled
* chore: condense early return check for useSSE useEffect
* chore: remove unnecessary comments and only handle completed tool calls when not function
* feat: add TTL for assistants run abort cacheKey
* feat: abort stream runs
* fix(assistants): render streaming cursor
* fix(assistants): hide edit icon as functionality is not supported
* fix(textArea): handle pasting edge cases; first, when onChange events wouldn't fire; second, when textarea wouldn't resize
* chore: memoize Conversations
* chore(useTextarea): reverse args order
* fix: load default capabilities when an azure is configured to support assistants, but `assistants` endpoint is not configured
* fix(AssistantSelect): update form assistant model on assistant form select
* fix(actions): handle azure strict validation for function names to fix crud for actions
* chore: remove content data debug log as it fires in rapid succession
* feat: improve UX for assistant errors mid-request
* feat: add tool call localizations and replace any domain separators from azure action names
* refactor(chat): error out tool calls without outputs during handleError
* fix(ToolService): handle domain separators allowing Azure use of actions
* refactor(StreamRunManager): types and throw Error if tool submission fails
* small-fix: Ensure that fake seperators in model lists do not show in search
* Ensure Plugin search uses correct placeholder and key filtering in search
- note: To put it in a different way, if you put rejectUnauthorized: true, it means that self-signed certificates should not be allowed. This means, that EMAIL_ALLOW_SELFSIGNED is set to false
* refactor: re-purpose `resendImages` as `resendFiles`
* refactor: re-purpose `resendImages` as `resendFiles`
* feat: upload general files
* feat: embed file during upload
* feat: delete file embeddings on file deletion
* chore(fileConfig): add epub+zip type
* feat(encodeAndFormat): handle non-image files
* feat(createContextHandlers): build context prompt from file attachments and successful RAG
* fix: prevent non-temp files as well as embedded files to be deleted on new conversation
* fix: remove temp_file_id on usage, prevent non-temp files as well as embedded files to be deleted on new conversation
* fix: prevent non-temp files as well as embedded files to be deleted on new conversation
* feat(OpenAI/Anthropic/Google): basic RAG support
* fix: delete `resendFiles` only when true (Default)
* refactor(RAG): update endpoints and pass JWT
* fix(resendFiles): default values
* fix(context/processFile): query unique ids only
* feat: rag-api.yaml
* feat: file upload improved ux for longer uploads
* chore: await embed call and catch embedding errors
* refactor: store augmentedPrompt in Client
* refactor(processFileUpload): throw error if not assistant file upload
* fix(useFileHandling): handle markdown empty mimetype issue
* chore: necessary compose file changes
* Initial implementation of MultiSearch. Added implementation to MultiSelect and SelectDropDown and variants
* Update scrollbar styles to prevent breakages on Chrome
* Revert changes to vite.config.ts (redundant for now)
* chore(New Chat): organize imports
* style(scrollbar-transparent): use webkit as standard, expected behavior
* chore: useCallback for mouse enter/leave
* fix(Footer): resolve map key error
* chore: memoize Conversations
* style(MultiSearch): improve multisearch styling
* style: dark mode search input
* fix: react warnings due to unrecognize html props
* chore: debounce OpenAI settings inputs
* fix(useDebouncedInput): only use event value as newValue if not object
---------
Co-authored-by: Flynn <gpg@flyn.ca>
* fix: remove unique field from assistant_id, which can be shared between different users
* refactor: remove unique user fields from actions/assistant queries
* feat: only allow user who saved action to delete it
* refactor: allow deletions for anyone with builder access
* refactor: update user.id when updating assistants/actions records, instead of searching with it
* fix: stringify response data in case it's an object
* fix: correctly handle path input
* fix(decryptV2): handle edge case where value is already decrypted
* chore: add assistants to supportsBalanceCheck
* feat(Transaction): getTransactions and refactor export of model
* refactor: use enum: ViolationTypes.TOKEN_BALANCE
* feat(assistants): check balance
* refactor(assistants): only add promptBuffer if new convo (for title), and remove endpoint definition
* refactor(assistants): Count tokens up to the current context window
* fix(Switcher): make Select list explicitly controlled
* feat(assistants): use assistant's default model when no model is specified instead of the last selected assistant, prevent assistant_id from being recorded in non-assistant endpoints
* chore(assistants/chat): import order
* chore: bump librechat-data-provider due to changes
* chore: rename dir from `assistant` to plural
* feat: `assistants` field for azure config, spread options in AppService
* refactor: rename constructAzureURL param for azure as `azureOptions`
* chore: bump openai and bun
* chore(loadDefaultModels): change naming of assistant -> assistants
* feat: load azure settings with currect baseURL for assistants' initializeClient
* refactor: add `assistants` flags to groups and model configs, add mapGroupToAzureConfig
* feat(loadConfigEndpoints): initialize assistants endpoint if azure flag `assistants` is enabled
* feat(AppService): determine assistant models on startup, throw Error if none
* refactor(useDeleteAssistantMutation): send model along with assistant id for delete mutations
* feat: support listing and deleting assistants with azure
* feat: add model query to assistant avatar upload
* feat: add azure support for retrieveRun method
* refactor: update OpenAIClient initialization
* chore: update README
* fix(ci): tests passing
* refactor(uploadOpenAIFile): improve logging and use more efficient REST API method
* refactor(useFileHandling): add model to metadata to target Azure region compatible with current model
* chore(files): add azure naming pattern for valid file id recognition
* fix(assistants): initialize openai with first available assistant model if none provided
* refactor(uploadOpenAIFile): add content type for azure, initialize formdata before azure options
* refactor(sleep): move sleep function out of Runs and into `~/server/utils`
* fix(azureOpenAI/assistants): make sure to only overwrite models with assistant models if `assistants` flag is enabled
* refactor(uploadOpenAIFile): revert to old method
* chore(uploadOpenAIFile): use enum for file purpose
* docs: azureOpenAI update guide with more info, examples
* feat: enable/disable assistant capabilities and specify retrieval models
* refactor: optional chain conditional statement in loadConfigModels.js
* docs: add assistants examples
* chore: update librechat.example.yaml
* docs(azure): update note of file upload behavior in Azure OpenAI Assistants
* chore: update docs and add descriptive message about assistant errors
* fix: prevent message submission with invalid assistant or if files loading
* style: update Landing icon & text when assistant is not selected
* chore: bump librechat-data-provider to 0.4.8
* fix(assistants/azure): assign req.body.model for proper azure init to abort runs
* feat(chore): add missing translations in Ru.tsx
* feat(chore): add missing translation for My Files menu and headers
* change com_ui_my_files to com_ui_nav_files
* move useLocalize above utils
* feat(chore): add missing translation for My Files menu and headers
* Change the style of the error message.
* ui preset items
* fix style
* Change the color of the border and adjust the background of the selected input
* refactor(useDebouncedInput): make object as input arg and accept setter
* refactor(ChatForm/Textarea): consolidate textarea/form logic to one component, use react-hook-form, programmatically click send button instead of passing submitMessage, forwardRef and memoize SendButton
* refactor(Textarea): use Controller field value to avoid manual update of ref
* chore: remove forms provider
* chore: memoize AttachFile
* refactor(ChatForm/SendButton): only re-render SendButton when there is text input
* chore: make iconURL bigger
* chore: optimize Root/Nav
* refactor(SendButton): memoize disabled prop based on text
* chore: memoize Nav and ChatForm
* chore: remove textarea ref text on submission
* feat(EditMessage): Make Esc exit the edit mode and dismiss changes when editing a message
* style(MenuItem): Display the ☑️ icon only on the selected model
* feat: make assistants endpoint appendable since message state is not managed by LibreChat
* fix(ask): search currentMessages for thread_id if it's not defined
* refactor(abortMiddleware): remove use of `overrideProps` and spread unknown fields instead
* chore: remove console.log in `abortConversation`
* refactor(assistants): improve error handling/cancellation flow
* refactor(useSSE): add useCallback to all event handlers
* chore: remove modelName in defaultAssistantFormValues
* fix(SidePanel): fix layout shift on chrome my removing sidenav scrollbar
* style(ChatForm): match ChatGPT textarea effect styling
* style: fix flickering of old background color on refresh
* style(ChatForm): update styling and fixed style bug
* style:(Dialog): reduced max height style(Settings): fixed dialog position height
* style(Settings): fixed large screen position
* BIG UI UPDATE
* fix: search bar, dialog template, new chat icon, convo icon and delete/rename button
* moved some color config and a lot of files
* small text fixes and tailwind config refactor
* Update localization and UI styles
* Update styles and add user-select:none to Tooltip component
* Update mobile.css styles for navigation mask and background color
* Update component imports and styles
* Update DeleteButton imports and references
* Update UI components
* Update tooltip delay duration
* Fix styling and update text in various components
* fixed assistant style
* minor style fixes
* revert: removed CreationHeader & CreationPanel
* style: match new styling for SidePanel
* style: match bg-gray-800 to ChatGPT (#212121)
* style: remove slate for gray where applicable to match new light theme
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* chore: bump anthropic SDK
* chore: update anthropic config settings (fileSupport, default models)
* feat: anthropic multi modal formatting
* refactor: update vision models and use endpoint specific max long side resizing
* feat(anthropic): multimodal messages, retry logic, and messages payload
* chore: add more safety to trimming content due to whitespace error for assistant messages
* feat(anthropic): token accounting and resending multiple images in progress
* chore: bump data-provider
* feat(anthropic): resendImages feature
* chore: optimize Edit/Ask controllers, switch model back to req model
* fix: false positive of invalid model
* refactor(validateVisionModel): use object as arg, pass in additional/available models
* refactor(validateModel): use helper function, `getModelsConfig`
* feat: add modelsConfig to endpointOption so it gets passed to all clients, use for properly validating vision models
* refactor: initialize default vision model and make sure it's available before assigning it
* refactor(useSSE): avoid resetting model if user selected a new model between request and response
* feat: show rate in transaction logging
* fix: return tokenCountMap regardless of payload shape
* fix(EditMessage): duplicate text when pasting on chromium
* add back paste data handling, prevent default behavior
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* feat: paste plain text from apps with rich paste data, improved edit message textarea, improved height resizing for long text
* feat(EditMessage): autofocus
* chore: retain user text color when entering edit mode
* chore: remove unused code in progressCallback, as well as handle reply.trim(), post `getCompletion`
* chore(Dockerfile): remove curl installation
* experimental: dev image parallelized with matrix strategy and building for amd64/arm64 support
* make platforms explicit
* fix(useContentHandler): retain undefined parts and handle them within `ContentParts` rendering
* fix(AssistantService/in_progress): skip empty messages
* refactor(RunManager): create highly specific `seenSteps` Set keys for RunSteps with use of `getDetailsSignature` and `getToolCallSignature`,to ensure changes from polling are always captured
* chore: bump browserslist-db@latest
* refactor(EndpointService): simplify with `generateConfig`, utilize optional baseURL for OpenAI-based endpoints, use `isUserProvided` helper fn wherever needed
* refactor(custom/initializeClient): use standardized naming for common variables
* feat: user provided baseURL for openAI-based endpoints
* refactor(custom/initializeClient): re-order operations
* fix: knownendpoints enum definition and add FetchTokenConfig, bump data-provider
* refactor(custom): use tokenKey dependent on userProvided conditions for caching and fetching endpointTokenConfig, anticipate token rates from custom config
* refactor(custom): assure endpointTokenConfig is only accessed from cache if qualifies for fetching
* fix(ci): update tests for initializeClient based on userProvideURL changes
* fix(EndpointService): correct baseURL env var for assistants: `ASSISTANTS_BASE_URL`
* fix: unnecessary run cancellation on res.close() when response.run is completed
* feat(assistants): user provided URL option
* ci: update tests and add test for `assistants` endpoint
* chore: leaner condition for request closing
* chore: more descriptive error message to provide keys again
* feat: add known endpoints
* docs: add known endpoints
* update ai_endpoints.md
remove the groq icon from the example
* Update ai_endpoints.md
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* fix(bun): fix bun compatibility to allow gzip header: https://github.com/oven-sh/bun/issues/267#issuecomment-1854460357
* chore: update custom config examples
* fix(OpenAIClient.chatCompletion): remove redundant call of stream.controller.abort() as `break` aborts the request and prevents abort errors when not called redundantly
* chore: bump bun.lockb
* fix: remove result-thinking class when message is no longer streaming
* fix(bun): improve Bun support by forcing use of old method in bun env, also update old methods with new customizable params
* fix(ci): pass tests
* feat(data-provider): add Azure serverless inference handling through librechat.yaml
* feat(azureOpenAI): serverless inference handling in api
* docs: update docs with new azureOpenAI endpoint config fields and serverless inference endpoint setup
* chore: remove unnecessary checks for apiKey as schema would not allow apiKey to be undefined
* ci(azureOpenAI): update tests for serverless configurations
* Remove minLength validation and update login link style
* Add theme selector component and update login form styles
* Update styling in Login and LoginForm components
* Update ResetPassword component styles and text color
* Refactor login component and add theme selector
* Add ThemeSelector component to Registration, RequestPasswordReset, and ResetPassword pages
* chore(Login.tsx): remove unused `useCallback`
* chore(Login.tsx) import order
* Update ResetPassword.tsx import order
* Update RequestPasswordReset.tsx import order
* Update Registration.tsx import order
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* wip: first pass for azure endpoint schema
* refactor: azure config to return groupMap and modelConfigMap
* wip: naming and schema changes
* refactor(errorsToString): move to data-provider
* feat: rename to azureGroups, add additional tests, tests all expected outcomes, return errors
* feat(AppService): load Azure groups
* refactor(azure): use imported types, write `mapModelToAzureConfig`
* refactor: move `extractEnvVariable` to data-provider
* refactor(validateAzureGroups): throw on duplicate groups or models; feat(mapModelToAzureConfig): throw if env vars not present, add tests
* refactor(AppService): ensure each model is properly configured on startup
* refactor: deprecate azureOpenAI environment variables in favor of librechat.yaml config
* feat: use helper functions to handle and order enabled/default endpoints; initialize azureOpenAI from config file
* refactor: redefine types as well as load azureOpenAI models from config file
* chore(ci): fix test description naming
* feat(azureOpenAI): use validated model grouping for request authentication
* chore: bump data-provider following rebase
* chore: bump config file version noting significant changes
* feat: add title options and switch azure configs for titling and vision requests
* feat: enable azure plugins from config file
* fix(ci): pass tests
* chore(.env.example): mark `PLUGINS_USE_AZURE` as deprecated
* fix(fetchModels): early return if apiKey not passed
* chore: fix azure config typing
* refactor(mapModelToAzureConfig): return baseURL and headers as well as azureOptions
* feat(createLLM): use `azureOpenAIBasePath`
* feat(parsers): resolveHeaders
* refactor(extractBaseURL): handle invalid input
* feat(OpenAIClient): handle headers and baseURL for azureConfig
* fix(ci): pass `OpenAIClient` tests
* chore: extract env var for azureOpenAI group config, baseURL
* docs: azureOpenAI config setup docs
* feat: safe check of potential conflicting env vars that map to unique placeholders
* fix: reset apiKey when model switches from originally requested model (vision or title)
* chore: linting
* docs: CONFIG_PATH notes in custom_config.md
* fix: handle non-assistant role ChatCompletionMessage error
* refactor(ModelController): decouple res.send from loading/caching models
* fix(custom/initializeClient): only fetch custom endpoint models if models.fetch is true
* refactor(validateModel): load models if modelsConfig is not yet cached
* docs: update on file upload rate limiting
* refactor: add ViolationTypes enum and add new violation for illegal model requests
* feat: validateModel middleware to protect the backend against illicit requests for unlisted models
* refactor(useUpdateUserKeysMutation): only invalidate the endpoint whose key is being updated by user
* fix(assistants): await `getUserKeyExpiry` call
* chore: fix spinner loading color
* refactor(initializeClient): make known which endpoint api Key is missing
* fix: prevent an `endpointType` mismatch by making it impossible to assign when the `endpointsConfig` doesn't have a `type` defined, also prefer `getQueryData` call to useQuery in useChatHelpers
* fix: social logins accidentally removed default in AppService, reinstated and added test
* chore: move birthday to OTHER section and make disabled by default
- Revise the description for clarity and conciseness.
- Provide a direct comparison between the advanced Docker Compose deployment and the simpler `docker-compose.override.yml` setup.
- Update screenshot link for visual reference.
* feat: assistant name/icon in Landing & Header
* feat: assistname in textarea placeholder, and use `Assistant` as default name
* feat: display non-image files in user messages
* fix: only render files if files.length is > 0
* refactor(config -> file-config): move file related configuration values to separate module, add excel types
* chore: spreadsheet file rendering
* fix(Landing): dark mode style for Assistant Name
* refactor: move progress incrementing to own hook, start smaller, cap near limit \(1\)
* refactor(useContentHandler): add empty Text part if last part was completed tool or image
* chore: add accordion trigger border styling for dark mode
* feat: Assistant Builder model selection
* chore: use Spinner when Assistant is mutating
* fix(get/assistants): return correct response object `AssistantListResponse`
* refactor(Spinner): pass size as prop
* refactor: make assistant crud mutations optimistic, add types for options
* chore: remove assistants route and view
* chore: move assistant builder components to separate directory
* feat(ContextButton): delete Assistant via context button/dialog, add localization
* refactor: conditionally show use and context menu buttons, add localization for create assistant
* feat: save side panel states to localStorage
* style(SidePanel): improve avatar menu and assistant select styling for dark mode
* refactor: make NavToggle reusable for either side (left or right), add SidePanel Toggle with ability to close it completely
* fix: resize handle and navToggle behavior
* fix(/avatar/:assistant_id): await `deleteFile` and assign unique name to uploaded image
* WIP: file UI components from PR #576
* refactor(OpenAIMinimalIcon): pass className
* feat: formatDate helper fn
* feat: DataTableColumnHeader
* feat: add row selection, formatted row values, number of rows selected
* WIP: add files to Side panel temporarily
* feat: `LB_QueueAsyncCall`: Leaky Bucket queue for external APIs, use in `processDeleteRequest`
* fix(TFile): correct `source` type with `FileSources`
* fix(useFileHandling): use `continue` instead of return when iterating multiple files, add file type to extendedFile
* chore: add generic setter type
* refactor(processDeleteRequest): settle promises to prevent rejections from processing deletions, log errors
* feat: `useFileDeletion` to reuse file deletion logic
* refactor(useFileDeletion): make `setFiles` an optional param and use object as param
* feat: useDeleteFilesFromTable
* feat: use real `files` data and add deletion action to data table
* fix(Table): make headers sticky
* feat: add dynamic filtering for columns; only show to user Host or OpenAI storage type
* style(DropdownMenu): replace `slate` with `gray`
* style(DataTable): apply dark mode themes and other misc styling
* style(Columns): add color to OpenAI Storage option
* refactor(FileContainer): make file preview reusable
* refactor(Images): make image preview reusable
* refactor(FilePreview): make file prop optional for FileIcon and FilePreview, fix relative style
* feat(Columns): add file/image previews, set a minimum size to show for file size in bytes
* WIP: File Panel with real files and formatted
* feat: open files dialog from panel
* style: file data table mobile and general column styling fixes
* refactor(api/files): return files sorted by the most recently updated
* refactor: provide fileMap through context to prevent re-selecting files to map in different areas; remove unused imports commented out in PanelColumns
* refactor(ExtendFile): make File type optional, add `attached` to prevent attached files from being deleted on remove, make Message.files a partial TFile type
* feat: attach files through file panel
* refactor(useFileHandling): move files to the start of cache list when uploaded
* refactor(useDeleteFilesMutation): delete files from cache when successfully deleted from server
* fix(FileRow): handle possible edge case of duplication due to attaching recently uploaded file
* style(SidePanel): make resize grip border transparent, remove unnecessary styling on close sidepanel button
* feat: action utilities and tests
* refactor(actions): add `ValidationResult` type and change wording for no server URL found
* refactor(actions): check for empty server URL
* fix(data-provider): revert tsconfig to fix type issue resolution
* feat(client): first pass of actions input for assistants
* refactor(FunctionSignature): change method to output object instead of string
* refactor(models/Assistant): add actions field to schema, use searchParams object for methods, and add `getAssistant`
* feat: post actions input first pass
- create new Action document
- add actions to Assistant DB document
- create /action/:assistant_id POST route
- pass more props down from PanelSwitcher, derive assistant_id from switcher
- move privacy policy to ActionInput
- reset data on input change/validation
- add `useUpdateAction`
- conform FunctionSignature type to FunctionTool
- add action, assistant doc, update hook related types
* refactor: optimize assistant/actions relationship
- past domain in metadata as hostname and not a URL
- include domain in tool name
- add `getActions` for actions retrieval by user
- add `getAssistants` for assistant docs retrieval by user
- add `assistant_id` to Action schema
- move actions to own module as a subroute to `api/assistants`
- add `useGetActionsQuery` and `useGetAssistantDocsQuery` hooks
- fix Action type def
* feat: show assistant actions in assistant builder
* feat: switch to actions on action click, editing action styling
* fix: add Assistant state for builder panel to allow immediate selection of newly created assistants as well as retaining the current assistant when switching to a different panel within the builder
* refactor(SidePanel/NavToggle): offset less from right when SidePanel is completely collapsed
* chore: rename `processActions` -> `processRequiredActions`
* chore: rename Assistant API Action to RequiredAction
* refactor(actions): avoid nesting actual API params under generic `requestBody` to optimize LLM token usage
* fix(handleTools): avoid calling `validTool` if not defined, add optional param to skip the loading of specs, which throws an error in the context of assistants
* WIP: working first pass of toolCalls generated from openapi specs
* WIP: first pass ToolCall styling
* feat: programmatic iv encryption/decryption helpers
* fix: correct ActionAuth types/enums, and define type for AuthForm
* feat: encryption/decryption helpers for Action AuthMetadata
* refactor(getActions): remove sensitive fields from query response
* refactor(POST/actions): encrypt and remove sensitive fields from mutation response
* fix(ActionService): change ESM import to CJS
* feat: frontend auth handling for actions + optimistic update on action update/creation
* refactor(actions): use the correct variables and types for setAuth method
* refactor: POST /:assistant_id action can now handle updating an existing action, add `saved_auth_fields` to determine when user explicitly saves new auth creds. only send auth metadata if user explicitly saved fields
* refactor(createActionTool): catch errors and send back meaningful error message, add flag to `getActions` to determine whether to retrieve sensitive values or not
* refactor(ToolService): add `action` property to ToolCall PartMetadata to determine if the tool call was an action, fix parsing function name issue with actionDelimiter
* fix(ActionRequest): use URL class to correctly join endpoint parts for `execute` call
* feat: delete assistant actions
* refactor: conditionally show Available actions
* refactor: show `retrieval` and `code_interpreter` as Capabilities, swap `Switch` for `Checkbox`
* chore: remove shadow-stroke from messages
* WIP: first pass of Assistants Knowledge attachments
* refactor: remove AssistantsProvider in favor of FormProvider, fix selectedAssistant re-render bug, map Assistant file_ids to files via fileMap, initialize Knowledge component with mapped files if any exist
* fix: prevent deleting files on assistant file upload
* chore: remove console.log
* refactor(useUploadFileMutation): update files and assistants cache on upload
* chore: disable oauth option as not supported yet
* feat: cancel assistant runs
* refactor: initialize OpenAI client with helper function, resolve all related circular dependencies
* fix(DALL-E): initialization
* fix(process): openai client initialization
* fix: select an existing Assistant when the active one is deleted
* chore: allow attaching files for assistant endpoint, send back relevant OpenAI error message when uploading, deconstruct openAI initialization correctly, add `message_file` to formData when a file is attached to the message but not the assistant
* fix: add assistant_id on newConvo
* fix(initializeClient): import fix
* chore: swap setAssistant for setOption in useEffect
* fix(DALL-E): add processFileURL to loadTools call
* chore: add customConfig to debug logs
* feat: delete threads on convo delete
* chore: replace Assistants icon
* chore: remove console.dir() in `abortRun`
* feat(AssistantService): accumulate text values from run in openai.responseText
* feat: titling for assistants endpoint
* chore: move panel file components to appropriate directory, add file checks for attaching files, change icon for Attach Files
* refactor: add localizations to tools, plugins, add condition for adding/remove user plugins so tool selections don't affect this value
* chore: disable `import from url` action for now
* chore: remove textMimeTypes from default fileConfig for now
* fix: catch tool errors and send as outputs with error messages
* fix: React warning about button as descendant of button
* style: retrieval and cancelled icon
* WIP: pass isSubmitting to Parts, use InProgressCall to display cancelled tool calls correctly, show domain/function name
* fix(meilisearch): fix `postSaveHook` issue where indexing expects a mongo document, and join all text content parts for meili indexing
* ci: fix dall-e tests
* ci: fix client tests
* fix: button types in actions panel
* fix: plugin auth form persisting across tool selections
* fix(ci): update AppService spec with `loadAndFormatTools`
* fix(clearConvos): add id check earlier on
* refactor(AssistantAvatar): set previewURL dynamically when emtadata.avatar changes
* feat(assistants): addTitle cache setting
* fix(useSSE): resolve rebase conflicts
* fix: delete mutation
* style(SidePanel): make grip visible on active and hover, invisible otherwise
* ci: add data-provider tests to workflow, also update eslint/tsconfig to recognize specs, and add `text/csv` to fileConfig
* fix: handle edge case where auth object is undefined, and log errors
* refactor(actions): resolve schemas, add tests for resolving refs, import specs from separate file for tests
* chore: remove comment
* fix(ActionsInput): re-render bug when initializing states with action fields
* fix(patch/assistant): filter undefined tools
* chore: add logging for errors in assistants routes
* fix(updateAssistant): map actions to functions to avoid overwriting
* fix(actions): properly handle GET paths
* fix(convos): unhandled delete thread exception
* refactor(AssistantService): pass both thread_id and conversationId when sending intermediate assistant messages, remove `mapMessagesToSteps` from AssistantService
* refactor(useSSE): replace all messages with runMessages and pass latestMessageId to abortRun; fix(checkMessageGaps): include tool calls when syncing messages
* refactor(assistants/chat): invoke `createOnTextProgress` after thread creation
* chore: add typing
* style: sidepanel styling
* style: action tool call domain styling
* feat(assistants): default models, limit retrieval to certain models, add env variables to to env.example
* feat: assistants api key in EndpointService
* refactor: set assistant model to conversation on assistant switch
* refactor: set assistant model to conversation on assistant select from panel
* fix(retrieveAndProcessFile): catch attempt to download file with `assistant` purpose which is not allowed; add logging
* feat: retrieval styling, handling, and logging
* chore: rename ASSISTANTS_REVERSE_PROXY to ASSISTANTS_BASE_URL
* feat: FileContext for file metadata
* feat: context file mgmt and filtering
* style(Select): hover/rounded changes
* refactor: explicit conversation switch, endpoint dependent, through `useSelectAssistant`, which does not create new chat if current endpoint is assistant endpoint
* fix(AssistantAvatar): make empty previewURL if no avatar present
* refactor: side panel mobile styling
* style: merge tool and action section, optimize mobile styling for action/tool buttons
* fix: localStorage issues
* fix(useSelectAssistant): invoke react query hook directly in select hook as Map was not being updated in time
* style: light mode fixes
* fix: prevent sidepanel nav styling from shifting layout up
* refactor: change default layout (collapsed by default)
* style: mobile optimization of DataTable
* style: datatable
* feat: client-side hide right-side panel
* chore(useNewConvo): add partial typing for preset
* fix(useSelectAssistant): pass correct model name by using template as preset
* WIP: assistant presets
* refactor(ToolService): add native solution for `TavilySearchResults` and log tool output errors
* refactor: organize imports and use native TavilySearchResults
* fix(TavilySearchResults): stringify result
* fix(ToolCall): show tool call outputs when not an action
* chore: rename Prompt Prefix to custom instructions (in user facing text only)
* refactor(EditPresetDialog): Optimize setting title by debouncing, reset preset on dialog close to avoid state mixture
* feat: add `presetOverride` to overwrite active conversation settings when saving a Preset (relevant for client side updates only)
* feat: Assistant preset settings (client-side)
* fix(Switcher): only set assistant_id and model if current endpoint is Assistants
* feat: use `useDebouncedInput` for updating conversation settings, starting with EditPresetDialog title setting and Assistant instructions setting
* feat(Assistants): add instructions field to settings
* feat(chat/assistants): pass conversation settings to run body
* wip: begin localization and only allow actions if the assistant is created
* refactor(AssistantsPanel): knowledge localization, allow tools on creation
* feat: experimental: allow 'priming' values before assistant is created, that would normally require an assistant_id to be defined
* chore: trim console logs and make more meaningful
* chore: toast messages
* fix(ci): date test
* feat: create file when uploading Assistant Avatar
* feat: file upload rate limiting from custom config with dynamic file route initialization
* refactor: use file upload limiters on post routes only
* refactor(fileConfig): add endpoints field for endpoint specific fileconfigs, add mergeConfig function, add tests
* refactor: fileConfig route, dynamic multer instances used on all '/' and '/images' POST routes, data service and query hook
* feat: supportedMimeTypesSchema, test for array of regex
* feat: configurable file config limits
* chore: clarify assistants file knowledge prereq.
* chore(useTextarea): default to localized 'Assistant' if assistant name is empty
* feat: configurable file limits and toggle file upload per endpoint
* fix(useUploadFileMutation): prevent updating assistant.files cache if file upload is a message_file attachment
* fix(AssistantSelect): set last selected assistant only when timeout successfully runs
* refactor(queries): disable assistant queries if assistants endpoint is not enabled
* chore(Switcher): add localization
* chore: pluralize `assistant` for `EModelEndpoint key and value
* feat: show/hide assistant UI components based on endpoint availability; librechat.yaml config for disabling builder section and setting polling/timeout intervals
* fix(compactEndpointSchemas): use EModelEndpoint for schema access
* feat(runAssistant): use configured values from `librechat.yaml` for `pollIntervalMs` and `timeout`
* fix: naming issue
* wip: revert landing
* 🎉 happy birthday LibreChat (#1768)
* happy birthday LibreChat
* Refactor endpoint condition in Landing component
* Update birthday message in Eng.tsx
* fix(/config): avoid nesting ternaries
* refactor(/config): check birthday
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* fix: landing
* fix: landing
* fix(useMessageHelpers): hardcoded check to use EModelEndpoint instead
* fix(ci): convo test revert to main
* fix(assistants/chat): fix issue where assistant_id was being saved as model for convo
* chore: added logging, promises racing to prevent longer timeouts, explicit setting of maxRetries and timeouts, robust catching of invalid abortRun params
* refactor: use recoil state for `showStopButton` and only show for assistants endpoint after syncing conversation data
* refactor: optimize abortRun strategy using localStorage, refactor `abortConversation` to use async/await and await the result, refactor how the abortKey cache is set for runs
* fix(checkMessageGaps): assign `assistant_id` to synced messages if defined; prevents UI from showing blank assistant for cancelled messages
* refactor: re-order sequence of chat route, only allow aborting messages after run is created, cancel abortRun if there was a cancelling error (likely due already cancelled in chat route), and add extra logging
* chore(typedefs): add httpAgent type to OpenAIClient
* refactor: use custom implementation of retrieving run with axios to allow for timing out run query
* fix(waitForRun): handle timed out run retrieval query
* refactor: update preset conditions:
- presets will retain settings when a different endpoint is selected; for existing convos, either when modular or is assistant switch
- no longer use `navigateToConvo` on preset select
* fix: temporary calculator hack as expects string input when invoked
* fix: cancel abortRun only when cancelling error is a result of the run already being cancelled
* chore: remove use of `fileMaxSizeMB` and total counterpart (redundant)
* docs: custom config documentation update
* docs: assistants api setup and dotenv, new custom config fields
* refactor(Switcher): make Assistant switcher sticky in SidePanel
* chore(useSSE): remove console log of data and message index
* refactor(AssistantPanel): button styling and add secondary select button to bottom of panel
* refactor(OpenAIClient): allow passing conversationId to RunManager through titleConvo and initializeLLM to properly record title context tokens used in cases where conversationId was not defined by the client
* feat(assistants): token tracking for assistant runs
* chore(spendTokens): improve logging
* feat: support/exclude specific assistant Ids
* chore: add update `librechat.example.yaml`, optimize `AppService` handling, new tests for `AppService`, optimize missing/outdate config logging
* chore: mount docker logs to root of project
* chore: condense axios errors
* chore: bump vite
* chore: vite hot reload fix using latest version
* chore(getOpenAIModels): sort instruct models to the end of models list
* fix(assistants): user provided key
* fix(assistants): user provided key, invalidate more queries on revoke
---------
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
* style: Add month groups to conversation history
* style: Change "Last x days" to "Previous x days" to match ChatGPT
* style: Add "Yesterday" to conversation groups to match ChatGPT
* fix: use startOfDay for Yesterday conversation group
* fix: Output month name instead of number in conversation group name
* test: Validate new conversation groups are created properly
* fix: Formatting of month category string was wrong
* fix(PluginsClient): don't invoke `getFunctionModelName` when using Azure OpenAI
* fix: plugins styling fix with new cursor
* ci(PluginsClient): test azure exception for getFunctionModelName
* Updated Style Cursor like ChatGPT
* style(Markdown.tsx): add space before cursor when there is text
* fix: revert OpenAIClient.tokens.js change
* fix:(Markdown.tsx): revert change of unused file
* fix(convos.spec.ts): test fix
* chore: remove raw HTML for cursor animations
---------
Co-authored-by: Danny Avila <danacordially@gmail.com>
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* refactor(DALL-E): retrieve env variables at runtime and not from memory
* feat(plugins): add alternate env variable handling to allow setting one api key for multiple plugins
* docs: update docs
* feat: send the LibreChat user ID as a query param when fetching the list of models
* chore: update bun
* chore: change bun command for building data-provider
* refactor: prefer use of `getCustomConfig` to access custom config, also move to `server/services/Config`
* refactor: make endpoints/custom option for the config optional, add userIdQuery, and use modelQueries log store in ModelService
* refactor(ModelService): use env variables at runtime, use default models from data-provider, and add tests
* docs: add `userIdQuery`
* fix(ci): import changed
* refactor(Login & Registration)
* fix(Registration) test errors
* refactor(LoginForm & ResetPassword)
* fix(LoginForm): display 'undefined' when loading page; style(SocialButton): match OpenAI's graphics
* some refactor and style update for social logins
* style: width like OpenAI; feat: custom social login order; refactor: alphabetical socials
* fix(Registration & Login) test
* Update .env.example
* Update .env.example
* Update dotenv.md
* refactor: remove `SOCIAL_LOGIN_ORDER` for `socialLogins` configured from `librechat.yaml`
- initialized by AppService, attached as app.locals property
- rename socialLoginOrder and loginOrder to socialLogins app-wide for consistency
- update types and docs
- initialize config variable as array and not singular string to parse
- bump data-provider to 0.3.9
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* feat: allow only certain domain
* Update dotenv.md
* refactor( registrationController) & handle ALLOWED_REGISTRATION_DOMAINS not specified
* cleanup and moved to AuthService for better error handling
* refactor: replace environment variable with librechat config item, add typedef for custom config, update docs for new registration object and allowedDomains values
* ci(AuthService): test for `isDomainAllowed`
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* Style: Infinite Scroll and Group convos by date
* Style: Infinite Scroll and Group convos by date- Redesign NavBar
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Clean code
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Redesign NewChat Component
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Redesign NewChat Component
* Style: Infinite Scroll and Group convos by date- Redesign NavBar - Redesign NewChat Component
* Including OpenRouter and Mistral icon
* refactor(Conversations): cleanup use of utility functions and typing
* refactor(Nav/NewChat): use localStorage `lastConversationSetup` to determine the endpoint to use, as well as icons -> JSX components, remove use of `endpointSelected`
* refactor: remove use of `isFirstToday`
* refactor(Nav): remove use of `endpointSelected`, consolidate scrolling logic to its own hook `useNavScrolling`, remove use of recoil `conversation`
* refactor: Add spinner to bottom of list, throttle fetching, move query hooks to client workspace
* chore: sort by `updatedAt` field
* refactor: optimize conversation infinite query, use optimistic updates, add conversation helpers for managing pagination, remove unnecessary operations
* feat: gen_title route for generating the title for the conversation
* style(Convo): change hover bg-color
* refactor: memoize groupedConversations and return as array of tuples, correctly update convos pre/post message stream, only call genTitle if conversation is new, make `addConversation` dynamically either add/update depending if convo exists in pages already, reorganize type definitions
* style: rename Header NewChat Button -> HeaderNewChat, add NewChatIcon, closely match main Nav New Chat button to ChatGPT
* style(NewChat): add hover bg color
* style: cleanup comments, match ChatGPT nav styling, redesign search bar, make part of new chat sticky header, move Nav under same parent as outlet/mobilenav, remove legacy code, search only if searchQuery is not empty
* feat: add tests for conversation helpers and ensure no duplicate conversations are ever grouped
* style: hover bg-color
* feat: alt-click on convo item to open conversation in new tab
* chore: send error message when `gen_title` fails
---------
Co-authored-by: Walber Cardoso <walbercardoso@gmail.com>
* 🖌️feat: Scrolltobottom Style
* 🖌️feat: ScrolltoBottom Style
* 📱Settings tab now centered on mobile / selection bug fixed 🐞, 🌍 Updated Translation
* 🛠️fix: Adjust the width of the settings dialog and address the issue of not seeing selection on the desktop.
* 🎨 Update settings tabs background color for dark mode.
Adjusts background color dynamically based on screen size.
* 🛠️fix: Reverted changes in ScrolltoBottom file
Adds information and setup details for [aaamon's copilot-gpt4-service](https://github.com/aaamoon/copilot-gpt4-service) to Unofficial APIs section of the documentation.
Utilizes Github's Copilot to access OpenAI api.
* 🧼 docs: remove references to ChatGPTbrowser and PandoraNext
* docs: clean up .env file
Update OpenAI models with the list of automatically fetched models, update Plugin models with the list of models supporting functions, comment out ToC in custom_config.md since it conflicts with mkdock right sidebar ToC
* 🖋️ docs: fix formatting in linux_install.md
* docs: update example model lists in dotenv.md
* docs: update breaking_changesv.md
* fix: re-order System Message if Mistral AI API as it only allows System Message at start of Payload
* fix: re-introduce singular system message change role to `user` if `system`
* refactor(custom): add all recognized models to maxTokensMap for custom endpoint
* feat(librechat.yaml): log the custom config file on initial load
* fix(OpenAIClient): pass endpointType/endpoint to `getModelMaxTokens` call
* refactor(gptPlugins): prevent edge case where exact word `azure` could be found in azure api Key detection when not an azure key
* refactor(SetKeyDialog): cleanup OpenAI config, show \'set azure key\' when `PLUGINS_USE_AZURE` env var is enabled
* refactor(extractBaseURL): add handling for all possible Cloudflare AI Gateway endpoints
* chore: added endpointoption todo for updating type and optimizing handling app-wide
* feat(azureUtils):
- `genAzureChatCompletion`: allow optional client pass to update azure property
- `constructAzureURL`: optionally replace placeholders for instance and deployment names of an azure baseURL
- add tests for module
* refactor(extractBaseURL): return entire input when cloudflare `azure-openai` suffix detected
- also add more tests for both construct and extract URL
* refactor(genAzureChatCompletion): only allow omitting instance name if baseURL is not set
* refactor(initializeClient): determine `reverseProxyUrl` based on endpoint (azure or openai)
* refactor: utitlize `constructAzureURL` when `AZURE_OPENAI_BASEURL` is set
* docs: update docs on `AZURE_OPENAI_BASEURL`
* fix(ci): update expected error message for `azureUtils` tests
* 👤add: Username instead of 'You' when sending messages.
* 🌎: Added a new translation for 'You' and updated the existing translation for Spanish.
* fix: remove "!"
* Added: New setting Account for show username in messages
chore (StopButon and SendButon): Updated to new style of ChatGPT
chore Update and Added news translations: Spanish, English and Portuguese Brazilian
* fix: message component definition and imports order, remove unnecessary useEffect and localStorage set, fix localStorage key in store
* chore: update readme.md
* chore: optimize condition for messageLabel
* chore(Message.tsx): remove empty blocks
---------
Co-authored-by: Raí Santos <140329135+itzraiss@users.noreply.github.com>
* feat(DALL-E-3/DALL-E-2): Azure OpenAI support. New Version specific environment credentials:
- DALLEx_SYSTEM_PROMPT=
- DALLEx_AZURE_API_VERSION=
- DALLEx_BASEURL=
- DALLEx_API_KEY=
- replace `x` with `3` or `2`
* docs: update docs based on new env vars and Azure OpenAI support for DALL-E
* docs: breaking change for user provided DALLE_API_KEY:
- **DALL-E Update**: user-provided keys for DALL-E are now specific to each DALL-E version, i.e.: and
- Note: will work for both DALL-E-3 and DALL-E-2 when the admin provides the credential; in other words, this may only affect your users if DALLE_API_KEY is not set in the file. In this case, they will simply have to uninstall the plugin, and provide their API key again.
* refactor: use process.env at runtime instead of from memory to fix testing DALLE3.spec.js, adjust test
* add the IntelliJ Idea config file to .gitignore
* Update the docs for using a user created key and restricting mongodb IP access to public IP addresses
* chore: fix `endpoint` typescript issues and typo in console info message
* feat(api): files GET endpoint and save only file_id references to messages
* refactor(client): `useGetFiles` query hook, update file types, optimistic update of filesQuery on file upload
* refactor(buildTree): update to use params object and accept fileMap
* feat: map files to messages; refactor(ChatView): messages only available after files are fetched
* fix: fetch files only when authenticated
* feat(api): AppService
- rename app.locals.configs to app.locals.paths
- load custom config use fileStrategy from yaml config in app.locals
* refactor: separate Firebase and Local strategies, call based on config
* refactor: modularize file strategies and employ with use of DALL-E
* refactor(librechat.yaml): add fileStrategy field
* feat: add source to MongoFile schema, as well as BatchFile, and ExtendedFile types
* feat: employ file strategies for upload/delete files
* refactor(deleteFirebaseFile): add user id validation for firebase file deletion
* chore(deleteFirebaseFile): update jsdocs
* feat: employ strategies for vision requests
* fix(client): handle messages with deleted files
* fix(client): ensure `filesToDelete` always saves/sends `file.source`
* feat(openAI): configurable `resendImages` and `imageDetail`
* refactor(getTokenCountForMessage): recursive process only when array of Objects and only their values (not keys) aside from `image_url` types
* feat(OpenAIClient): calculateImageTokenCost
* chore: remove comment
* refactor(uploadAvatar): employ fileStrategy for avatars, from social logins or user upload
* docs: update docs on how to configure fileStrategy
* fix(ci): mock winston and winston related modules, update DALLE3.spec.js with changes made
* refactor(redis): change terminal message to reflect current development state
* fix(DALL-E-2): pass fileStrategy to dall-e
* style(Icon): remove error bubble from message icon
* fix(custom): `initializeClient` now throws error if apiKey or baseURL are admin provided but no env var was found
* refactor(tPresetSchema): match `conversationId` type to `tConversationSchema` but optional, use `extendedModelEndpointSchema` for `endpoint`
* fix(useSSE): minor improvements
- use `completed` set to avoid submitting unecessary abort request
- set preset with `newConversation` calls using initial conversation settings to prevent default Preset override as well as default settings
- return if there is a parsing error within `onerror` as expected errors from server are properly formatted
- Enhanced the `saveImageFromUrl` function to dynamically handle file extensions based on the content type of the fetched image.
- Replaced the method of appending a '.png' extension with a more robust approach using regular expressions and the path module.
- Allows for correct extension replacement or addition, ensuring filename consistency and compatibility with the actual image format.
- Prevents issues with double extensions (e.g., 'someimage.jpg.png') and aligns saved file types with their respective content types.
* fix(custom): prevent presets using removed custom endpoints from causing frontend errors
* refactor(abortMiddleware): send 204 status when abortController is not found/active, set expected header `application/json` when not set
* fix(useSSE): general improvements:
- Add endpointType to fetch URL in useSSE hook
- use EndpointURLs enum
- handle 204 response by setting `data` to initiated response
- add better error handling UX, make clear when there is an explicit error
* refactor: post-cleanup changes:
- add more unnecessary paths to .dockerignore
- remove librechat.yaml from main compose file (prevents from being required)
- do not create librechat.yaml during build (does nothing)
* docs: make config file instructions easier to read, more info throughout other docs
* docs: add custom config to menu
* Update custom_config.md
* Update docker_compose_install.md
* Improving builds
When adding LibreChat to ansible, it rebuilt way too often, even if I
only changed the configuration.
With this PR, it should build only when the files of the app change.
Also removed the 'volumes' section for the 'api' in the docker-compose.yml.
At least with our installation it works fine like this.
* @danny-avila's comments
- removed 'env_file' from docker-compose.yml
- re-added link to '.env' in volumes
* Adding latest changes from main
* @danny-avila's comments
* Updating installation instructions
* @danny-avila's comments
- Remove unused environment in docker-compose.yml
- Re-add some steps for cleaning docker images
* fix(TEndpointsConfig): resolve property access issues with typesafe helper function
* fix: undefined or null endpoint edge case
* refactor(mapEndpoints -> endpoints): renamed module to be more general for endpoint handling, wrote unit tests, export all helpers
* fix: load all existing conversation settings on refresh
* refactor(buildDefaultConvo): use `lastConversationSetup.endpointType` before `conversation.endpointType`
* refactor(TMessage/messageSchema): add `endpoint` field to messages to differentiate generation origin
* feat(useNewConvo): `keepLatestMessage` param to prevent reseting the `latestMessage` mid-conversation
* style(Settings): adjust height styling to allow more space in dialog for additional settings
* feat: Modular Chat: experimental setting to Enable switching Endpoints mid-conversation
* fix(ChatRoute): fix potential parsing issue with tPresetSchema
* fix(api): version mismatch between langchain packages `@langchain/google-genai` & `langchain`
* chore(loadYaml): silence config file not found error
* chore: improve firebase init message when not configured (generalized)
* fix(deploy-compose.yml): mount `librechat.yaml` config file
* WIP(backend/api): custom endpoint
* WIP(frontend/client): custom endpoint
* chore: adjust typedefs for configs
* refactor: use data-provider for cache keys and rename enums and custom endpoint for better clarity and compatibility
* feat: loadYaml utility
* refactor: rename back to from and proof-of-concept for creating schemas from user-defined defaults
* refactor: remove custom endpoint from default endpointsConfig as it will be exclusively managed by yaml config
* refactor(EndpointController): rename variables for clarity
* feat: initial load custom config
* feat(server/utils): add simple `isUserProvided` helper
* chore(types): update TConfig type
* refactor: remove custom endpoint handling from model services as will be handled by config, modularize fetching of models
* feat: loadCustomConfig, loadConfigEndpoints, loadConfigModels
* chore: reorganize server init imports, invoke loadCustomConfig
* refactor(loadConfigEndpoints/Models): return each custom endpoint as standalone endpoint
* refactor(Endpoint/ModelController): spread config values after default (temporary)
* chore(client): fix type issues
* WIP: first pass for multiple custom endpoints
- add endpointType to Conversation schema
- add update zod schemas for both convo/presets to allow non-EModelEndpoint value as endpoint (also using type assertion)
- use `endpointType` value as `endpoint` where mapping to type is necessary using this field
- use custom defined `endpoint` value and not type for mapping to modelsConfig
- misc: add return type to `getDefaultEndpoint`
- in `useNewConvo`, add the endpointType if it wasn't already added to conversation
- EndpointsMenu: use user-defined endpoint name as Title in menu
- TODO: custom icon via custom config, change unknown to robot icon
* refactor(parseConvo): pass args as an object and change where used accordingly; chore: comment out 'create schema' code
* chore: remove unused availableModels field in TConfig type
* refactor(parseCompactConvo): pass args as an object and change where used accordingly
* feat: chat through custom endpoint
* chore(message/convoSchemas): avoid saving empty arrays
* fix(BaseClient/saveMessageToDatabase): save endpointType
* refactor(ChatRoute): show Spinner if endpointsQuery or modelsQuery are still loading, which is apparent with slow fetching of models/remote config on first serve
* fix(useConversation): assign endpointType if it's missing
* fix(SaveAsPreset): pass real endpoint and endpointType when saving Preset)
* chore: recorganize types order for TConfig, add `iconURL`
* feat: custom endpoint icon support:
- use UnknownIcon in all icon contexts
- add mistral and openrouter as known endpoints, and add their icons
- iconURL support
* fix(presetSchema): move endpointType to default schema definitions shared between convoSchema and defaults
* refactor(Settings/OpenAI): remove legacy `isOpenAI` flag
* fix(OpenAIClient): do not invoke abortCompletion on completion error
* feat: add responseSender/label support for custom endpoints:
- use defaultModelLabel field in endpointOption
- add model defaults for custom endpoints in `getResponseSender`
- add `useGetSender` hook which uses EndpointsQuery to determine `defaultModelLabel`
- include defaultModelLabel from endpointConfig in custom endpoint client options
- pass `endpointType` to `getResponseSender`
* feat(OpenAIClient): use custom options from config file
* refactor: rename `defaultModelLabel` to `modelDisplayLabel`
* refactor(data-provider): separate concerns from `schemas` into `parsers`, `config`, and fix imports elsewhere
* feat: `iconURL` and extract environment variables from custom endpoint config values
* feat: custom config validation via zod schema, rename and move to `./projectRoot/librechat.yaml`
* docs: custom config docs and examples
* fix(OpenAIClient/mistral): mistral does not allow singular system message, also add `useChatCompletion` flag to use openai-node for title completions
* fix(custom/initializeClient): extract env var and use `isUserProvided` function
* Update librechat.example.yaml
* feat(InputWithLabel): add className props, and forwardRef
* fix(streamResponse): handle error edge case where either messages or convos query throws an error
* fix(useSSE): handle errorHandler edge cases where error response is and is not properly formatted from API, especially when a conversationId is not yet provided, which ensures stream is properly closed on error
* feat: user_provided keys for custom endpoints
* fix(config/endpointSchema): do not allow default endpoint values in custom endpoint `name`
* feat(loadConfigModels): extract env variables and optimize fetching models
* feat: support custom endpoint iconURL for messages and Nav
* feat(OpenAIClient): add/dropParams support
* docs: update docs with default params, add/dropParams, and notes to use config file instead of `OPENAI_REVERSE_PROXY`
* docs: update docs with additional notes
* feat(maxTokensMap): add mistral models (32k context)
* docs: update openrouter notes
* Update ai_setup.md
* docs(custom_config): add table of contents and fix note about custom name
* docs(custom_config): reorder ToC
* Update custom_config.md
* Add note about `max_tokens` field in custom_config.md
* fix(Message): avoid overwriting unprovided properties
* fix(OpenAIClient): return intermediateReply on user abort
* fix(AskController): do not send/save final message if abort was triggered
* fix(countTokens): avoid fetching remote registry and exclusively use cl100k_base or p50k_base weights for token counting
* refactor(Message/messageSchema): rely on messageSchema for default values when saving messages
* fix(EditController): do not send/save final message if abort was triggered
* fix(config/helpers): fix module resolution error
* Refactoring opening of DB to config/helpers.js
* Adding two user scripts:
- 'delete-user' to remove a user definitely
- 'list-balances' to show the balances of all the users
* chore: bump langchain to v0.0.213 from v0.0.186
* fix: handle abort edge cases:
- abort message server-side if response experienced error mid-generation
- attempt to recover message if aborting resulted in error
- if abortKey is not provided, use conversationId if it exists
- if headers were already sent, send an Event stream message
- issue warning for possible Google censor/filter
refactor(streamResponse): for `sendError`, allow passing overrides so that error can include partial generation, improve typing for `sendMessage`
* chore(MessageContent): remove eslint warning for unused `i`, rephrase unfinished message text
* fix(useSSE): avoid invoking cancelHandler if the abort response was 404
* chore(TMessage): remove unnecessary, unused legacy message property `submitting`
* chore(TMessage): remove unnecessary legacy message property `cancelled`
* chore(abortMiddleware): remove unused `errorText` property to avoid confusion
* localization + api-endpoint
* docs: added firebase documentation
* chore: icons
* chore: SettingsTabs
* feat: account pannel; fix: gear icons
* docs: position update
* feat: firebase
* feat: plugin support
* route
* fixed bugs with firebase and moved a lot of files
* chore(DALLE3): using UUID v4
* feat: support for social strategies; moved '/images' path
* fix: data ignored
* gitignore update
* docs: update firebase guide
* refactor: Firebase
- use singleton pattern for firebase initialization, initially on server start
- reorganize imports, move firebase specific files to own service under Files
- rename modules to remove 'avatar' redundancy
- fix imports based on changes
* ci(DALLE/DALLE3): fix tests to use logger and new expected outputs, add firebase tests
* refactor(loadToolWithAuth): pass userId to tool as field
* feat(images/parse): feat: Add URL Image Basename Extraction
Implement a new module to extract the basename of an image from a given URL. This addition includes the function, which parses the URL and retrieves the basename using the Node.js 'url' and 'path' modules. The function is documented with JSDoc comments for better maintainability and understanding. This feature enhances the application's ability to handle and process image URLs efficiently.
* refactor(addImages): function to use a more specific regular expression for observedImagePath based on the generated image markdown standard across the app
* refactor(DALLE/DALLE3): utilize `getImageBasename` and `this.userId`; fix: pass correct image path to firebase url helper
* fix(addImages): make more general to match any image markdown descriptor
* fix(parse/getImageBasename): test result of this function for an actual image basename
* ci(DALLE3): mock getImageBasename
* refactor(AuthContext): use Recoil atom state for user
* feat: useUploadAvatarMutation, react-query hook for avatar upload
* fix(Toast): stack z-order of Toast over all components (1000)
* refactor(showToast): add optional status field to avoid importing NotificationSeverity on each use of the function
* refactor(routes/avatar): remove unnecessary get route, get userId from req.user.id, require auth on POST request
* chore(uploadAvatar): TODO: remove direct use of Model, `User`
* fix(client): fix Spinner imports
* refactor(Avatar): use react-query hook, Toast, remove unnecessary states, add optimistic UI to upload
* fix(avatar/localStrategy): correctly save local profile picture and cache bust for immediate rendering; fix: firebase init info message (only show once)
* fix: use `includes` instead of `endsWith` for checking manual query of avatar image path in case more queries are appended (as is done in avatar/localStrategy)
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
fix(api/config/parsers): prevent cloning of unnecessary symbols within log object by using `klona` instead of `klona/full`, handle symbols edge case, log parsing errors, and use spaces instead of tab for cleaner logs
* mkdocs plugins: add plugin for social cards and plugin that allow to exclude a folder
* docs: fix hyperlinks
* mkdocs: social cards (descriptions) for 'contributions' and 'deployment' guides
* mkdocs: social cards (descriptions) for all 'index.md'
* mkdocs: social cards (descriptions) for 'features' and 'plugins'
* mkdocs: social cards (descriptions) for 'general_info'
* mkdocs: social cards (descriptions) for 'configuration'
* mkdocs: social cards (descriptions) for 'installation'
* mkdocs: minor fixes
* update librechat.svg
* update how_to_contribute.md
add reference to the official GitHub documentation
* feat(AzureOpenAI): Vision Support
* chore(ci/OpenAIClient.test): update test to reflect Azure now uses chatCompletion method as opposed to getCompletion, while still testing the latter method
* docs: update documentation mainly revolving around Azure setup, but also reformatting the 'Tokens and API' section completely
* docs: add images and links to ai_setup.md
* docs: ai setup reference
* fix(ChatRoute): only initialize conversation after all data is fetched (models, endpoints, initialConversationQuery if not `new`)
* chore: remove unnecessary packages for rolling up api
* chore: bump data-provider package.json
* feat: add GOOGLE_MODELS env var
* feat: add gemini vision support
* refactor(GoogleClient): adjust clientOptions handling depending on model
* fix(logger): fix redact logic and redact errors only
* fix(GoogleClient): do not allow non-multiModal messages when gemini-pro-vision is selected
* refactor(OpenAIClient): use `isVisionModel` client property to avoid calling validateVisionModel multiple times
* refactor: better debug logging by correctly traversing, redacting sensitive info, and logging condensed versions of long values
* refactor(GoogleClient): allow response errors to be thrown/caught above client handling so user receives meaningful error message
debug orderedMessages, parentMessageId, and buildMessages result
* refactor(AskController): use model from client.modelOptions.model when saving intermediate messages, which requires for the progress callback to be initialized after the client is initialized
* feat(useSSE): revert to previous model if the model was auto-switched by backend due to message attachments
* docs: update with google updates, notes about Gemini Pro Vision
* fix: redis should not be initialized without USE_REDIS and increase max listeners to 20
* refactor(Ask/Edit): consolidate ask/edit controllers between the main modules and openAI controllers to reduce repetition of code and increase reusability
* fix(winston/logger): circular dependency issue
* fix(config/scripts): fix script imports
* refactor(indexSync): make not configured message an info log message
* chore: create a rollup script for api/server/index.js to check circular dependencies
* chore: bump @keyv/redis
* refactor: only remove conversation states from localStorage on login/logout but not on refresh
* chore: add debugging log for azure completion url
* chore: add api-key to redact regex
* fix: do not show endpoint selector if endpoint is falsy
* chore: remove logger from genAzureChatCompletion
* feat(ci): mock fetchEventSource
* refactor(ci): mock all model methods in BaseClient.test, as well as mock the implementation for getCompletion in FakeClient
* fix(OpenAIClient): consider chatCompletion if model name includes `gpt` as opposed to `gpt-`
* fix(ChatGPTClient/azureOpenAI): Remove 'model' option for Azure compatibility (cannot be sent in payload body)
* feat(ci): write new test suite that significantly increase test coverage for OpenAIClient and BaseClient by covering most of the real implementation of the `sendMessage` method
- test for the azure edge case where model option is appended to modelOptions, ensuring removal before sent to the azure endpoint
- test for expected azure url being passed to SSE POST request
- test for AZURE_OPENAI_DEFAULT_MODEL being set, but is not included in the URL deployment name as expected
- test getCompletion method to have correct payload
fix(ci/OpenAIClient.test.js): correctly mock hanging/async methods
* refactor(addTitle): allow azure to title as it aborts signal on completion
* refactor: add gemini-pro to google Models list; use defaultModels for central model listing
* refactor(SetKeyDialog): create useMultipleKeys hook to use for Azure, export `isJson` from utils, use EModelEndpoint
* refactor(useUserKey): change variable names to make keyName setting more clear
* refactor(FileUpload): allow passing container className string
* feat(GoogleClient): Gemini support
* refactor(GoogleClient): alternate stream speed for Gemini models
* feat(Gemini): styling/settings configuration for Gemini
* refactor(GoogleClient): substract max response tokens from max context tokens if context is above 32k (I/O max is combined between the two)
* refactor(tokens): correct google max token counts and subtract max response tokens when input/output count are combined towards max context count
* feat(google/initializeClient): handle both local and user_provided credentials and write tests
* fix(GoogleClient): catch if credentials are undefined, handle if serviceKey is string or object correctly, handle no examples passed, throw error if not a Generative Language model and no service account JSON key is provided, throw error if it is a Generative m
odel, but not google API key was provided
* refactor(loadAsyncEndpoints/google): activate Google endpoint if either the service key JSON file is provided in /api/data, or a GOOGLE_KEY is defined.
* docs: updated Google configuration
* fix(ci): Mock import of Service Account Key JSON file (auth.json)
* Update apis_and_tokens.md
* feat: increase max output tokens slider for gemini pro
* refactor(GoogleSettings): handle max and default maxOutputTokens on model change
* chore: add sensitive redact regex
* docs: add warning about data privacy
* Update apis_and_tokens.md
* WIP: initial logging changes
add several transports in ~/config/winston
omit messages in logs, truncate long strings
add short blurb in dotenv for debug logging
GoogleClient: using logger
OpenAIClient: using logger, handleOpenAIErrors
Adding typedef for payload message
bumped winston and using winston-daily-rotate-file
moved config for server paths to ~/config dir
Added `DEBUG_LOGGING=true` to .env.example
* WIP: Refactor logging statements in code
* WIP: Refactor logging statements and import configurations
* WIP: Refactor logging statements and import configurations
* refactor: broadcast Redis initialization message with `info` not `debug`
* refactor: complete Refactor logging statements and import configurations
* chore: delete unused tools
* fix: circular dependencies due to accessing logger
* refactor(handleText): handle booleans and write tests
* refactor: redact sensitive values, better formatting
* chore: improve log formatting, avoid passing strings to 2nd arg
* fix(ci): fix jest tests due to logger changes
* refactor(getAvailablePluginsController): cache plugins as they are static and avoids async addOpenAPISpecs call every time
* chore: update docs
* chore: update docs
* chore: create separate meiliSync logger, clean up logs to avoid being unnecessarily verbose
* chore: spread objects where they are commonly logged to allow string truncation
* chore: improve error log formatting
* update dotenv.md
add details about the MONGO_URI connection string format
* update mongodb.md
add details about the MONGO_URI connection string format
* update BUG-REPORT.yml
remove the contact field asking for the email address since it exposes them to the web when used
* update FEATURE-REQUEST.yml
remove the contact field since it exposes users email address
* Update QUESTION.yml
remove the contact field since it exposes users email address
* chore: bump vite, vitejs/plugin-react, mark client package as esm, move react-query as a peer dep in data-provider
* chore: import changes due to new data-provider export strategy, also fix type imports where applicable
* chore: export react-query services as separate to avoid react dependencies in /api/
* chore: suppress sourcemap warnings and polyfill node:path which is used by filenamify
TODO: replace filenamify with an alternative and REMOVE polyfill
* chore: /api/ changes to support `librechat-data-provider`
* refactor: rewrite Dockerfile.multi in light of /api/ changes to support `librechat-data-provider`
* chore: remove volume mapping to node_modules directories in default compose file
* chore: remove schemas from /api/ as is no longer needed with use of `librechat-data-provider`
* fix(ci): jest `librechat-data-provider/react-query` module resolution
* fix: Fix a fonts warning
The warning was:
files in the public directory are served at the root path.
Instead of /public/fonts/soehne-buch.woff2, use /fonts/soehne-buch.woff2.
* See if it likes /fonts better
* refactor(Logout): rely on hooks for mutation behavior
* fix: logging out now correctly resets cache, disallowing any cache mixing between the next logged in user on the same browser
* chore: remove additional localStorage values on logout
* feat: update PaLM icons
* feat: add additional google models
* POC: formatting inputs for Vertex AI streaming
* refactor: move endpoints services outside of /routes dir to /services/Endpoints
* refactor: shorten schemas import
* refactor: rename PALM to GOOGLE
* feat: make Google editable endpoint
* feat: reusable Ask and Edit controllers based off Anthropic
* chore: organize imports/logic
* fix(parseConvo): include examples in googleSchema
* fix: google only allows odd number of messages to be sent
* fix: pass proxy to AnthropicClient
* refactor: change `google` altName to `Google`
* refactor: update getModelMaxTokens and related functions to handle maxTokensMap with nested endpoint model key/values
* refactor: google Icon and response sender changes (Codey and Google logo instead of PaLM in all cases)
* feat: google support for maxTokensMap
* feat: google updated endpoints with Ask/Edit controllers, buildOptions, and initializeClient
* feat(GoogleClient): now builds prompt for text models and supports real streaming from Vertex AI through langchain
* chore(GoogleClient): remove comments, left before for reference in git history
* docs: update google instructions (WIP)
* docs(apis_and_tokens.md): add images to google instructions
* docs: remove typo apis_and_tokens.md
* Update apis_and_tokens.md
* feat(Google): use default settings map, fully support context for both text and chat models, fully support examples for chat models
* chore: update more PaLM references to Google
* chore: move playwright out of workflows to avoid failing tests
* refactor: move endpoint services to own directory
* refactor: make endpointconfig handling more concise, separate logic, and cache result for subsequent serving
* refactor: ModelController gets same treatment as EndpointController, draft OverrideController
* wip: flesh out override controller more to return real value
* refactor: client/api changes in anticipation of override
* chore: identify new chat buttons with testid
* fix: avoid parsing error in useSSE, which causes errorHandler to fail
* fix: ensure last message isn't setting latestMessage when conversationId is `new` and text is the same due to possible re-renders
* refactor: set placeholder through inputRef and useEffect
* Update useSSE.ts
* Update useSSE.ts
* fix: type issues with icons
* refactor: use react query for presets, show toasts on preset crud, refactor mutations, remove presetsQuery from Root (breaking change)
* refactor: change preset titling
* refactor: update preset schemas and methods for necessary new properties `order` and `defaultPreset`
* feat: add `defaultPreset` Recoil value
* refactor(getPresetTitle): make logic cleaner and more concise
* feat: complete UI portion of defaultPreset feature, with animations added to preset items
* chore: remove console.logs()
* feat: complete default preset handling
* refactor: remove user sensitive values on logout
* fix: allow endpoint selection without default preset overwriting
* fix: only allow message send when key is provided when required
- create useRequiresKey hook
- pass same disabled prop to Textarea, AttachFile, and SendButton
- EndpointItem: add localization, stopPropagation, and remove commented code
- separate some hooks to new Input dir
- completely remove textareaHeight recoil state as is not needed
- update imports for moved hooks
- pass disabled prop to useTextarea
* feat: add localization to textarea placeholders
* Correct the display of the interface when hovering with the mouse
* Replace ring-1 with border completely.
* Fix it so that the text does not overlap with the SVG in mobile navigation.
* Remove the extra class -ml-0.5 -mt-0.5, there is no need to shift the buttons
* refactor(addTitle): avoid generating title when a request was aborted
* chore: bump openai to latest
* fix: catch OpenAIError Uncaught error as last resort
* fix: handle final messages excludes role=assistant
* Update OpenAIClient.js
* chore: fix linting errors
* Update azure_cognitive_search.md
* Updated: Azure Cognitive Search Plugin to Azure AI Search Plugin.
Update Docs: Azure Cognitive Search Plugin to Azure AI Search Plugin.
Updated:.env.example Azure Cognitive Search to Azure AI Search
Updated: mkdocs.yml link
Updated: SDK Azure 11.3.2 to 12.0.0
* fix:.env AZURE- to AZURE_
* Update azure_ai_search.md
* Updated:(api/package.json, package-lock.json): updated for new version the
plugin (@azure/search-documents)
* fix:Resolved incorrect file name AzureAISearch
* fix:.env Azure AI Search
* fix:"-" to "_"
* Update Docs: Azure AI Search ith an improved tutorial featuring images and easier-to-understand instructions
fix: Change name of plugin "Azure Ai Search" to "Azure AI Search" i
* Update:Version of REST API versions (Azure AI Search)
* Update azure_ai_search.md
* Update azure_ai_search.md
* Update azure_ai_search.md
* fix: docs Azure AI Seach Images were not appearing.
* fix:Updated to the new repository with working APIs
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: o AzureAiSearch.js
* Atualizar o AzureAISearch.js
* Update/fix:EnvironmentVariablesForDeprecation
* fix:The file is outdated and needs to be updated.
* fix:The file is outdated and needs to be updated.
* update: translation portuguese brazilian
* Refactor:Improve Readability and Cleanliness of AzureAISearch Class
* Update AzureAiSearch.js
* Update AzureAISearch.js
* fix:getServiceEndpoint
* fix: getServiceEndpoint
* fix:AzureAISearch
* fix: Fix functions erros AzureAISearch
* fix: Update API_VERSION
* fix: AzureAISearch files outdated
* refactor: remove unnecessary drilling/invoking of ScrollToBottom
- feat: useMessageScrolling: consolidates all scrolling logic to hook
- feat: useMessageHelpers: creates message utilities and consolidates logic from UI component
* fix: ensure automatic scrolling is triggered by messagesTree re-render and is throttled
* style: update MessagesView to exact ChatGPT styling
* style(ScrollToBottom): make fixed for larger screens
* fix(ScrollToBottom): revert to absolute from fixed and change bottom values
* Update azure_cognitive_search.md
* Updated: Azure Cognitive Search Plugin to Azure AI Search Plugin.
Update Docs: Azure Cognitive Search Plugin to Azure AI Search Plugin.
Updated:.env.example Azure Cognitive Search to Azure AI Search
Updated: mkdocs.yml link
Updated: SDK Azure 11.3.2 to 12.0.0
* fix:.env AZURE- to AZURE_
* Update azure_ai_search.md
* Updated:(api/package.json, package-lock.json): updated for new version the
plugin (@azure/search-documents)
* fix:Resolved incorrect file name AzureAISearch
* fix:.env Azure AI Search
* fix:"-" to "_"
* Update Docs: Azure AI Search ith an improved tutorial featuring images and easier-to-understand instructions
fix: Change name of plugin "Azure Ai Search" to "Azure AI Search" i
* Update:Version of REST API versions (Azure AI Search)
* Update azure_ai_search.md
* Update azure_ai_search.md
* Update azure_ai_search.md
* fix: docs Azure AI Seach Images were not appearing.
* fix:Updated to the new repository with working APIs
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: Added Compatibility for Previous Environment Variable Names in AzureAISearch Plugin
* Update: o AzureAiSearch.js
* Atualizar o AzureAISearch.js
* Update/fix:EnvironmentVariablesForDeprecation
* fix:The file is outdated and needs to be updated.
* fix:The file is outdated and needs to be updated.
* update: translation portuguese brazilian
* Refactor:Improve Readability and Cleanliness of AzureAISearch Class
* Update AzureAiSearch.js
* Update AzureAISearch.js
* fix: typo for passwordReset.handlebars
* fix(useSSE): prevent unnecessary JSON.parse abort error, handle immediate abort-submit gracefully by reverting to previous state before immediate abort-submit, add showStopButton state to explicitly render disabled sendButton when message generation is cancelled, filter undefined messages and replace undefined convo for cancelHandler
* fix: attempt to catch more errors, especially when generation started
* fix: pass the right properties to getResponseSender
* chore: Update .eslintrc.js and fix sendEmail.js linting errors
* fix: correct preset title for Anthropic endpoint
* fix(Settings/Anthropic): show correct default value for LLM temperature
* fix(AnthropicClient): use `getModelMaxTokens` to get the correct LLM max context tokens, correctly set default temperature to 1, use only 2 params for class constructor, use `getResponseSender` to add correct sender to response message
* refactor(/api/ask|edit/anthropic): save messages to database after the final response is sent to the client, and do not save conversation from route controller
* fix(initializeClient/anthropic): correctly pass client options (endpointOption) to class initialization
* feat(ModelService/Anthropic): add claude-1.2
* fix: handle webp images correctly
* refactor: use the userPath from the start of the filecycle to avoid handling the blob, whose loading may fail upon user request
* refactor: delete temp files on reload and new chat
* feat: add claude-2.1 to default anthropic models
* chore: remove console log in NavLinks
* fix: issue with response sender not using model name, change anthropic default value to Claude
* fix: preset will not be selected on edit
* feat: add timer duration to showToast, show toast for preset selection
* refactor: replace old /chat/ route with /c/. e2e tests will fail here
* refactor: move typedefs to root of /api/ and add a few to assistant types in TS
* refactor: reorganize data-provider imports, fix dependency cycle, strategize new plan to separate react dependent packages
* feat: add dataService for uploading images
* feat(data-provider): add mutation keys
* feat: file resizing and upload
* WIP: initial API image handling
* fix: catch JSON.parse of localStorage tools
* chore: experimental: use module-alias for absolute imports
* refactor: change temp_file_id strategy
* fix: updating files state by using Map and defining react query callbacks in a way that keeps them during component unmount, initial delete handling
* feat: properly handle file deletion
* refactor: unexpose complete filepath and resize from server for higher fidelity
* fix: make sure resized height, width is saved, catch bad requests
* refactor: use absolute imports
* fix: prevent setOptions from being called more than once for OpenAIClient, made note to fix for PluginsClient
* refactor: import supportsFiles and models vars from schemas
* fix: correctly replace temp file id
* refactor(BaseClient): use absolute imports, pass message 'opts' to buildMessages method, count tokens for nested objects/arrays
* feat: add validateVisionModel to determine if model has vision capabilities
* chore(checkBalance): update jsdoc
* feat: formatVisionMessage: change message content format dependent on role and image_urls passed
* refactor: add usage to File schema, make create and updateFile, correctly set and remove TTL
* feat: working vision support
TODO: file size, type, amount validations, making sure they are styled right, and making sure you can add images from the clipboard/dragging
* feat: clipboard support for uploading images
* feat: handle files on drop to screen, refactor top level view code to Presentation component so the useDragHelpers hook has ChatContext
* fix(Images): replace uploaded images in place
* feat: add filepath validation to protect sensitive files
* fix: ensure correct file_ids are push and not the Map key values
* fix(ToastContext): type issue
* feat: add basic file validation
* fix(useDragHelpers): correct context issue with `files` dependency
* refactor: consolidate setErrors logic to setError
* feat: add dialog Image overlay on image click
* fix: close endpoints menu on click
* chore: set detail to auto, make note for configuration
* fix: react warning (button desc. of button)
* refactor: optimize filepath handling, pass file_ids to images for easier re-use
* refactor: optimize image file handling, allow re-using files in regen, pass more file metadata in messages
* feat: lazy loading images including use of upload preview
* fix: SetKeyDialog closing, stopPropagation on Dialog content click
* style(EndpointMenuItem): tighten up the style, fix dark theme showing in lightmode, make menu more ux friendly
* style: change maxheight of all settings textareas to 138px from 300px
* style: better styling for textarea and enclosing buttons
* refactor(PresetItems): swap back edit and delete icons
* feat: make textarea placeholder dynamic to endpoint
* style: show user hover buttons only on hover when message is streaming
* fix: ordered list not going past 9, fix css
* feat: add User/AI labels; style: hide loading spinner
* feat: add back custom footer, change original footer text
* feat: dynamic landing icons based on endpoint
* chore: comment out assistants route
* fix: autoScroll to newest on /c/ view
* fix: Export Conversation on new UI
* style: match message style of official more closely
* ci: fix api jest unit tests, comment out e2e tests for now as they will fail until addressed
* feat: more file validation and use blob in preview field, not filepath, to fix temp deletion
* feat: filefilter for multer
* feat: better AI labels based on custom name, model, and endpoint instead of `ChatGPT`
* Update Translation to Portugues Brasil
* Update Translation to Language Portugues Brasileiro
* Update Translation to Language Español
* Fix Translation to Language Español
* Update Es.tsx
* Update Br.tsx
* style(Header): hide scrollbar but still allow side scroll/swipe/drag/touch
* feat: make menu buttons flexiblewith min-width, delete passed in classes, add pointer-cursor
* refactor: use conditional for visibility of plugins settings
* fix: make advanced settings popover appear over nav
* refactor(textarea): minor padding restyling, add max height
* style: make menuItem checkmark invisible instead of hidden so it takes up width space
* style: make presetsMenu trigger an icon button, remove max-width of presets except in mobile view
* style: improve advanced settings mobile styling
* feat: newchat and convo items toggle nav on small screens
* style: improve no presets view
* style: make sure toggle hover effect does not apply on smaller screens
* wip: initial client side code
* wip: initial api code
* refactor: export query keys from own module, export assistant hooks
* refactor(SelectDropDown): more customization via props
* feat: create Assistant and render real Assistants
* refactor: major refactor of UI components to allow multi-chat, working alongside CreationPanel
* refactor: move assistant routes to own directory
* fix(CreationHeader): state issue with assistant select
* refactor: style changes for form, fix setSiblingIdx from useChatHelpers to use latestMessageParentId, fix render issue with ChatView and change location
* feat: parseCompactConvo: begin refactor of slimmer JSON payloads between client/api
* refactor(endpoints): add assistant endpoint, also use EModelEndpoint as much as possible
* refactor(useGetConversationsQuery): use object to access query data easily
* fix(MultiMessage): react warning of bad state set, making use of effect during render (instead of useEffect)
* fix(useNewConvo): use correct atom key (index instead of convoId) for reset latestMessageFamily
* refactor: make routing navigation/conversation change simpler
* chore: add removeNullishValues for smaller payloads, remove unused fields, setup frontend pinging of assistant endpoint
* WIP: initial complete assistant run handling
* fix: CreationPanel form correctly setting internal state
* refactor(api/assistants/chat): revise functions to working run handling strategy
* refactor(UI): initial major refactor of ChatForm and options
* feat: textarea hook
* refactor: useAuthRedirect hook and change directory name
* feat: add ChatRoute (/c/), make optionsBar absolute and change on textarea height, add temp header
* feat: match new toggle Nav open button to ChatGPT's
* feat: add OpenAI custom classnames
* feat: useOriginNavigate
* feat: messages loading view
* fix: conversation navigation and effects
* refactor: make toggle change nav opacity
* WIP: new endpoint menu
* feat: NewEndpointsMenu complete
* fix: ensure set key dialog shows on endpoint change, and new conversation resets messages
* WIP: textarea styling fix, add temp footer, create basic file handling component
* feat: image file handling (UI)
* feat: PopOver and ModelSelect in Header, remove GenButtons
* feat: drop file handling
* refactor: bug fixes
use SSE at route level
add opts to useOriginNavigate
delay render of unfinishedMessage to avoid flickering
pass params (convoId) to chatHelpers to set messages query data based on param when the route is new (fixes can't continue convo on /new/)
style(MessagesView): matches height to official
fix(SSE): pass paramId and invalidate convos
style(Message): make bg uniform
* refactor(useSSE): setStorage within setConversation updates
* feat: conversationKeysAtom, allConversationsSelector, update convos query data on created message (if new), correctly handle convo deletion (individual)
* feat: add popover select dropdowns to allow options in header while allowing horizontal scroll for mobile
* style(pluginsSelect): styling changes
* refactor(NewEndpointsMenu): make UI components modular
* feat: Presets complete
* fix: preset editing, make by index
* fix: conversations not setting on inital navigation, fix getMessages() based on query param
* fix: changing preset no longer resets latestMessage
* feat: useOnClickOutside for OptionsPopover and fix bug that causes selection of preset when deleting
* fix: revert /chat/ switchToConvo, also use NewDeleteButton in Convo
* fix: Popover correctly closes on close Popover button using custom condition for useOnClickOutside
* style: new message and nav styling
* style: hover/sibling buttons and preset menu scrolling
* feat: new convo header button
* style(Textarea): minor style changes to textarea buttons
* feat: stop/continue generating and hide hoverbuttons when submitting
* feat: compact AI Provider schemas to make json payloads and db saves smaller
* style: styling changes for consistency on chat route
* fix: created usePresetIndexOptions to prevent bugs between /c/ and /chat/ routes when editing presets, removed redundant code from the new dialog
* chore: make /chat/ route default for now since we still lack full image support
* Update heroku.md
Copying the config/install.js expected by RUN npm ci
Heroku CLI would not take the push without this and errored out consistently due to the expected file being missing.
* chore: update model rates with 11/06 rates
* chore: add new models to env.example for OPENAI_MODELS
* chore: reference actual maxTokensMap in ci tests
* chore: use relative imports for scripts
* fix(create-user): newUser.save() now properly awaited, double-check user creation, use relative imports, catch exception
* fix(ban-user): catch exception, handle case where IP is undefined, proper check of user ban on login
* feat(azureOpenAI): allow switching deployment name by model name
* ci: add unit tests and throw error on no api key provided to avoid API call
* fix(gptPlugins/initializeClient): check if azure is enabled; ci: add unit tests for gptPlugins/initializeClient
* fix(ci): fix expected error message for partial regex match: unexpected token
* Update the localization of Chinese and Traditional Chinese
Update the localization of ""
* 12345
* 12345
12345
* Revert "12345"
This reverts commit 70483dbb48.
* Revert "12345"
This reverts commit db0f554b02.
* chore: add back BrowserOp
* chore: make CI env and not DEV env generate refresh tokens every time
* chore: make 'CI' env var captilization uniform across the app
* chore: change NODE_ENV for playwright to
* fix(getLogStores): correct wrong prop passed to keyv opts: duration -> ttl
* fix: edge case where we get a blank screen if the initially intercepted 401 error is from a refresh token request; in this case, make explicit to the server that we are retrying from a refreshToken request
* added button for autoscroll
* fix(General) removed bold
* fix(General) typescript error with checked={autoScroll}
* added return condition for new conversations
* refactor(Message) limit nesting
* fix(settings) used effects
* fix(Message) disabled autoscroll when search
* test(AutoScrollSwitch)
* fix(AutoScrollSwitch) test
* fix(ci): attempt to debug workflow
* refactor: move AutoScrollSwitch from General file, don't use cache for npm
* fix(ci): add test config to avoid redirects and silentRefresh
* chore: add back workflow caching
* chore(AutoScrollSwitch): remove comments, fix type issues, clarify switch intent
* refactor(Message): remove unnecessary message prop form scrolling condition
* fix(AutoScrollSwitch.spec): do not get by text
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* Adding UID, GID to prevent permission problems when running docker compose
as user and not as root.
* Update docker_install.md
Add comment on pre-creating volume mount directories.
---------
Co-authored-by: Erich Focht <efocht@gmail.com>
Co-authored-by: Erich Focht <efocht@users.noreply.github.com>
* fix(PluginStoreDialog) can't search on page 2/3.. & reset to page 1 when install and unistall
* var fix
* removed plugins that aren't working
* remove prompt perfect beacuase it isn't working
* fix(PluginStoreItem) set page 1 and reset search when dialog is close
* refactor: use keyv for search caching with 1 min expirations
* feat: keyvRedis; chore: bump keyv, bun.lockb, add jsconfig for vscode file resolution
* feat: api/search redis support
* refactor(redis) use ioredis cluster for keyv
fix(OpenID): when redis is configured, use redis memory store for express-session
* fix: revert using uri for keyvredis
* fix(SearchBar): properly debounce search queries, fix weird render behaviors
* refactor: add authentication to search endpoint and show error messages in results
* feat: redis support for violation logs
* fix(logViolation): ensure a number is always being stored in cache
* feat(concurrentLimiter): uses clearPendingReq, clears pendingReq on abort, redis support
* fix(api/search/enable): query only when authenticated
* feat(ModelService): redis support
* feat(checkBan): redis support
* refactor(api/search): consolidate keyv logic
* fix(ci): add default empty value for REDIS_URI
* refactor(keyvRedis): use condition to initialize keyvRedis assignment
* refactor(connectDb): handle disconnected state (should create a new conn)
* fix(ci/e2e): handle case where cleanUp did not successfully run
* fix(getDefaultEndpoint): return endpoint from localStorage if defined and endpointsConfig is default
* ci(e2e): remove afterAll messages as startup/cleanUp will clear messages
* ci(e2e): remove teardown for CI until further notice
* chore: bump playwright/test
* ci(e2e): reinstate teardown as CI issue is specific to github env
* fix(ci): click settings menu trigger by testid
* fix(balanceQuery/modelsQuery): request only when authenticated
* style: match new chat capitalization to official
* fix(modelsQuery): update selected model optimistically
* ci: update e2e changes, disable title in ci env
* fix(ci): get new chat button by data-testid and not text
* fix(OpenAIClient): handle completions request in reverse proxy, also force prompt by env var
* fix(reverseProxyUrl): allow url without /v1/ but add server warning as it will not be compatible with plugins
* fix(ModelService): handle reverse proxy without v1
* refactor: make changes cleaner
* ci(OpenAIClient): add tests for OPENROUTER_API_KEY, FORCE_PROMPT, and reverseProxyUrl handling in setOptions
* refactor(Chains/llms): allow passing callbacks
* refactor(BaseClient): accurately count completion tokens as generation only
* refactor(OpenAIClient): remove unused getTokenCountForResponse, pass streaming var and callbacks in initializeLLM
* wip: summary prompt tokens
* refactor(summarizeMessages): new cut-off strategy that generates a better summary by adding context from beginning, truncating the middle, and providing the end
wip: draft out relevant providers and variables for token tracing
* refactor(createLLM): make streaming prop false by default
* chore: remove use of getTokenCountForResponse
* refactor(agents): use BufferMemory as ConversationSummaryBufferMemory token usage not easy to trace
* chore: remove passing of streaming prop, also console log useful vars for tracing
* feat: formatFromLangChain helper function to count tokens for ChatModelStart
* refactor(initializeLLM): add role for LLM tracing
* chore(formatFromLangChain): update JSDoc
* feat(formatMessages): formats langChain messages into OpenAI payload format
* chore: install openai-chat-tokens
* refactor(formatMessage): optimize conditional langChain logic
fix(formatFromLangChain): fix destructuring
* feat: accurate prompt tokens for ChatModelStart before generation
* refactor(handleChatModelStart): move to callbacks dir, use factory function
* refactor(initializeLLM): rename 'role' to 'context'
* feat(Balance/Transaction): new schema/models for tracking token spend
refactor(Key): factor out model export to separate file
* refactor(initializeClient): add req,res objects to client options
* feat: add-balance script to add to an existing users' token balance
refactor(Transaction): use multiplier map/function, return balance update
* refactor(Tx): update enum for tokenType, return 1 for multiplier if no map match
* refactor(Tx): add fair fallback value multiplier incase the config result is undefined
* refactor(Balance): rename 'tokens' to 'tokenCredits'
* feat: balance check, add tx.js for new tx-related methods and tests
* chore(summaryPrompts): update prompt token count
* refactor(callbacks): pass req, res
wip: check balance
* refactor(Tx): make convoId a String type, fix(calculateTokenValue)
* refactor(BaseClient): add conversationId as client prop when assigned
* feat(RunManager): track LLM runs with manager, track token spend from LLM,
refactor(OpenAIClient): use RunManager to create callbacks, pass user prop to langchain api calls
* feat(spendTokens): helper to spend prompt/completion tokens
* feat(checkBalance): add helper to check, log, deny request if balance doesn't have enough funds
refactor(Balance): static check method to return object instead of boolean now
wip(OpenAIClient): implement use of checkBalance
* refactor(initializeLLM): add token buffer to assure summary isn't generated when subsequent payload is too large
refactor(OpenAIClient): add checkBalance
refactor(createStartHandler): add checkBalance
* chore: remove prompt and completion token logging from route handler
* chore(spendTokens): add JSDoc
* feat(logTokenCost): record transactions for basic api calls
* chore(ask/edit): invoke getResponseSender only once per API call
* refactor(ask/edit): pass promptTokens to getIds and include in abort data
* refactor(getIds -> getReqData): rename function
* refactor(Tx): increase value if incomplete message
* feat: record tokenUsage when message is aborted
* refactor: subtract tokens when payload includes function_call
* refactor: add namespace for token_balance
* fix(spendTokens): only execute if corresponding token type amounts are defined
* refactor(checkBalance): throws Error if not enough token credits
* refactor(runTitleChain): pass and use signal, spread object props in create helpers, and use 'call' instead of 'run'
* fix(abortMiddleware): circular dependency, and default to empty string for completionTokens
* fix: properly cancel title requests when there isn't enough tokens to generate
* feat(predictNewSummary): custom chain for summaries to allow signal passing
refactor(summaryBuffer): use new custom chain
* feat(RunManager): add getRunByConversationId method, refactor: remove run and throw llm error on handleLLMError
* refactor(createStartHandler): if summary, add error details to runs
* fix(OpenAIClient): support aborting from summarization & showing error to user
refactor(summarizeMessages): remove unnecessary operations counting summaryPromptTokens and note for alternative, pass signal to summaryBuffer
* refactor(logTokenCost -> recordTokenUsage): rename
* refactor(checkBalance): include promptTokens in errorMessage
* refactor(checkBalance/spendTokens): move to models dir
* fix(createLanguageChain): correctly pass config
* refactor(initializeLLM/title): add tokenBuffer of 150 for balance check
* refactor(openAPIPlugin): pass signal and memory, filter functions by the one being called
* refactor(createStartHandler): add error to run if context is plugins as well
* refactor(RunManager/handleLLMError): throw error immediately if plugins, don't remove run
* refactor(PluginsClient): pass memory and signal to tools, cleanup error handling logic
* chore: use absolute equality for addTitle condition
* refactor(checkBalance): move checkBalance to execute after userMessage and tokenCounts are saved, also make conditional
* style: icon changes to match official
* fix(BaseClient): getTokenCountForResponse -> getTokenCount
* fix(formatLangChainMessages): add kwargs as fallback prop from lc_kwargs, update JSDoc
* refactor(Tx.create): does not update balance if CHECK_BALANCE is not enabled
* fix(e2e/cleanUp): cleanup new collections, import all model methods from index
* fix(config/add-balance): add uncaughtException listener
* fix: circular dependency
* refactor(initializeLLM/checkBalance): append new generations to errorMessage if cost exceeds balance
* fix(handleResponseMessage): only record token usage in this method if not error and completion is not skipped
* fix(createStartHandler): correct condition for generations
* chore: bump postcss due to moderate severity vulnerability
* chore: bump zod due to low severity vulnerability
* chore: bump openai & data-provider version
* feat(types): OpenAI Message types
* chore: update bun lockfile
* refactor(CodeBlock): add error block formatting
* refactor(utils/Plugin): factor out formatJSON and cn to separate files (json.ts and cn.ts), add extractJSON
* chore(logViolation): delete user_id after error is logged
* refactor(getMessageError -> Error): change to React.FC, add token_balance handling, use extractJSON to determine JSON instead of regex
* fix(DALL-E): use latest openai SDK
* chore: reorganize imports, fix type issue
* feat(server): add balance route
* fix(api/models): add auth
* feat(data-provider): /api/balance query
* feat: show balance if checking is enabled, refetch on final message or error
* chore: update docs, .env.example with token_usage info, add balance script command
* fix(Balance): fallback to empty obj for balance query
* style: slight adjustment of balance element
* docs(token_usage): add PR notes
* refactor: pass model in message edit payload, use encoder in standalone util function
* feat: add summaryBuffer helper
* refactor(api/messages): use new countTokens helper and add auth middleware at top
* wip: ConversationSummaryBufferMemory
* refactor: move pre-generation helpers to prompts dir
* chore: remove console log
* chore: remove test as payload will no longer carry tokenCount
* chore: update getMessagesWithinTokenLimit JSDoc
* refactor: optimize getMessagesForConversation and also break on summary, feat(ci): getMessagesForConversation tests
* refactor(getMessagesForConvo): count '00000000-0000-0000-0000-000000000000' as root message
* chore: add newer model to token map
* fix: condition was point to prop of array instead of message prop
* refactor(BaseClient): use object for refineMessages param, rename 'summary' to 'summaryMessage', add previous_summary
refactor(getMessagesWithinTokenLimit): replace text and tokenCount if should summarize, summary, and summaryTokenCount are present
fix/refactor(handleContextStrategy): use the right comparison length for context diff, and replace payload first message when a summary is present
* chore: log previous_summary if debugging
* refactor(formatMessage): assume if role is defined that it's a valid value
* refactor(getMessagesWithinTokenLimit): remove summary logic
refactor(handleContextStrategy): add usePrevSummary logic in case only summary was pruned
refactor(loadHistory): initial message query will return all ordered messages but keep track of the latest summary
refactor(getMessagesForConversation): use object for single param, edit jsdoc, edit all files using the method
refactor(ChatGPTClient): order messages before buildPrompt is called, TODO: add convoSumBuffMemory logic
* fix: undefined handling and summarizing only when shouldRefineContext is true
* chore(BaseClient): fix test results omitting system role for summaries and test edge case
* chore: export summaryBuffer from index file
* refactor(OpenAIClient/BaseClient): move refineMessages to subclass, implement LLM initialization for summaryBuffer
* feat: add OPENAI_SUMMARIZE to enable summarizing, refactor: rename client prop 'shouldRefineContext' to 'shouldSummarize', change contextStrategy value to 'summarize' from 'refine'
* refactor: rename refineMessages method to summarizeMessages for clarity
* chore: clarify summary future intent in .env.example
* refactor(initializeLLM): handle case for either 'model' or 'modelName' being passed
* feat(gptPlugins): enable summarization for plugins
* refactor(gptPlugins): utilize new initializeLLM method and formatting methods for messages, use payload array for currentMessages and assign pastMessages sooner
* refactor(agents): use ConversationSummaryBufferMemory for both agent types
* refactor(formatMessage): optimize original method for langchain, add helper function for langchain messages, add JSDocs and tests
* refactor(summaryBuffer): add helper to createSummaryBufferMemory, and use new formatting helpers
* fix: forgot to spread formatMessages also took opportunity to pluralize filename
* refactor: pass memory to tools, namely openapi specs. not used and may never be used by new method but added for testing
* ci(formatMessages): add more exhaustive checks for langchain messages
* feat: add debug env var for OpenAI
* chore: delete unnecessary comments
* chore: add extra note about summary feature
* fix: remove tokenCount from payload instructions
* fix: test fail
* fix: only pass instructions to payload when defined or not empty object
* refactor: fromPromptMessages is deprecated, use renamed method fromMessages
* refactor: use 'includes' instead of 'startsWith' for extended OpenRouter compatibility
* fix(PluginsClient.buildPromptBody): handle undefined message strings
* chore: log langchain titling error
* feat: getModelMaxTokens helper
* feat: tokenSplit helper
* feat: summary prompts updated
* fix: optimize _CUT_OFF_SUMMARIZER prompt
* refactor(summaryBuffer): use custom summary prompt, allow prompt to be passed, pass humanPrefix and aiPrefix to memory, along with any future variables, rename messagesToRefine to context
* fix(summaryBuffer): handle edge case where messagesToRefine exceeds summary context,
refactor(BaseClient): allow custom maxContextTokens to be passed to getMessagesWithinTokenLimit, add defined check before unshifting summaryMessage, update shouldSummarize based on this
refactor(OpenAIClient): use getModelMaxTokens, use cut-off message method for summary if no messages were left after pruning
* fix(handleContextStrategy): handle case where incoming prompt is bigger than model context
* chore: rename refinedContent to splitText
* chore: remove unnecessary debug log
* feat(localization): add Korean language support
* feat(Nav): add Korean language option to General Settings (#20)
* feat(localization): add Korean language support
* refactor(localization): remove unused translations in Korean language file
* feat(localization): update Korean translations
* refactor(localization): update Korean translations in Ko.tsx
* fix(Icon/types): pick types from TMessage and TConversation
* refactor: make abortScroll a global recoil state and change props/types for useScrollToRef
* refactor(Message): invoke abort setter onTouchMove and onWheel, refactor(Messages): remove redundancy, reset abortScroll when scroll button is clicked
* feat: add option to disable titling as well as decide what model to use for OpenAI titling
refactor: truncate conversation text so it caps around 200 tokens for titling requests, optimize some of the title prompts
* feat: disable bing titling with TITLE_CONVO as well
* added auto-detect language
* fix(TranslationSelect) now saving the selected language between sessions
* fix(LangSelector.spec)
* fix(conflict)
* fix(Swedish) sv-SE
* Added endpoint picture
* plugin icon fix & new minimalist icon
* changed from BingAIMinimalIcon to BingAIMinimalistIcon
* fix(Conversation) reduced the space between the icon and the title
* refactor(getIcon & getMinimalIcon)
* moved IconProps in ~/common
* refactor(getIcon & getMinimalistIcon) from switch/case to map
* fix(getIcon.tsx) renamed to Icon
* renamed all from Minimalist to Minimal
* feat: add global teardown to remove test data and add registration/log-out to auth flow
* refactor(models/Conversation): index user field and add JSDoc to deleteConvos
* refactor: add user index to message schema and ensure user is saved to each Message
* refactor: add user to each saveMessage call
* fix: handle case where title is null in zod schema
* feat(e2e): ensure messages are deleted on cleanUp
* fix: set last convo for all endpoints on conversation update
* fix: enable registration for CI env
* chore(ChatGPTClient.js): add support for OpenRouter API
chore(OpenAIClient.js): add support for OpenRouter API
* chore: comment out token debugging
* chore: add back streamResult assignment
* chore: remove double condition/assignment from merging
* refactor(routes/endpoints): -> controller/services logic
* feat: add openrouter model fetching
* chore: remove unused endpointsConfig in cleanupPreset function
* refactor: separate models concern from endpointsConfig
* refactor(data-provider): add TModels type and make TEndpointsConfig adaptible to new endpoint keys
* refactor: complete models endpoint service in data-provider
* refactor: onMutate for refreshToken and login, invalidate models query
* feat: complete models endpoint logic for frontend
* chore: remove requireJwtAuth from /api/endpoints and /api/models as not implemented yet
* fix: endpoint will not be overwritten and instead use active value
* feat: openrouter support for plugins
* chore(EndpointOptionsDialog): remove unused recoil value
* refactor(schemas/parseConvo): add handling of secondaryModels to use first of defined secondary models, which includes last selected one as first, or default to the convo's secondary model value
* refactor: remove hooks from store and move to hooks
refactor(switchToConversation): make switchToConversation use latest recoil state, which is necessary to get the most up-to-date models list, replace wrapper function
refactor(getDefaultConversation): factor out logic into 3 pieces to reduce complexity.
* fix: backend tests
* feat: optimistic update by calling newConvo when models are fetched
* feat: openrouter support for titling convos
* feat: cache models fetch
* chore: add missing dep to AuthContext useEffect
* chore: fix useTimeout types
* chore: delete old getDefaultConvo file
* chore: remove newConvo logic from Root, remove console log from api models caching
* chore: ensure bun is used for building in b:client script
* fix: default endpoint will not default to null on a completely fresh login (no localStorage/cookies)
* chore: add openrouter docs to free_ai_apis.md and .env.example
* chore: remove openrouter console logs
* feat: add debugging env variable for Plugins
* Language translation: swedish translation
* fix: remove unwanted row in Sv translation
remove com_nav_language
---------
Co-authored-by: Marcus Nätteldal <marcus.natteldal@ltu.se>
* chore: cleanup client depend 🧹
* chore: replace joi with zod and remove unused user validator
* chore: move dep from root to api, cleanup other unused api deps
* chore: remove unused dev dep
* chore: update bun lockfile
* fix: bun scripts
* chore: add bun flag to update script
* chore: remove legacy webpack + babel dev deps
* chore: add back dev deps needed for frontend unit testing
* fix(validators): make schemas as expected and more robust with a full test suite of edge cases
* chore: remove axios from root package, remove path from api, update bun
* refactor: require Auth middleware in route index files
* feat: concurrent message limiter
* feat: complete concurrent message limiter with caching
* refactor: SSE response methods separated from handleText
* fix(abortMiddleware): fix req and res order to standard, use endpointOption in req.body
* chore: minor name changes
* refactor: add isUUID condition to saveMessage
* fix(concurrentLimiter): logic correctly handles the max number of concurrent messages and res closing/finalization
* chore: bump keyv and remove console.log from Message
* fix(concurrentLimiter): ensure messages are only saved in later message children
* refactor(concurrentLimiter): use KeyvFile instead, could make other stores configurable in the future
* feat: add denyRequest function for error responses
* feat(utils): add isStringTruthy function
Introduce the isStringTruthy function to the utilities module to check if a string value is a case-insensitive match for 'true'
* feat: add optional message rate limiters by IP and userId
* feat: add optional message rate limiters by IP and userId to edit route
* refactor: rename isStringTruthy to isTrue for brevity
* refactor(getError): use map to make code cleaner
* refactor: use memory for concurrent rate limiter to prevent clearing on startup/exit, add multiple log files, fix error message for concurrent violation
* feat: check if errorMessage is object, stringify if so
* chore: send object to denyRequest which will stringify it
* feat: log excessive requests
* fix(getError): correctly pluralize messages
* refactor(limiters): make type consistent between logs and errorMessage
* refactor(cache): move files out of lib/db into separate cache dir
>> feat: add getLogStores function so Keyv instance is not redundantly created on every violation
feat: separate violation logging to own function with logViolation
* fix: cache/index.js export, properly record userViolations
* refactor(messageLimiters): use new logging method, add logging to registrations
* refactor(logViolation): make userLogs an array of logs per user
* feat: add logging to login limiter
* refactor: pass req as first param to logViolation and record offending IP
* refactor: rename isTrue helper fn to isEnabled
* feat: add simple non_browser check and log violation
* fix: open handles in unit tests, remove KeyvMongo as not used and properly mock global fetch
* chore: adjust nodemon ignore paths to properly ignore logs
* feat: add math helper function for safe use of eval
* refactor(api/convos): use middleware at top of file to avoid redundancy
* feat: add delete all static method for Sessions
* fix: redirect to login on refresh if user is not found, or the session is not found but hasn't expired (ban case)
* refactor(getLogStores): adjust return type
* feat: add ban violation and check ban logic
refactor(logViolation): pass both req and res objects
* feat: add removePorts helper function
* refactor: rename getError to getMessageError and add getLoginError for displaying different login errors
* fix(AuthContext): fix type issue and remove unused code
* refactor(bans): ban by ip and user id, send response based on origin
* chore: add frontend ban messages
* refactor(routes/oauth): add ban check to handler, also consolidate logic to avoid redundancy
* feat: add ban check to AI messaging routes
* feat: add ban check to login/registration
* fix(ci/api): mock KeyvMongo to avoid tests hanging
* docs: update .env.example
> refactor(banViolation): calculate interval rate crossover, early return if duration is invalid
ci(banViolation): add tests to ensure users are only banned when expected
* docs: improve wording for mod system
* feat: add configurable env variables for violation scores
* chore: add jsdoc for uaParser.js
* chore: improve ban text log
* chore: update bun test scripts
* refactor(math.js): add fallback values
* fix(KeyvMongo/banLogs): refactor keyv instances to top of files to avoid memory leaks, refactor ban logic to use getLogStores instead
refactor(getLogStores): get a single log store by type
* fix(ci): refactor tests due to banLogs changes, also make sure to clear and revoke sessions even if ban duration is 0
* fix(banViolation.js): getLogStores import
* feat: handle 500 code error at login
* fix(middleware): handle case where user.id is _id and not just id
* ci: add ban secrets for backend unit tests
* refactor: logout user upon ban
* chore: log session delete message only if deletedCount > 0
* refactor: change default ban duration (2h) and make logic more clear in JSDOC
* fix: login and registration limiters will now return rate limiting error
* fix: userId not parsable as non ObjectId string
* feat: add useTimeout hook to properly clear timeouts when invoking functions within them
refactor(AuthContext): cleanup code by using new hook and defining types in ~/common
* fix: login error message for rate limits
* docs: add info for automated mod system and rate limiters, update other docs accordingly
* chore: bump data-provider version
* feat(api): refresh token logic
* feat(client): refresh token logic
* feat(data-provider): refresh token logic
* fix: SSE uses esm
* chore: add default refresh token expiry to AuthService, add message about env var not set when generating a token
* chore: update scripts to more compatible bun methods, ran bun install again
* chore: update env.example and playwright workflow with JWT_REFRESH_SECRET
* chore: update breaking changes docs
* chore: add timeout to url visit
* chore: add default SESSION_EXPIRY in generateToken logic, add act script for testing github actions
* fix(e2e): refresh automatically in development environment to pass e2e tests
* docs: make_your_own.md formatting fix for mkdocs
* feat: add express-mongo-sanitize
feat: add login/registration rate limiting
* chore: remove unnecessary console log
* wip: remove token handling from localStorage to encrypted DB solution
* refactor: minor change to UserService
* fix mongo query and add keys route to server
* fix backend controllers and simplify schema/crud
* refactor: rename token to key to separate from access/refresh tokens, setTokenDialog -> setKeyDialog
* refactor(schemas): TEndpointOption token -> key
* refactor(api): use new encrypted key retrieval system
* fix(SetKeyDialog): fix key prop error
* fix(abortMiddleware): pass random UUID if messageId is not generated yet for proper error display on frontend
* fix(getUserKey): wrong prop passed in arg, adds error handling
* fix: prevent message without conversationId from saving to DB, prevents branching on the frontend to a new top-level branch
* refactor: change wording of multiple display messages
* refactor(checkExpiry -> checkUserKeyExpiry): move to UserService file
* fix: type imports from common
* refactor(SubmitButton): convert to TS
* refactor(key.ts): change localStorage map key name
* refactor: add new custom tailwind classes to better match openAI colors
* chore: remove unnecessary warning and catch ScreenShot error
* refactor: move userKey frontend logic to hooks and remove use of localStorage and instead query the DB
* refactor: invalidate correct query key, memoize userKey hook, conditionally render SetKeyDialog to avoid unnecessary calls, refactor SubmitButton props and useEffect for showing 'provide key first'
* fix(SetKeyDialog): use enum-like object for expiry values
feat(Dropdown): add optionsClassName to dynamically change dropdown options container classes
* fix: handle edge case where user had provided a key but the server changes to env variable for keys
* refactor(OpenAI/titleConvo): move titling to client to retain authorized credentials in message lifecycle for titling
* fix(azure): handle user_provided keys correctly for azure
* feat: send user Id to OpenAI to differentiate users in completion requests
* refactor(OpenAI/titleConvo): adding tokens helps minimize LLM from using the language in title response
* feat: add delete endpoint for keys
* chore: remove throttling of title
* feat: add 'Data controls' to Settings, add 'Revoke' keys feature in Key Dialog and Data controls
* refactor: reorganize PluginsClient files in langchain format
* feat: use langchain for titling convos
* chore: cleanup titling convo, with fallback to original method, escape braces, use only snippet for language detection
* refactor: move helper functions to appropriate langchain folders for reusability
* fix: userProvidesKey handling for gptPlugins
* fix: frontend handling of plugins key
* chore: cleanup logging and ts-ignore SSE
* fix: forwardRef misuse in DangerButton
* fix(GoogleConfig/FileUpload): localize errors and simplify validation with zod
* fix: cleanup google logging and fix user provided key handling
* chore: remove titling from google
* chore: removing logging from browser endpoint
* wip: fix menu flicker
* feat: useLocalStorage hook
* feat: add Tooltip for UI
* refactor(EndpointMenu): utilize Tooltip and useLocalStorage, remove old 'New Chat' slide-over
* fix(e2e): use testId for endpoint menu trigger
* chore: final touches to EndpointMenu before future refactor to declutter component
* refactor(localization): change select endpoint to open menu and add translations
* chore: add final prop to error message response
* ci: minor edits to facilitate testing
* ci: new e2e test which tests for new key setting/revoking features
* config token translation
* more translation and fix
* fix conflict
* fix(DialogTemplate) bug with the spec.tsx, localize hooks need to be in a recoil root
* small clean up
* fix(NewTopic) in endpoint
* fix(RecoilRoot)
* test(DialogTemplate.spec) used data-testid
* fix(DialogTemplate)
* some cleanup
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits.
* Update Zh.tsx
Changed the translation of several words to make it more relevant to Chinese usage habits
* chore: add 'api' image to tag release workflow
* docs: update DO deployment docs to include instruction about latest stable release, as well as security best practices
* Release v0.5.8
* docs: Update digitalocean.md with firewall section images
* docs: make_your_own.md formatting fix for mkdocs
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
* fix(User.js): update validation schema for username field, allow empty string as a valid value
fix(validators.js): update validation schema for username field, allow empty string as a valid value
fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value
fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional
* fix(User.js): update regex pattern for username validation to allow special characters @#$%&*()
fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*()
* fix(Registration.spec.tsx): fix validation error message for username length requirement
* fix(bingAI): markdown formatting for final stream response due to new strict payload validation on the frontend
* fix: add missing prop to bing Error response
* refactor: replace lodash import with specific function import
fix(api): esm imports to cjs
* refactor(Messages.tsx): convert to TS, out-source scrollToDiv logic to a custom hook
fix(ScreenshotContext.tsx): change Ref to RefObject in ScreenshotContextType
feat(useScrollToRef.ts): add useScrollToRef hook for scrolling to a ref with throttle
fix(Chat.tsx): update import path for Messages component
fix(Search.tsx): update import path for Messages component
* chore(types.ts): add TAskProps and TOptions types
refactor(useMessageHandler.ts): use TAskFunction type for ask function signature
* refactor(Message/Content): convert to TS, move Plugin component to Content dir
* feat(MessageContent.tsx): add MessageContent component for displaying and editing message content
feat(index.ts): export MessageContent component from Messages/Content directory
* wip(Message.jsx): conversion and use of new component in progress
* refactor: convert Message.jsx to TS and fix typing/imports based on changes
* refactor: add typed props and refactor MultiMessage to TS, fix typing issues resulting from the conversion
* edit message in progress
* feat: complete edit AI message logic, refactor continue logic
* feat(middleware): add validateMessageReq middleware
feat(routes): add validation for message requests using validateMessageReq middleware
feat(routes): add create, read, update, and delete routes for messages
* feat: complete frontend logic for editing messages in place
feat(messages.js): update route for updating a specific message
- Change the route for updating a message to include the messageId in the URL
- Update the request handler to use the messageId from the request parameters and the text from the request body
- Call the updateMessage function with the updated parameters
feat(MessageContent.tsx): add functionality to update a message
- Import the useUpdateMessageMutation hook from the data provider
- Destructure the conversationId, parentMessageId, and messageId from the message object
- Create a mutation function using the useUpdateMessageMutation hook
- Implement the updateMessage function to call the mutation function with the updated message parameters
- Update the messages state to reflect the updated message text
feat(api-endpoints.ts): update messages endpoint to include messageId
- Update the messages endpoint to include the messageId as an optional parameter
feat(data-service.ts): add updateMessage function
- Implement the updateMessage function to make a PUT request to
* fix(messages.js): make updateMessage function asynchronous and await its execution
* style(EditIcon): make icon active for AI message
* feat(gptPlugins/anthropic): add edit support
* fix(validateMessageReq.js): handle case when conversationId is 'new' and return empty array
feat(Message.tsx): pass message prop to SiblingSwitch component
refactor(SiblingSwitch.tsx): convert to TS
* fix(useMessageHandler.ts): remove message from currentMessages if isContinued is true
feat(useMessageHandler.ts): add support for submission messages in setMessages
fix(useServerStream.ts): remove unnecessary conditional in setMessages
fix(useServerStream.ts): remove isContinued variable from submission
* fix(continue): switch to continued message generation when continuing an earlier branch in conversation
* fix(abortMiddleware.js): fix condition to check partialText length
chore(abortMiddleware.js): add error logging when abortMessage fails
* refactor(MessageHeader.tsx): convert to TS
fix(Plugin.tsx): add default value for className prop in Plugin component
* refactor(MultiMessage.tsx): remove commented out code
docs(MultiMessage.tsx): update comment to clarify when siblingIdx is reset
* fix(GenerationButtons): optimistic state for continue button
* fix(MessageContent.tsx): add data-testid attribute to message text editor
fix(messages.spec.ts): update waitForServerStream function to include edit endpoint check
feat(messages.spec.ts): add test case for editing messages
* fix(HoverButtons & Message & useGenerations): Refactor edit functionality and related conditions
- Update enterEdit function signature and prop
- Create and utilize hideEditButton variable
- Enhance conditions for edit button visibility and active state
- Update button event handlers
- Introduce isEditableEndpoint in useGenerations and refine continueSupported condition.
* fix(useGenerations.ts): fix condition for hideEditButton to include error and searchResult
chore(data-provider): bump version to 0.1.6
fix(types.ts): add status property to TError type
* chore: bump @dqbd/tiktoken to 1.0.7
* fix(abortMiddleware.js): add required isCreatedByUser property to the error response object
* refactor(Message.tsx): remove unnecessary props from SiblingSwitch component, as setLatestMessage is firing on every switch already
refactor(SiblingSwitch.tsx): remove unused imports and code
* chore(BaseClient.js): move console.debug statements back inside if block
* feat(AzureCognitiveSearchPlugin)
* feat(tools/AzureCognitiveSearch.js): Add a new plugin (not structured
version)
* feat(tools/structured/AzureCognitiveSearch.js): Add a new plugin (structured version)
* feat(tools/manifest.json, tools/index.js, tools/util/handleTools.js):
Add configurations for the plugin
* feat(api/package.json, package-lock.json): Installed a new package for the
plugin (@azure/search-documents)
* feat(.env.example): Add new environment variables for the plugin
Here is the link to the corresponding discussion page:
https://github.com/danny-avila/LibreChat/discussions/567
* docs(AzureCognitiveSearchPlugin)
* docs(features/plugins/azure_cognitive_search.md): Add a new document
for the plugin
* (fix:.env.example)
* reverted extra whitespaces removed by the editor
* docs(mkdocs.yml)
* Add the Azure Cognitive Search Plugin's documentation item to
mkdocs.yml.
fix(PluginAuthForm): handle case when pluginKey is null or undefined
fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined
fix(AuthContext): make authConfig optional in AuthContextProvider
feat(hooks): add useServerStream hook
fix(conversation): setSubmission to null instead of empty object
fix(preset): specify type for presets atom
fix(search): specify type for isSearchEnabled atom
fix(submission): specify type for submission atom
* feat(useMessageHandler.js/ts): Refactor and add features to handle user messages, support multiple endpoints/models, generate placeholder responses, regeneration, and stopGeneration function
fix(conversation.ts, buildTree.ts): Import TMessage type, handle null parentMessageId
feat(schemas.ts): Update and add schemas for various AI services, add default values, optional fields, and endpoint-to-schema mapping, create parseConvo function
chore(useMessageHandler.js, schemas.ts): Remove unused imports, variables, and chatGPT enum
* wip: add generation buttons
* refactor(cleanupPreset.ts): simplify cleanupPreset function
refactor(getDefaultConversation.js): remove unused code and simplify getDefaultConversation function
feat(utils): add getDefaultConversation function
This commit adds a new utility function called `getDefaultConversation` to the `client/src/utils/getDefaultConversation.ts` file. This function is responsible for generating a default conversation object based on the provided parameters.
The `getDefaultConversation` function takes in an object with the following properties:
- `conversation`: The conversation object to be used as a base.
- `endpointsConfig`: The configuration object containing information about the available endpoints.
- `preset`: An optional preset object that can be used to override the default behavior.
The function first tries to determine the target endpoint based on the preset object. If a valid endpoint is found, it is used as the target endpoint. If not, the function tries to retrieve the last conversation setup from the local storage and uses its endpoint if it is valid. If neither the preset nor the local storage contains a valid endpoint, the function falls back to a default endpoint.
Once the target endpoint is determined,
* fix(utils): remove console.error statement in buildDefaultConversation function
fix(schemas): add default values for catch blocks in openAISchema, googleSchema, bingAISchema, anthropicSchema, chatGPTBrowserSchema, and gptPluginsSchema
* fix: endpoint not changing on change of preset from other endpoint, wip: refactor
* refactor: preset items to TSX
* refactor: convert resetConvo to TS
* refactor(getDefaultConversation.ts): move defaultEndpoints array to the top of the file for better readability
refactor(getDefaultConversation.ts): extract getDefaultEndpoint function for better code organization and reusability
* feat(svg): add ContinueIcon component
feat(svg): add RegenerateIcon component
feat(svg): add ContinueIcon and RegenerateIcon components to index.ts
* feat(Button.tsx): add onClick and className props to Button component
feat(GenerationButtons.tsx): add logic to display Regenerate or StopGenerating button based on isSubmitting and messages
feat(Regenerate.tsx): create Regenerate component with RegenerateIcon and handleRegenerate function
feat(StopGenerating.tsx): create StopGenerating component with StopGeneratingIcon and handleStopGenerating function
* fix(TextChat.jsx): reorder imports and variables for better readability
fix(TextChat.jsx): fix typo in condition for isNotAppendable variable
fix(TextChat.jsx): remove unused handleStopGenerating function
fix(ContinueIcon.tsx): remove unnecessary closing tags for polygon elements
fix(useMessageHandler.ts): add missing type annotations for handleStopGenerating and handleRegenerate functions
fix(useMessageHandler.ts): remove unused variables in return statement
* fix(getDefaultConversation.ts): refactor code to use getLocalStorageItems function
feat(getLocalStorageItems.ts): add utility function to retrieve items from local storage
* fix(OpenAIClient.js): add support for streaming result in sendCompletion method
feat(OpenAIClient.js): add finish_reason metadata to opts in sendCompletion method
feat(Message.js): add finish_reason field to Message model
feat(messageSchema.js): add finish_reason field to messageSchema
feat(openAI.js): parse chatGptLabel and promptPrefix from req.body and pass rest of the modelOptions to endpointOption
feat(openAI.js): add addMetadata function to store metadata in ask function
feat(openAI.js): add metadata to response if available
feat(schemas.ts): add finish_reason field to tMessageSchema
* feat(types.ts): add TOnClick and TGenButtonProps types for button components
feat(Continue.tsx): create Continue component for generating button
feat(GenerationButtons.tsx): update GenerationButtons component to use Continue component
feat(Regenerate.tsx): create Regenerate component for regenerating button
feat(Stop.tsx): create Stop component for stop generating button
* feat(MessageHandler.jsx): add MessageHandler component to handle messages and conversations
fix(Root.jsx): fix import paths for Nav and MessageHandler components
* feat(useMessageHandler.ts): add support for generation parameter in ask function
feat(useMessageHandler.ts): add support for isEdited parameter in ask function
feat(useMessageHandler.ts): add support for continueGeneration function
fix(createPayload.ts): replace endpoint URL when isEdited parameter is true
* chore(client): set skipLibCheck to true in tsconfig.json
* fix(useMessageHandler.ts): remove unused clientId variable
fix(schemas.ts): make clientId field in tMessageSchema nullable and optional
* wip: edit route for continue generation
* refactor(api): move handlers to root of routes dir
* fix(useMessageHandler.ts): initialize currentMessages to an empty array if messages is null
fix(useMessageHandler.ts): update initialResponse text to use responseText variable
fix(useMessageHandler.ts): update setMessages logic for isRegenerate case
fix(MessageHandler.jsx): update setMessages logic for cancelHandler, createdHandler, and finalHandler
* fix(schemas.ts): make createdAt and updatedAt fields optional and set default values using new Date().toISOString()
fix(schemas.ts): change type annotation of TMessage from infer to input
* refactor(useMessageHandler.ts): rename AskProps type to TAskProps
refactor(useMessageHandler.ts): remove generation property from ask function arguments
refactor(useMessageHandler.ts): use nullish coalescing operator (??) instead of logical OR (||)
refactor(useMessageHandler.ts): pass the responseMessageId to message prop of submission
* fix(BaseClient.js): use nullish coalescing operator (??) instead of logical OR (||) for default values
* fix(BaseClient.js): fix responseMessageId assignment in handleStartMethods method
feat(BaseClient.js): add support for isEdited flag in sendMessage method
feat(BaseClient.js): add generation to responseMessage text in sendMessage method
* fix(openAI.js): remove unused imports and commented out code
feat(openAI.js): add support for generation parameter in request body
fix(openAI.js): remove console.log statement
fix(openAI.js): remove unused variables and parameters
fix(openAI.js): update response text in case of error
fix(openAI.js): handle error and abort message in case of error
fix(handlers.js): add generation parameter to createOnProgress function
fix(useMessageHandler.ts): update responseText variable to use generation parameter
* refactor(api/middleware): move inside server dir
* refactor: add endpoint specific, modular functions to build options and initialize clients, create server/utils, move middleware, separate utils into api general utils and server specific utils
* fix(abortMiddleware.js): import getConvo and getConvoTitle functions from models
feat(abortMiddleware.js): add abortAsk function to abortController to handle aborting of requests
fix(openAI.js): import buildOptions and initializeClient functions from endpoints/openAI
refactor(openAI.js): use getAbortData function to get data for abortAsk function
* refactor: move endpoint specific logic to an endpoints dir
* refactor(PluginService.js): fix import path for encrypt and decrypt functions in PluginService.js
* feat(openAI): add new endpoint for adding a title to a conversation
- Added a new file `addTitle.js` in the `api/server/routes/endpoints/openAI` directory.
- The `addTitle.js` file exports a function `addTitle` that takes in request parameters and performs the following actions:
- If the `parentMessageId` is `'00000000-0000-0000-0000-000000000000'` and `newConvo` is true, it proceeds with the following steps:
- Calls the `titleConvo` function from the `titleConvo` module, passing in the necessary parameters.
- Calls the `saveConvo` function from the `saveConvo` module, passing in the user ID and conversation details.
- Updated the `index.js` file in the `api/server/routes/endpoints/openAI` directory to export the `addTitle` function.
- This change adds
* fix(abortMiddleware.js): remove console.log statement
refactor(gptPlugins.js): update imports and function parameters
feat(gptPlugins.js): add support for abortController and getAbortData
refactor(openAI.js): update imports and function parameters
feat(openAI.js): add support for abortController and getAbortData
fix(openAI.js): refactor code to use modularized functions and middleware
fix(buildOptions.js): refactor code to use destructuring and update variable names
* refactor(askChatGPTBrowser.js, bingAI.js, google.js): remove duplicate code for setting response headers
feat(askChatGPTBrowser.js, bingAI.js, google.js): add setHeaders middleware to set response headers
* feat(middleware): validateEndpoint, refactor buildOption to only be concerned of endpointOption
* fix(abortMiddleware.js): add 'finish_reason' property with value 'incomplete' to responseMessage object
fix(abortMessage.js): remove console.log statement for aborted message
fix(handlers.js): modify tokens assignment to handle empty generation string and trailing space
* fix(BaseClient.js): import addSpaceIfNeeded function from server/utils
fix(BaseClient.js): add space before generation in text property
fix(index.js): remove getCitations and citeText exports
feat(buildEndpointOption.js): add buildEndpointOption middleware
fix(index.js): import buildEndpointOption middleware
fix(anthropic.js): remove buildOptions function and use endpointOption from req.body
fix(gptPlugins.js): remove buildOptions function and use endpointOption from req.body
fix(openAI.js): remove buildOptions function and use endpointOption from req.body
feat(utils): add citations.js and handleText.js modules
fix(utils): fix import statements in index.js module
* refactor(gptPlugins.js): use getResponseSender function from librechat-data-provider
* feat(gptPlugins): complete 'continue generating'
* wip: anthropic continue regen
* feat(middleware): add validateRegistration middleware
A new middleware function called `validateRegistration` has been added to the list of exported middleware functions in `index.js`. This middleware is responsible for validating registration data before allowing the registration process to proceed.
* feat(Anthropic): complete continue regen
* chore: add librechat-data-provider to api/package.json
* fix(ci): backend-review will mock meilisearch, also installs data-provider as now needed
* chore(ci): remove unneeded SEARCH env var
* style(GenerationButtons): make text shorter for sake of space economy, even though this diverges from chat.openai.com
* style(GenerationButtons/ScrollToBottom): adjust visibility/position based on screen size
* chore(client): 'Editting' typo
* feat(GenerationButtons.tsx): add support for endpoint prop in GenerationButtons component
feat(OptionsBar.tsx): pass endpoint prop to GenerationButtons component
feat(useGenerations.ts): create useGenerations hook to handle generation logic
fix(schemas.ts): add searchResult field to tMessageSchema
* refactor(HoverButtons): convert to TSX and utilize new useGenerations hook
* fix(abortMiddleware): handle error with res headers set, or abortController not found, to ensure proper API error is sent to the client, chore(BaseClient): remove console log for onStart message meant for debugging
* refactor(api): remove librechat-data-provider dep for now as it complicates deployed docker build stage, re-use code in CJS, located in server/endpoints/schemas
* chore: remove console.logs from test files
* ci: add backend tests for AnthropicClient, focusing on new buildMessages logic
* refactor(FakeClient): use actual BaseClient sendMessage method for testing
* test(BaseClient.test.js): add test for loading chat history
test(BaseClient.test.js): add test for sendMessage logic with isEdited flag
* fix(buildEndpointOption.js): add support for azureOpenAI in buildFunction object
wip(endpoints.js): fetch Azure models from Azure OpenAI API if opts.azure is true
* fix(Button.tsx): add data-testid attribute to button component
fix(SelectDropDown.tsx): add data-testid attribute to Listbox.Button component
fix(messages.spec.ts): add waitForServerStream function to consolidate logic for awaiting the server response
feat(messages.spec.ts): add test for stopping and continuing message and improve browser/page context order and closing
* refactor(onProgress): speed up time to save initial message for editable routes
* chore: disable AI message editing (for now), was accidentally allowed
* refactor: ensure continue is only supported for latest message style: improve styling in dark mode and across all hover buttons/icons, including making edit icon for AI invisible (for now)
* fix: add test id to generation buttons so they never resolve to 2+ items
* chore(package.json): add 'packages/' to the list of ignored directories
chore(data-provider/package.json): bump version to 0.1.5
* fix(PluginsClient.js): fix issue with creating LLM when using Azure
* chore(PluginsClient.js): omit azure logging
* refactor(PluginsClient.js): simplify assignment of azure variable
The code was simplified by directly assigning the value of `this.azure` to the `azure` variable using object destructuring. This makes the code cleaner and more concise.
avigator.clipboard.writeText method. This should fix the issue with browser incompatibility with navigator SDK and allow users to copy code from the CodeBlock component successfully.
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware
feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable
* fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values
* refactor(validateRegistration.js): remove console.log statement
* chore(playwright.yml): skip browser download during yarn install
chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test
chore(playwright.yml): install Playwright dependencies using npx playwright install-deps
chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium
chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest
chore(playwright.yml): run Playwright tests using npm run e2e:ci
* chore(playwright.yml): change npm install order and update comment
The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install.
* chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
* chore(deploy-compose.yml): comment out mongodb port mapping for safety in deployment
chore(deploy-compose.yml): add bind_ip option to mongodb command to allow access from outside docker
chore(docker-compose.yml): comment out mongodb port mapping for safety in deployment
chore(docker-compose.yml): add bind_ip option to mongodb command to allow access from outside docker
* fix(deploy-compose.yml): remove bind_ip option from mongod command
fix(docker-compose.yml): remove bind_ip option from mongod command
fix(update.js): remove --volumes flag from downCommand
docs(digitalocean.md): update command description to remove --volumes flag
fix(package.json): remove --volumes flag from stop:deployed script
* docs: wip: digitalocean guide
* feat(deployed-update.js): add script for updating deployed instance
docs(deployment/digitalocean.md): update instructions for Digital Ocean deployment
* fix(deployed-update.js): change docker-compose pull command to only pull api image
fix(digitalocean.md): update instructions to add user to docker group and start docker before running installation/update script
* feat(package.json): add 'update:deployed' script for deployed updates
docs: wip: digitalocean
* chore(package.json): add start:deployed and stop:deployed scripts for deploying with docker-compose
* docs(deployment/digitalocean.md): add instructions for stopping and starting the docker container
* docs(deployment/digitalocean.md): add instructions for stopping and starting the docker container
docs(deployment/digitalocean.md): add command for checking active docker containers
docs(deployment/digitalocean.md): provide guidance for troubleshooting before creating a new issue
* fix(deployed-update.js): refactor code to use getCurrentBranch function
feat(deployed-update.js): add support for rebasing current branch onto main branch
docs(digitalocean.md): update instructions for deploying with Docker on remote Ubuntu server
package.json: add rebase:deployed script to run deployed-update.js with --rebase flag
* fix(deployed-update.js): fix variable scope issue in deployed-update.js
docs(digitalocean.md): fix grammar and clarify instructions for editing NGINX file
* docs(deployment): add warning about potential merge conflicts when editing branch
docs(deployment): clarify that code changes in environment won't be reflected
* docs: Update digitalocean.md with images and revised instructions
* docs(digitalocean.md): formatting
* docs(digitalocean.md): add ToC
* docs(digitalocean.md): fix ToC
* Update mkdocs.yml
The condition for running Playwright tests on pull requests was not properly formatted. The repository name was not enclosed in quotes. This commit fixes the condition by adding single quotes around the repository name.
* refactor(e2e): fix tests with latest changes, convert to TS, use test Ids
* chore(EndpointMenu.jsx): add data-testid attribute to new-conversation-menu button
* refactor(EndpointItem): add data-testid attr., convert to TS
* refactor(e2e): remove unnecessary awaits and convert to TS
* chore(playwright.config.local.ts): add absolute path to server index.js file
chore(playwright.config.local.ts): add dotenv configuration
chore(playwright.config.local.ts): change webServer command to use absolute path
chore(playwright.config.local.ts): add NODE_ENV and process.env to webServer env
chore(playwright.config.local.ts): remove unused import
chore(login.spec.js): delete login.spec.js file
* chore(.gitignore): add 'my.secrets' to the list of ignored files
fix(Registration.tsx): add 'data-testid' attribute to the error message div
fix(Registration.spec.tsx): comment out test case that calls 'registerUser.mutate'
* chore(ConvoIcon.tsx): add data-testid attribute to svg element
chore(messages.spec.ts): refactor conversation navigation logic
* chore(playwright.config.ts): add support for absolute path to server index.js file
feat(playwright.config.ts): add support for dotenv configuration
feat(playwright.config.ts): set NODE_ENV to 'production' in webServer environment variables
* chore(workflows): comment out push event and specify paths for pull_request event in backend-review.yml
chore(workflows): comment out push event and specify paths for pull_request event in frontend-review.yml
* chore(install.js): add check to skip install script in CI environment
* chore: complete playwright workflow
* chore(Landing.tsx): add data-testid attribute to landing title element
chore(authenticate.ts): update selector to wait for landing title element by test id instead of text content
* chore(playwright.yml): add step to upload screenshot artifact on failure
fix(authenticate.ts): capture screenshot before waiting for landing title and increase timeout due to GH Actions load time
* chore(playwright.yml): rename artifact name from 'screenshot' to 'login-screenshot'
feat(LoginForm.tsx): add data-testid attribute to login button
fix(authenticate.ts): change screenshot name to 'login-screenshot.png' and conditionally take screenshot only in CI environment
* chore(playwright.yml): add CI environment variable and set it to true
* chore(playwright.yml): update Playwright installation command
chore(playwright.config.ts): update storageState path to use process.cwd()
* fix(playwright.yml): update node version to 18 in setup-node action
fix(playwright.yml): update actions/cache to v3 in Cache Node.js modules step
fix(playwright.yml): update actions/cache to v3 in Cache Playwright installations step
fix(authenticate.ts): change login button click to press 'Enter' on password input
* chore(playwright.yml): update E2E_USER_EMAIL and E2E_USER_PASSWORD values for testing purposes
chore(authenticate.ts): add console.dir to log user object for debugging
* chore(playwright.yml): add step to upload storageState artifact
The storageState artifact is now uploaded as part of the workflow. This artifact contains the state of the storage used during the end-to-end tests. It will be retained for 2 days.
* chore(playwright.yml): comment out upload screenshot step
chore(playwright.config.ts): change NODE_ENV to development
chore(authenticate.ts): comment out screenshot related code
* chore(playwright.config.ts): add SESSION_EXPIRY environment variable with value 86400000
* chore(playwright.yml): update environment variables in Playwright workflow
fix(General.tsx): add data-testid attributes to clear conversations buttons
test(messages.spec.ts): add setup and teardown steps for clearing conversations before and after tests
* fix(messages.spec.ts): fix clearing conversations before and after message tests
feat(messages.spec.ts): add beforeEach and afterEach hooks to create and close new page for each test
* chore: remove storageStage upload artifact
* refactor(SearchBar): convert to TS, useLocalize
* fix(typing): minor type issues
* chore(package.json): add 'reinstall:docker' script for rebuilding Docker environment in current branch
* fix(Enum): cannot be used as a value when imported as type
* hotfix(types): corrected types, some causing application error (bing null model)
* hotfix(Plugins): fix undefined localStorage item causing Application error
* feat: add zod schemas for better type safety
* refactor(useSetOptions): remove 'as Type' in favor of zod schema
* fix: descendant console error, change <p> tag to <div> tag for content in PluginTooltip component
* style(MessagesView): instant/snappier scroll behavior matching official site
* fix(Messages): add null check for scrollableRef before accessing its properties in handleScroll and useEffect
* fix(messageSchema.js): change type of invocationId from string to number
fix(schemas.ts): make authenticated property in tPluginSchema optional
fix(schemas.ts): make isButton property in tPluginSchema optional
fix(schemas.ts): make messages property in tConversationSchema optional and change its type to array of strings
fix(schemas.ts): make systemMessage property in tConversationSchema nullable and optional
fix(schemas.ts): make modelLabel property in tConversationSchema nullable and optional
fix(schemas.ts): make chatGptLabel property in tConversationSchema nullable and optional
fix(schemas.ts): make promptPrefix property in tConversationSchema nullable and optional
fix(schemas.ts): make context property in tConversationSchema nullable and optional
fix(schemas.ts): make jailbreakConversationId property in tConversationSchema nullable and optional
fix(schemas.ts): make conversationSignature property in tConversationSchema nullable and optional
fix(schemas.ts): make clientId property
* refactor(types): replace main types with zod schemas and inferred types
* refactor(types/schemas): use schemas for better type safety of main types
* style(ModelSelect/Buttons): remove shadow and transition
* style(ModelSelect): button changes to closer match OpenAI
* style(ModelSelect): remove green rings which flicker
* style(scrollToBottom): add two separate scrolling functions
* fix(OptionsBar.tsx): handle onFocus and onBlur events to update opacityClass
fix(Messages/index.jsx): increase debounce time for scrollIntoView function
* feat: Add SearchBar component to Nav
This commit adds the SearchBar component to the navigation bar in order to enable search functionality. Now users can easily search for specific items within the navigation.
* Refactor Nav and SearchBar components
The commit refactors the Nav component by moving the SearchBar component within the Nav component. This change ensures that the SearchBar is rendered only when the isSearchEnabled condition is true.
In addition, the commit also modifies the styling of the SearchBar component by adding rounded corners and border to enhance the visual appearance.
* Update gitignore
* C
Refactor search bar styles
This commit refactors the styles of the search bar component in the Nav component. The border color and hover background color have been modified to improve the visual appearance.
* Fix margin
* Rename Logout.jsx to Logout.tsx and update import statements accordingly.
Replace the use of Recoil and store with useLocalize hook for localization.
Update the usage of localize function by removing the lang parameter.
* style(Nav): match transition effect of official site
* fix(Pages): fix bug when searchResults pageSize is < prev PageSize causes currentPage to be impossible value
* refactor/fix(Nav): fix width transition animation and refactor to TS
* progress on settings refactor
* fix(helpers.js): replace fs.rmdirSync with fs.rm to delete node_modules directory recursively
fix(packages.js): delete package-lock.json if it exists before running the script
* feat(CrossIcon.tsx): add CrossIcon component
* wip: refactor Options for modularity into higher order components, OptionsBar > ModelSelect/Settings
* refactor: import more from utils/index, including cardStyle used by model select/settings
* refactor(AnthropicOptions): refactor to new format, OpenAI: reduce format to name of endpoint
* refactor(AnthropicSettings): refactor to new format, match defaults to API docs
* fix: google and anthropic defaults
* refactor(conversation/submission atoms): add typing, remove unused code
* chore(types.ts): add missing type definitions for TMessages, TMessagesAtom, TConversationAtom, and ModelSelectProps
feat(types.ts): make endpoint property nullable in TSubmission, TEndpointOption, TConversation, and TPreset types
* refactor(ChatGPT): refactor to new format, add omit settings logic
* refactor(EndpointSettings/BingAI): new dir structure and format BingAI options/settings to new
* fix: update useUpdateTokenCountMutation to accept an object with a 'text' property instead of a string
* fix(endpoints): ensure expected behaviors for preset dialogs
* chore(index.ts): add defaultTextProps to utils/index.ts for use in settings components
* chore(index.ts): add optionText to utils/index.ts for use in settings components
* wip: refactor google settings
* wip: progress with Google refactor, needs AdditionalButtons handling and global state setters
* refactor(OptionsBar.tsx): The setOption function has been refactored to use the useSetOptions custom hook for setting conversation options.
* chore(Anthropic.tsx, BingAI.tsx, Google.tsx, OpenAI.tsx): adjust height of container div in Settings component; chore(Examples.tsx): adjust height in Examples component
* refactor(Google): complete google refactor
feat(client): add new component PopoverButtons for displaying popover buttons in EndpointPopover
feat(data-provider): add types for PopoverButton and EndpointOptionsPopoverProps
* fix(OptionsBar.tsx): add useEffect hook to handle opacity class based on messagesTree and advancedMode
fix(style.css): rename class from 'openAIOptions-simple-container' to 'options-bar' and update references
* refactor(Plugins/OptionsBar): complete refactor of Plugins Select options, consolidate logic from TextChat to OptionsBar
* fix(Plugins.tsx): filter lastSelectedTools to remove any tools that are not in the current tools list
fix(useSetOptions.ts): remove unnecessary empty line
* feat(useSetOptions.ts): add setAgentOption function to update agentOptions in conversation state
feat(types.ts): add setAgentOption function to UseSetOptions type
* refactor(Settings/Plugins): refactor to new format, refactor(OptionHover): use same component for all endpoints
* refactor(OptionHover.tsx): refactor types object to use nested objects for openAI and gptPlugins
feat(OptionHover.tsx): add openAI object with specific properties for openAI configuration
* refactor(AgentSettings): new format, feat(types.ts): add TAgentOptions type for defining agent options in a conversation
* feat(PopoverButtons.tsx): add support for GPT plugin settings button
feat(Plugins.tsx): create PluginsView component for displaying plugin settings
feat(optionSettings.ts): add showAgentSettings atom for controlling agent settings visibility
* feat(client): add support for PluginsSettings in Input/Settings component
fix(client): change import path for PluginsSettings in Input/Settings component
* refactor(Settings/Plugins): complete refactor, store: refactor to TS, refactor: import defaultTextPropsLabel from utils
* feat(EndpointSettings, AgentSettings, Anthropic, Google, types.ts): Add support for Recoil state management and useRecoilValue hook; Pass models from endpointsConfig to various components; Add TModels type and update ModelSelectProps type.
fix(AgentSettings, Anthropic, Google, GoogleView, Plugins, OpenAI, Settings.tsx): Change import statements for ModelSelectProps from librechat-data-provider; Add models as a parameter to various components; Add models prop to PluginsView, Settings, and other components.
* refactor(EditPresetDialog.jsx): update import statements for Examples and AgentSettings components
feat(Settings/index.ts): add export statements for Examples and AgentSettings components
* chore(package.json): update eslint-plugin-import to version 2.28.0
* fix(eslint): dependency cycle rule is now working
* fix: dependency cycle errors and type errors
* refactor(EditPresetDialog.jsx): update import path for DialogTemplate component
refactor(NewConversationMenu/index.jsx): update import path for DialogTemplate component
refactor(ExportModel.jsx): update import path for DialogTemplate component
* refactor: rename NewConversationMenu to EndpointMenu
* style: mobile and desktop optimizations
* chore: eslint changes
* chore(eslintrc.js): update eslint configuration to use 'prettier' plugin
chore(postcss.config.cjs): update postcss configuration to use single quotes for require statements
fix(helpers.js): fix fs.rmSync function call to delete node_modules directory recursively
feat(update.js): add support for skipping git commands with '-g' flag
* chore(ModelSelect.tsx): add support for azureOpenAI option component
chore(Settings.tsx): add support for azureOpenAI option component
chore(package.json): add rebuild:package-lock and update:branch scripts
* fix(OptionHover.tsx): fix accessing nested properties in types object
feat(OptionHover.tsx): add check for existence of text before rendering HoverCardContent
* chore(style.css): update transition duration for options-bar from 0.3s to 0.25s
* fix(ScrollToBottom.jsx): fix z-index value for scroll button
* style: improve dialogs
* fix(Nav.jsx): adjust width and max-width of nav component
* chore(Nav.jsx): update max-width class for nav component in different screen sizes
chore(Dialog.tsx): update class for DialogFooter component to use flex-row layout
* fix(client): fix node_module resolution with path mapping
* fix(AdjustToneButton.jsx): add z-index to adjust tone button for proper layering
fix(TextChat.jsx): change onClick function to use arrow function to avoid immediate execution
fix(mobile.css): update z-index for nav and nav-mask for proper layering
chore(package.json): rename update:branch script to reinstall for clarity and consistency
* fix(OptionsBar/Settings): add null checks for conversation in BingAI.tsx, ChatGPT.tsx, Plugins.tsx, Settings.tsx
* style(TextChat/OptionsBar): match official site styles, setup regen/continue/stop buttons div
* chore: Import and apply removeFocusOutlines utility across various components, and rename removeButtonOutline to removeFocusOutlines
chore(Settings): Remove unused import and conditionally return null if conversation is falsy
* feat(hooks): add useLocalize hook
The useLocalize hook is added to the hooks/index.ts file. This hook allows for localization of phrases using the localize function from the ~/localization/Translation module. The hook uses the lang value from the store to determine the current language and returns a function that takes a phraseKey and optional values array as arguments and returns the localized phrase.
* refactor(OptionHover.tsx): Update text keys for OptionHover component, use new hook: useLocalize
* refactor(useDocumentTitle.ts): refactor to TS
* fix(typescript): type issues and update typescript linting deps
* refactor: Update ThemeContext and useOnClickOutside to TypeScript
chore(useDidMountEffect.js): Remove useDidMountEffect hook
* feat: GenerationButtons for stop/continue/regen, remove AdjustToneButton in favor of alternate advanced mode/Settings in OptionsBar
* fix(EndpointOptionsPopover.tsx): change switchToSimpleMode function name to closePopover
fix(GenerationButtons.tsx): change advancedMode prop name to showPopover
fix(OptionsBar.tsx): change advancedMode state name to showPopover
feat(OptionsBar.tsx): add logic to show/hide popover based on showPopover state
fix(types.ts): change switchToSimpleMode function name to closePopover
* chore: remove template button
* chore(GenerationButtons.tsx): adjust positioning of the div element
chore(Plugins.tsx): adjust width of the MultiSelectDropDown component
chore(OptionsBar.tsx): adjust padding of the button element
* refactor(EditPresetDialog): use new modular higher order components
* chore(newoptionsbar.html): delete unused file newoptionsbar.html
* refactor(EditPresetDialog): convert to TS
* chore(babel.config.cjs): update babel configuration, linting
* chore(EditPresetDialog.tsx): update className for DialogTemplate to include pb-0
chore(EndpointOptionsDialog.jsx): update className for DialogTemplate to include pb-0
chore(PopoverButtons.tsx): add buttonClass prop to PopoverButtons component
chore(DialogTemplate.tsx): update className for the footer div to include h-auto
chore(Dropdown.jsx): remove id prop from Dropdown component
chore(mobile.css): update transition duration for .nav class from 0.2s to 0.15s
* refactor(EditPresetDialog.tsx): simplify localization usage with hook
* chore(EditPresetDialog.tsx): update containerClassName to include z-index value
* fix(endpoints.ts): change type of endpointsConfig atom to TEndpointsConfig
refactor(cleanupPreset.ts): convert to TS
fix(index.ts): export cleanupPreset utility function
fix(types.ts): add missing properties to TPreset type
* refactor(EndpointOptionsDialog): convert to TS
* fix(EditPresetDialog.tsx):
- import cleanupPreset from index
- add null check before submitting preset
- add null check before exporting preset
refactor(SaveAsPresetDialog.tsx): convert to TS
fix(usePresetOptions.ts): import cleanupPreset from index
fix(types.ts):
- make title prop optional in EditPresetProps
- change preset prop in CleanupPreset to be partial
* chore: reorganize imports in App, EndpointMenu, Messages, and ExportModel components
feat(ScreenshotContext.jsx): add ScreenshotContext to hooks/index
chore(index.ts): export ThemeContext, ScreenshotContext, ApiErrorBoundaryContext hooks, cleanupPreset, and getIcon functions from utils
* wip: add headerClassName for dialog template
* chore(EndpointOptionsDialog.tsx): remove unused headerClassName prop
chore(EndpointOptionsDialog.tsx): adjust height of main container in mobile and desktop view
* fix(react-query-service.ts): change return type of useGetEndpointsQuery to QueryObserverResult<t.TEndpointsConfig>
* refactor: imports from index and refactor to TS
* refactor: refactor all svg components to TS
* refactor: refactor all UI components to TS, remove unused component
* fix(SelectDropDown.tsx): remove file extension from import statement for CheckMark component
* fix: SaveAsPresetDialog typing issue
* fix(OptionsBar): close popover when an endpoint with no settings is selected
* chore(ChatGPT.tsx): update width of model select dropdown to 60px
refactor(types.ts): decouple ModelSelectProps from SettingsProps
* fix(popover Settings): space taken from the options menu for each endpoint
* fix:'Set token first' element alignment, add padding to endpointmenu icon in mobile
* style: match official site header
* refactor(EndpointOptionsDialog): make functionality explicitly saving current convos as presets
* fix(useLocalize.ts): change values parameter from an array to rest parameters
* refactor(EndpointSettings): Utilize useLocalize hook for all endpoint settings
* fix(Popover): correct spacing/center and remove focus outlines for close button
* chore: employ use of cn (clsx) in Popover styles
* chore(EditPresetDialog.tsx): update className to add padding bottom
chore(EndpointOptionsDialog.tsx): update className to add padding bottom
* style(EndpointMenu, TextChat): add better styling at diff. breakpoints
* refactor(EndpointSettings): consolidate container style to higher order component
* refactor(EditPresetDialog.tsx): pass custom style to Settings from here
* style: setting dialogs improved in all views
* style(EndpointMenu): improve UX for mobile
* style(PresetDialog): increase height so scrollbar isn't triggered
* chore(EditPresetDialog.tsx): update className to include xl height for DialogTemplate
chore(InputNumber.tsx): update className to include max height for InputNumber component
* fix: light mode styling
* fix(OptionsBar/ScrollToBottom/Popover): quick fix to rework in future: hide scrollToBottom when Popover is open
* style: remove bg-gradient around textarea in mobile view
* chore(ThemeContext.tsx): refactor ThemeContext to use default context value, also fixes type issue
* chore(EditPresetDialog.tsx): adjust grid layout in EditPresetDialog component
* style(TextChat): make gradient more opaque/smoother
* fix(TextChat.jsx): fix background gradient color based on theme and system preference
* test(layout-test-utils.tsx): add mock implementation for window.matchMedia in test setup
feat(layout-test-utils.tsx): add authConfig prop to AuthContextProvider in renderWithProvidersWrapper function
chore(tsconfig.json): include test directory in tsconfig include section
* chore(jest.config.cjs): update test file paths in jest configuration
chore(Login.spec.tsx): update test file path in import statement
chore(LoginForm.spec.tsx): update test file path in import statement
chore(Registration.spec.tsx): update test file path in import statement
chore(PluginAuthForm.spec.tsx): update test file path in import statement
chore(PluginStoreDialog.spec.tsx): update test file path in import statement
chore(layout-test-utils.tsx): move matchMedia mock to separate file
chore(tsconfig.json): add path mapping for test files in client directory
* test: add import for 'test/matchMedia.mock' in test files
The changes in this commit add an import statement for 'test/matchMedia.mock' in multiple test files. This import is necessary for mocking the behavior of the matchMedia function during testing.
* style(ClearConvosDialog): remove borders from button and modal, uniform button size
* fix(AgentSettings.tsx): overlapping issue
* fix(PresetDialogs): improve spacing of top row and dialog content
* style(Settings): 2nd column will now dynamically adjust better across all screen sizes
* style(ModelSelect): improve styling for mobile/desktop, add hover shadow
feat(ModelSelect/Plugins): hide ModelSelect when screen is small
* refactor(RowButton, buildTree): convert to TS
* style(ModelSelect): add transition effect to shadows on hover
* init localization
* Update defaul to en
* Fix merge issue and import path.
* Set default to en
* Change jsx to tsx
* Update the password max length string.
* Remove languageContext as using the recoil instead.
* Add localization to component endpoints pages
* Revert default to en after testing.
* Update LoginForm.tsx
* Fix translation.
* Make lint happy
* Merge (#1)
* Create deploy.yml
* Add localization support for endpoint pages components (#667)
* init localization
* Update defaul to en
* Fix merge issue and import path.
* Set default to en
* Change jsx to tsx
* Update the password max length string.
* Remove languageContext as using the recoil instead.
* Add localization to component endpoints pages
* Revert default to en after testing.
* Update LoginForm.tsx
* Fix translation.
* Make lint happy
* Add a restart to melisearch in docker-compose.yml (#684)
* Oauth fixes for Cognito (#686)
* Add a restart to melisearch in docker-compose.yml
* Oauth fixes for Cognito
* Use the username or email for full name from oath if not provided
---------
Co-authored-by: Donavan <snark@hey.com>
* Italian localization support for endpoint (#687)
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Donavan Stanley <donavan.stanley@gmail.com>
Co-authored-by: Donavan <snark@hey.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
* Translate Nav pages
* Fix npm test
* Add setting dropdown to change the language
* Fix unit test
* Use useRecoilState
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Donavan Stanley <donavan.stanley@gmail.com>
Co-authored-by: Donavan <snark@hey.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
chore(package.json): add packages/* to workspaces
feat(package.json): add build:data-provider script
feat(package.json): update frontend and frontend:ci scripts to include build:data-provider script
* feat: add version number in UI
* feat: add version number in UI
* feat: add version number in footer
* Update Footer.tsx
More concise, cleaner message
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
feat(db/indexSync.js): add synchronization logic between MongoDB collection and MeiliSearch index
fix(models/plugins/mongoMeili.js): update createMeiliMongooseModel function to remove unused parameters and add documentation for syncWithMeili method
* nginx setup
* chore(dev-images.yml): update workflow trigger to push events on main branch
chore(dev-images.yml): remove building and pushing of librechat-dev-client image
chore(nginx.conf): comment out SSL configuration in nginx.conf
chore(deploy-compose.yml): uncomment api build configuration in deploy-compose.yml
chore(deploy-compose.yml): update client build configuration in deploy-compose.yml
* chore(deploy-compose.yml): update API and client image references to use latest versions from ghcr.io
feat(deploy-compose.yml): add NODE_ENV environment variable with value 'production' for API service
* chore(dev-images.yml): tag and push latest images to container registry
chore(dev-images.yml): tag and push latest client image to container registry
chore(dev-images.yml): tag and push latest dev image to container registry
fix(Dockerfile.multi): fix CMD command to properly set NODE_ENV variable
* feat: add Dockerfile.multi for building API, Client, and Data Provider
feat: add nginx.conf for client-side routing in Nginx
feat: add deploy-compose.yml for deploying the application with Docker Compose
chore: update version in deploy-compose.yml to 3.8
chore: remove unused configuration in docs/dev/deploy-compose.yml
* chore(Dockerfile.multi): Remove data-provider build stage
chore(deploy-compose.yml): Add NODE_ENV=production environment variable
* chore(Dockerfile.multi): add environment variable NODE_OPTIONS with value "--max-old-space-size=776"
feat(Dockerfile.multi): copy client build output to api build stage
* chore(Dockerfile.multi): update NODE_OPTIONS to increase max-old-space-size to 2048
chore(deploy-compose.yml): remove NODE_ENV=production environment variable
* feat(dev-images.yml): add GitHub Actions workflow for Docker multi-stage build on push to main branch
* chore(dependabot.yml): update target-branch from "develop" to "dev" for npm package updates in /api, /client, and root directory
* feat: stop-backend.js and update.js linux support (#701)
* feat: stop-backend.js and update.js linux support
* feat: update.js sudo support
* chore(helpers.js): add deleteNodeModules function
feat(packages.js): add script to delete node_modules and install dependencies
refactor(update.js): remove unnecessary imports and use deleteNodeModules function
feat(package.json): add update:linux script to update with sudo
* chore(package.json): rename 'update:linux' script to 'update:sudo'
* refactor(update.js): simplify downCommand and buildCommand by removing redundant use of sudo command, add sudo to single docker command
---------
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
* feat(deploy-compose.yml): add docker-compose file for development deployment
A new docker-compose file has been added for development deployment. This file defines the services required for running the application in a development environment. The services include a client service running nginx, an api service running the LibreChat application, a mongodb service for the database, and a meilisearch service for search functionality.
The client service is configured to use the latest version of the nginx image, with port 3080 mapped to port 80. It also mounts the nginx.conf file and the client's node_modules directory.
The api service is named LibreChat and is built from the librechat image. It exposes port 9000 and depends on the mongodb service. It also mounts the api directory, the .env files, and the client's node_modules directory.
The mongodb service is named chat-mongodb and uses the mongo image. It exposes port 27018 and mounts the data-node directory for data storage
* chore(deploy-compose.yml): update env_file path to ../../.env
* chore(deploy-compose.yml): update image name to librechat_deploy
chore(deploy-compose.yml): update build context to ../../
* chore(deploy-compose.yml): update image and comment out build section
The image for the service has been updated to `ghcr.io/danny-avila/librechat:latest`. The build section has been commented out as it is no longer needed.
* refactor(nginx.conf): reformat nginx.conf for better readability and maintainability
* chore(nginx.conf): add worker_connections configuration to events block
chore(nginx.conf): add listen configuration to server block
* chore(deploy-compose.yml): update nginx container ports configuration
feat(deploy-compose.yml): add support for HTTPS by exposing port 443
* docs(dev/README.md): add instructions for deploying with deploy-compose.yml
* docs(dev/README.md): update instructions for deploying with deploy-compose.yml
* init localization
* Update defaul to en
* Fix merge issue and import path.
* Set default to en
* Change jsx to tsx
* Update the password max length string.
* Remove languageContext as using the recoil instead.
* Add localization to component endpoints pages
* Revert default to en after testing.
* Update LoginForm.tsx
* Fix translation.
* Make lint happy
* Merge (#1)
* Create deploy.yml
* Add localization support for endpoint pages components (#667)
* init localization
* Update defaul to en
* Fix merge issue and import path.
* Set default to en
* Change jsx to tsx
* Update the password max length string.
* Remove languageContext as using the recoil instead.
* Add localization to component endpoints pages
* Revert default to en after testing.
* Update LoginForm.tsx
* Fix translation.
* Make lint happy
* Add a restart to melisearch in docker-compose.yml (#684)
* Oauth fixes for Cognito (#686)
* Add a restart to melisearch in docker-compose.yml
* Oauth fixes for Cognito
* Use the username or email for full name from oath if not provided
---------
Co-authored-by: Donavan <snark@hey.com>
* Italian localization support for endpoint (#687)
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Donavan Stanley <donavan.stanley@gmail.com>
Co-authored-by: Donavan <snark@hey.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
* Translate Nav pages
* Fix npm test
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Donavan Stanley <donavan.stanley@gmail.com>
Co-authored-by: Donavan <snark@hey.com>
Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
The OPENAI_MODELS and PLUGIN_MODELS variables are being commented out in the .env.example file. This is done to prefer fetching api/models as the default behavior
refactor(PluginsClient.js): improve readability by extracting observedImagePath variable
fix(PluginsClient.js): check if responseMessage already includes observedImagePath before appending observation
* Add a restart to melisearch in docker-compose.yml
* Oauth fixes for Cognito
* Use the username or email for full name from oath if not provided
---------
Co-authored-by: Donavan <snark@hey.com>
* init localization
* Update defaul to en
* Fix merge issue and import path.
* Set default to en
* Change jsx to tsx
* Update the password max length string.
* Remove languageContext as using the recoil instead.
* Add localization to component endpoints pages
* Revert default to en after testing.
* Update LoginForm.tsx
* Fix translation.
* Make lint happy
feat(single-compose.yml): add single-compose.yml for building leaner app container without meilisearch and mongodb services
- This is useful for deploying on Google, Azure, etc., as a single, leaner container.
- Instructions for running the container are added to the README.md file.
- The container requires a MongoDB Atlas connection string for the `MONGO_URI` environment variable.
- Remote Meilisearch may also be possible, but is not tested.
* wip: proof of concept for openapi chain
* chore(api): update langchain dependency to version 0.0.105
* feat(Plugins): use ChatGPT Plugins/OpenAPI specs (first pass)
* chore(manifest.json): update pluginKey for "Browser" tool to "web-browser"
chore(handleTools.js): update customConstructor key for "web-browser" tool
* fix(handleSubmit.js): set unfinished property to false for all endpoints
* fix(handlers.js): remove unnecessary capitalizeWords function and use action.tool directly
refactor(endpoints.js): rename availableTools to tools and transform it into a map
* feat(endpoints): add plugins selector to endpoints file
refactor(CodeBlock.tsx): refactor to typescript
refactor(Plugin.tsx): use recoil Map for plugin name and refactor to typescript
chore(Message.jsx): linting
chore(PluginsOptions/index.jsx): remove comment/linting
chore(svg): export Clipboard and CheckMark components from SVG index and refactor to typescript
* fix(OpenAPIPlugin.js): rename readYamlFile function to readSpecFile
fix(OpenAPIPlugin.js): handle JSON files in readSpecFile function
fix(OpenAPIPlugin.js): handle JSON URLs in getSpec function
fix(OpenAPIPlugin.js): handle JSON variables in createOpenAPIPlugin function
fix(OpenAPIPlugin.js): add description for variables in createOpenAPIPlugin function
fix(OpenAPIPlugin.js): add optional flag for is_user_authenticated and has_user_authentication in ManifestDefinition
fix(loadSpecs.js): add optional flag for is_user_authenticated and has_user_authentication in ManifestDefinition
fix(Plugin.tsx): remove unnecessary callback parameter in getPluginName function
fix(getDefaultConversation.js): fix browser console error: handle null value for lastConversationSetup in getDefaultConversation function
* feat(api): add new tools
Add Ai PDF tool for super-fast, interactive chats with PDFs of any size, complete with page references for fact checking.
Add VoxScript tool for searching through YouTube transcripts, financial data sources, Google Search results, and more.
Add WebPilot tool for browsing and QA of webpages, PDFs, and data. Generate articles from one or more URLs.
feat(api): update OpenAPIPlugin.js
- Add support for bearer token authorization in the OpenAPIPlugin.
- Add support for custom headers in the OpenAPIPlugin.
fix(api): fix loadTools.js
- Pass the user parameter to the loadSpecs function.
* feat(PluginsClient.js): import findMessageContent function from utils
feat(PluginsClient.js): add message parameter to options object in initializeCustomAgent function
feat(PluginsClient.js): add content to errorMessage if message content is found
feat(PluginsClient.js): break out of loop if message content is found
feat(PluginsClient.js): add delay option with value of 8 to generateTextStream function
feat(PluginsClient.js): add support for process.env.PORT environment variable in app.listen function
feat(askyourpdf.json): add askyourpdf plugin configuration
feat(metar.json): add metar plugin configuration
feat(askyourpdf.yaml): add askyourpdf plugin OpenAPI specification
feat(OpenAPIPlugin.js): add message parameter to createOpenAPIPlugin function
feat(OpenAPIPlugin.js): add description_for_model to chain run message
feat(addOpenAPISpecs.js): remove verbose option from loadSpecs function call
fix(loadSpecs.js): add 'message' parameter to the loadSpecs function
feat(findMessageContent.js): add utility function to find message content in JSON objects
* fix(PluginStoreDialog.tsx): update z-index value for the dialog container
The z-index value for the dialog container was updated to "102" to ensure it appears above other elements on the page.
* chore(web_pilot.json): add "params" field with "user_has_request" parameter set to true
* chore(eslintrc.js): update eslint rules
fix(Login.tsx): add missing semicolon after import statement
* fix(package-lock.json): update langchain dependency to version ^0.0.105
* fix(OpenAPIPlugin.js): change header key from 'id' to 'librechat_user_id' for consistency and clarity
feat(plugins): add documentation for using official ChatGPT Plugins with OpenAPI specs
This commit adds a new file `chatgpt_plugins_openapi.md` to the `docs/features/plugins` directory. The file provides detailed information on how to use official ChatGPT Plugins with OpenAPI specifications. It explains the components of a plugin, including the Plugin Manifest file and the OpenAPI spec. It also covers the process of adding a plugin, editing manifest files, and customizing OpenAPI spec files. Additionally, the commit includes disclaimers about the limitations and compatibility of plugins with LibreChat. The documentation also clarifies that the use of ChatGPT Plugins with LibreChat does not violate OpenAI's Terms of Service.
The purpose of this commit is to provide comprehensive documentation for developers who want to integrate ChatGPT Plugins into their projects using OpenAPI specs. It aims to guide them through the process of adding and configuring plugins, as well as addressing potential issues and
chore(introduction.md): update link to ChatGPT Plugins documentation
docs(introduction.md): clarify the purpose of the plugins endpoint and its capabilities
* fix(OpenAPIPlugin.js): update SUFFIX variable to provide a clearer description
docs(chatgpt_plugins_openapi.md): update information about adding plugins via url on the frontend
* feat(PluginsClient.js): sendIntermediateMessage on successful Agent load
fix(PluginsClient.js, server/index.js, gptPlugins.js): linting fixes
docs(chatgpt_plugins_openapi.md): update links and add additional information
* Update chatgpt_plugins_openapi.md
* chore: rebuild package-lock file
* chore: format/lint all files with new rules
* chore: format all files
* chore(README.md): update AI model selection list
The AI model selection list in the README.md file has been updated to reflect the current options available. The "Anthropic" model has been added as an alternative name for the "Claude" model.
* fix(Plugin.tsx): type issue
* feat(tools): add new tool WebPilot
feat(tools): remove tool Weather Report
feat(tools): add new tool Prompt Perfect
feat(tools): add new tool Scholarly Graph Link
* feat(OpenAPIPlugin.js): add getSpec and readSpecFile functions
feat(OpenAPIPlugin.spec.js): add tests for readSpecFile, getSpec, and createOpenAPIPlugin functions
* chore(agent-demo-1.js): remove unused code and dependencies
chore(agent-demo-2.js): remove unused code and dependencies
chore(demo.js): remove unused code and dependencies
* feat(addOpenAPISpecs): add function to transform OpenAPI specs into desired format
feat(addOpenAPISpecs.spec): add tests for transformSpec function
fix(loadSpecs): remove debugging code
* feat(loadSpecs.spec.js): add unit tests for ManifestDefinition, validateJson, and loadSpecs functions
* fix: package file resolution bug
* chore: move scholarly_graph_link manifest to 'has-issues'
* refactor(client/hooks): convert to TS and export from index
* Update introduction.md
* Update chatgpt_plugins_openapi.md
* Release: v.0.5.4
* fix(bingAI.js): fix condition to check if partialText is longer than response.text
The condition to check if partialText is longer than response.text was not working correctly because it was not properly trimming the partialText before comparing its length. This fix trims the partialText before checking its length to ensure accurate comparison.
* fix(frontend/BingAI): prevent Settings from not showing on new conversation, also prevent showing toneStyle change without jailbreak
* fix(Input/index.jsx): fix typo in comment, change "also prevents toneStyle change without jailbreak" to "also prevents showing toneStyle change without jailbreak"
* fix(BingAI): show message despite censor trigger
* feat: bare bones implementation of claude client (WIP)
* feat: client implementation of Claude (WIP)
* fix: add claude to store
* feat: bare bones implementation of claude client (WIP)
* switch eventsource
* Try new method of calling claude with anthropic sdk
* (WIP) Finish initial claude client implementation and api
* debugging update
* fix(ClaudeClient.js): fix prompt prefixes for HUMAN_PROMPT and AI_PROMPT
fix(ClaudeClient.js): refactor buildMessages logic for correct handling of messages
refactor(ClaudeClient.js): refactor buildPrompt method to buildMessages for use in BaseClient sendMessage method
refactor(ClaudeClient.js): refactor getCompletion method to sendCompletion for use in BaseClient sendMessage method
refactor(ClaudeClient.js): omit getMessageMapMethod method for future refactoring
refactor(ClaudeClient.js): remove unused sendMessage method to prefer BaseClient message
fix(askClaude.js): error in getIds method was causing a frontend crash, userMessage was not defined
fix(askClaude.js): import abortMessage function from utils module
feat(askClaude.js): add /abort route to handle message abort requests
feat(askClaude.js): create abortControllers map to store abort controllers
feat(askClaude.js): implement abortAsk function to handle message abort logic
feat(askClaude.js): add onStart callback to handle message start logic
feat(HoverButtons.jsx): add 'claude' as a supported endpoint for branching
* fix(ClaudeClient.js): update defaultPrefix and promptPrefix messages
includes 'Remember your instructions' as Claude is trained to recognize labels preceding colons as participants of a conversation
* Change name from claude to anthropic
* add settings to handleSubmit and models to endpoints
* Implement Claude settings
* use svg for anthropic icon
* Implement abort
* Implement reverse proxy
* remove png icons
* replace web browser plugin
* remove default prefix
* fix styling of claude icon
* fix console error from svg properties
* remove single quote requirement from eslintrc
* fix(AnthropicClient.js): fix labels for HUMAN_PROMPT and AI_PROMPT
feat(AnthropicClient.js): add support for custom userLabel and modelLabel options
feat(AnthropicClient.js): add user_id metadata to requestOptions in getCompletion method
feat(anthropic, AnthropicClient.js): add debug logging
* refactor(AnthropicClient.js): change promptSuffix variable declaration from let to const
* fix(EndpointOptionsDialog.jsx): remove unnecessary code that changes endpointName from 'anthropic' to 'Claude'
fix(utils/index.jsx): fix alternateName value for 'anthropic' from 'Claude' to 'Anthropic'
* fix(AnthropicIcon): fix sizing/rendering/name of anthropic icon
* fix(AnthropicClient.js): change maxContextTokens default value to 99999
fix(AnthropicClient.js): change maxResponseTokens default value to 1500
fix(AnthropicClient.js): remove unnecessary code for setting maxContextTokens and maxResponseTokens based on modelOptions
fix(AnthropicClient.js): change max_tokens_to_sample default value to 1500
fix(anthropic.js): pass endpointOption.token to AnthropicClient constructor
* Update .env.example
* fix(AnthropicClient.js): remove exceeding message when it puts us over the token limit
fix(AnthropicClient.js): handle case when the first message exceeds the token limit
fix(AnthropicClient.js): throw error when prompt is too long
fix(AnthropicClient.js): adjust max tokens calculation to use maxOutputTokens
fix(anthropic.js): remove console.log statement in ask route
* feat(server/index): increase incoming json payload allowed size
---------
Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
* Add files via upload
* Create linode-setup.md
* Create cloudflare-setup.md
* Update cloudflare-setup.md
* Delete 4-linode.png
* Delete 3-linode.png
* Add files via upload
* Add files via upload
* Update cloudflare-setup.md
* Update linode-setup.md
* Rename cloudflare-setup.md to cloudflare.md
* Rename linode-setup.md to linode.md
* Update mkdocs.yml
* Update cloudflare.md
* Update linode.md
* Update README.md
* Update README.md
* Update linode.md
sentence in Italian
* v1
The frontend has been completed, along with the .env variables.
However, there is an issue of infinite loading thereafter.
* Fix email and remove deprecated GitHub passport
* Update user_auth_system.md
add How to Set Up a Github Authentication
* Update .env.example
Improved the comment above the GitHub client ID and secret.
* Update user_auth_system.md
* Update package.json
* Remove unnecessary passport GitHub package
* fixed conflicts
fixed conflicts between Berry-13:main and danny-avila:main
in api/server/index.js 45:54
* Delete e -i HEAD~2
* (WIP) Discord Login
* Fix duplicate githubLoginEnabled
* .env.example restore
* Update user_auth_system.md
Discord Login
* Fix and new Feature
1. Added Discord login to .env.example.
2. Created Google, Github, and Discord icons in client\src\components\svg.
3. Added the social login option in the .env file; it fixes the ---or---. Check Discord for more information.
* fix Login.tsx and Registration.tsx
* Update user_auth_system.md
* Update .env.example
* Added OpenID Icon
* quick discord icon fix
* discord strategy fix
* remove comment
* fix discord authorize every time
* chore(eslint): add ignore pattern for packages/data-provider/types
chore(data-provider): fix import formatting in index.ts
chore(data-provider): add types/index.d.ts to tsconfig include
* fix(Auth): fix "skip login" bug, where UI would render in an unauthenticated state
fix(Login.tsx): replace navigate('/chat/new') with navigate('/chat/new', { replace: true })
fix(AuthContext.tsx): replace navigate(redirect) with navigate(redirect, { replace: true })
fix(AuthContext.tsx): replace navigate('/login') with navigate('/login', { replace: true })
fix(AuthContext.tsx): replace navigate('/login') with navigate('/login', { replace: true })
fix(routes/Chat.jsx): add check for isAuthenticated: navigate to '/login' and render null if not authenticated
fix(routes/index.jsx): add check for isAuthenticated: navigate to '/login' and render null if not authenticated
* refactor(SubmitButton.jsx): create a set of endpoints to hide set tokens
fix(SubmitButton.jsx): fix condition to check if token is provided for certain endpoints
* Add files via upload
* Create linode-setup.md
* Create cloudflare-setup.md
* Update cloudflare-setup.md
* Delete 4-linode.png
* Delete 3-linode.png
* Add files via upload
* Add files via upload
* Update cloudflare-setup.md
* Update linode-setup.md
* Rename cloudflare-setup.md to cloudflare.md
* Rename linode-setup.md to linode.md
* Update mkdocs.yml
* Update cloudflare.md
* Update linode.md
* Update README.md
* Update README.md
* Update linode.md
sentence in Italian
* v1
The frontend has been completed, along with the .env variables.
However, there is an issue of infinite loading thereafter.
* Fix email and remove deprecated GitHub passport
* Update user_auth_system.md
add How to Set Up a Github Authentication
* Update .env.example
Improved the comment above the GitHub client ID and secret.
* Update user_auth_system.md
* Update package.json
* Remove unnecessary passport GitHub package
* fixed conflicts
fixed conflicts between Berry-13:main and danny-avila:main
in api/server/index.js 45:54
* Delete e -i HEAD~2
* (WIP) Discord Login
* Fix duplicate githubLoginEnabled
* .env.example restore
* Update user_auth_system.md
Discord Login
* Fix and new Feature
1. Added Discord login to .env.example.
2. Created Google, Github, and Discord icons in client\src\components\svg.
3. Added the social login option in the .env file; it fixes the ---or---. Check Discord for more information.
* fix Login.tsx and Registration.tsx
* Update user_auth_system.md
* Update .env.example
* Added OpenID Icon
* quick discord icon fix
* discord strategy fix
* remove comment
* init localization
* Update defaul to en
* Fix merge issue and import path.
* Set default to en
* Change jsx to tsx
* Update the password max length string.
* Remove languageContext as using the recoil instead.
This PR updates the Docker installation and configuration instructions for LibreChat to improve clarity and readability. The changes include restructuring the document and refining certain parts for smoother understanding. Here's a summary of the modifications:
- The installation and configuration steps have been reorganized into separate sections for better organization.
- The LibreChat configuration section provides clearer instructions for updating the credentials in the `docker-compose.yml` file and setting up the `.env` file.
* feat(getIcon.jsx): replace palm.png with google-palm.svg as the icon for the 'google' endpoint
* fix(mongoMeili): improve syncing, prevent large indicing jobs from being queued
fix(gptPlugins.js, openAI.js): use unfinished and cancelled values when saving messages to help optimize syncing
* release: 0.5.3, add extra linting rule and minor fix for EndpointDialog
* chore: revert to deprecated Message Classes as weird behavior seen in linux
* chore(api): remove unused test scripts
chore(package.json): remove unused langchain dependency
* chore(.gitignore): add /images directory to the ignore list
* fix(Messages.jsx): fix <body> tag warning
* fix(NewConversationMenu): update localStorage with lastBingSettings when endpoint is 'bingAI'
fix(getDefaultConversation): retrieve lastBingSettings from localStorage and use it to set default values for jailbreak and toneStyle when endpoint is 'bingAI'
feat(settings.spec.js): add test to check if the active class is set on the selected endpoint in the settings menu
* fix(BingAIOptions): add data-testid to BingAIOptions SelectDropDown component
fix(settings.spec.js): update test to include additional steps for testing settings persistence
* fix(azure): support user_provided credentials from client
* create data-provider package and move code from data-provider folder to be shared between apps
* fix type issues
* add packages to ignore
* add new data-provider package to apps
* refactor: change client imports to use @librechat/data-provider package
* include data-provider build script in frontend build
* fix type issue after rebasing
* delete admin/package.json from this branch
* update test ci script to include building of data-provider package
* Try using regular build for test action
* Switch frontend-review back to build:ci
* Remove loginRedirect from Login.tsx
* Add ChatGPT back to EModelEndpoint
* Add files via upload
* Create linode-setup.md
* Create cloudflare-setup.md
* Update cloudflare-setup.md
* Delete 4-linode.png
* Delete 3-linode.png
* Add files via upload
* Add files via upload
* Update cloudflare-setup.md
* Update linode-setup.md
* Rename cloudflare-setup.md to cloudflare.md
* Rename linode-setup.md to linode.md
* Update mkdocs.yml
* Update cloudflare.md
* Update linode.md
* Update README.md
* Update README.md
* Update linode.md
sentence in Italian
* v1
The frontend has been completed, along with the .env variables.
However, there is an issue of infinite loading thereafter.
* Fix email and remove deprecated GitHub passport
* Update user_auth_system.md
add How to Set Up a Github Authentication
* Update .env.example
Improved the comment above the GitHub client ID and secret.
* Update user_auth_system.md
* Update package.json
* Remove unnecessary passport GitHub package
* fixed conflicts
fixed conflicts between Berry-13:main and danny-avila:main
in api/server/index.js 45:54
* Delete e -i HEAD~2
* refactor: start new client classes, test localAi support
* feat: create base class, extend chatgpt from base
* refactor(BaseClient.js): change userId parameter to user
refactor(BaseClient.js): change userId parameter to user
feat(OpenAIClient.js): add sendMessage method
refactor(OpenAIClient.js): change getConversation method to use user parameter instead of userId
refactor(OpenAIClient.js): change saveMessageToDatabase method to use user parameter instead of userId
refactor(OpenAIClient.js): change buildPrompt method to use messages parameter instead of orderedMessages
feat(index.js): export client classes
refactor(askGPTPlugins.js): use req.body.token or process.env.OPENAI_API_KEY as OpenAI API key
refactor(index.js): comment out askOpenAI route
feat(index.js): add openAI route
feat(openAI.js): add new route for OpenAI API requests with support for progress updates and aborting requests.
* refactor(BaseClient.js): use optional chaining operator to access messageId property
refactor(OpenAIClient.js): use orderedMessages instead of messages to build prompt
refactor(OpenAIClient.js): use optional chaining operator to access messageId property
refactor(fetch-polyfill.js): remove fetch polyfill
refactor(openAI.js): comment out debug option in clientOptions
* refactor: update import statements and remove unused imports in several files
feat: add getAzureCredentials function to azureUtils module
docs: update comments in azureUtils module
* refactor(utils): rename migrateConversations to migrateDataToFirstUser for clarity and consistency
* feat(chatgpt-client.js): add getAzureCredentials function to retrieve Azure credentials
feat(chatgpt-client.js): use getAzureCredentials function to generate reverseProxyUrl
feat(OpenAIClient.js): add isChatCompletion property to determine if chat completion model is used
feat(OpenAIClient.js): add saveOptions parameter to sendMessage and buildPrompt methods
feat(OpenAIClient.js): modify buildPrompt method to handle chat completion model
feat(openAI.js): modify endpointOption to include modelOptions instead of individual options
refactor(OpenAIClient.js): modify getDelta property to use isChatCompletion property instead of isChatGptModel property
refactor(OpenAIClient.js): modify sendMessage method to use saveOptions parameter instead of modelOptions parameter
refactor(OpenAIClient.js): modify buildPrompt method to use saveOptions parameter instead of modelOptions parameter
refactor(OpenAIClient.js): modify ask method to include endpointOption parameter
* chore: delete draft file
* refactor(OpenAIClient.js): extract sendCompletion method from sendMessage method for reusability
* refactor(BaseClient.js): move sendMessage method to BaseClient class
feat(OpenAIClient.js): inherit from BaseClient class and implement necessary methods and properties for OpenAIClient class.
* refactor(BaseClient.js): rename getBuildPromptOptions to getBuildMessagesOptions
feat(BaseClient.js): add buildMessages method to BaseClient class
fix(ChatGPTClient.js): use message.text instead of message.message
refactor(ChatGPTClient.js): rename buildPromptBody to buildMessagesBody
refactor(ChatGPTClient.js): remove console.debug statement and add debug log for prompt variable
refactor(OpenAIClient.js): move setOptions method to the bottom of the class
feat(OpenAIClient.js): add support for cl100k_base encoding
feat(OpenAIClient.js): add support for unofficial chat GPT models
feat(OpenAIClient.js): add support for custom modelOptions
feat(OpenAIClient.js): add caching for tokenizers
feat(OpenAIClient.js): add freeAndInitializeEncoder method to free and reinitialize tokenizers
refactor(OpenAIClient.js): rename getBuildPromptOptions to getBuildMessagesOptions
refactor(OpenAIClient.js): rename buildPrompt to buildMessages
refactor(OpenAIClient.js): remove endpointOption from ask function arguments in openAI.js
* refactor(ChatGPTClient.js, OpenAIClient.js): improve code readability and consistency
- In ChatGPTClient.js, update the roleLabel and messageString variables to handle cases where the message object does not have an isCreatedByUser property or a role property with a value of 'user'.
- In OpenAIClient.js, rename the freeAndInitializeEncoder method to freeAndResetEncoder to better reflect its functionality. Also, update the method calls to reflect the new name. Additionally, update the getTokenCount method to handle errors by calling the freeAndResetEncoder method instead of the now-renamed freeAndInitializeEncoder method.
* refactor(OpenAIClient.js): extract instructions object to a separate variable and add it to payload after formatted messages
fix(OpenAIClient.js): handle cases where progressMessage.choices is undefined or empty
* refactor(BaseClient.js): extract addInstructions method from sendMessage method
feat(OpenAIClient.js): add maxTokensMap object to map maximum tokens for each model
refactor(OpenAIClient.js): use addInstructions method in buildMessages method instead of manually building the payload list
* refactor(OpenAIClient.js): remove unnecessary condition for modelOptions.model property in buildMessages method
* feat(BaseClient.js): add support for token count tracking and context strategy
feat(OpenAIClient.js): add support for token count tracking and context strategy
feat(Message.js): add tokenCount field to Message schema and updateMessage function
* refactor(BaseClient.js): add support for refining messages based on token limit
feat(OpenAIClient.js): add support for context refinement strategy
refactor(OpenAIClient.js): use context refinement strategy in message sending
refactor(server/index.js): improve code readability by breaking long lines
* refactor(BaseClient.js): change `remainingContext` to `remainingContextTokens` for clarity
feat(BaseClient.js): add `refinePrompt` and `refinePromptTemplate` to handle message refinement
feat(BaseClient.js): add `refineMessages` method to refine messages
feat(BaseClient.js): add `handleContextStrategy` method to handle context strategy
feat(OpenAIClient.js): add `abortController` to `buildPrompt` method options
refactor(OpenAIClient.js): change `payload` and `tokenCountMap` to let variables in `handleContextStrategy` method
refactor(BaseClient.js): change `remainingContext` to `remainingContextTokens` in `handleContextStrategy` method for consistency
refactor(BaseClient.js): change `remainingContext` to `remainingContextTokens` in `getMessagesWithinTokenLimit` method for consistency
refactor(BaseClient.js): change `remainingContext` to `remainingContext
* chore(openAI.js): comment out contextStrategy option in clientOptions
* chore(openAI.js): comment out debug option in clientOptions object
* test: BaseClient tests in progress
* test: Complete OpenAIClient & BaseClient tests
* fix(OpenAIClient.js): remove unnecessary whitespace
fix(OpenAIClient.js): remove unused variables and comments
fix(OpenAIClient.test.js): combine getTokenCount and freeAndResetEncoder tests
* chore(.eslintrc.js): add rule for maximum of 1 empty line
feat(ask/openAI.js): add abortMessage utility function
fix(ask/openAI.js): handle error and abort message if partial text is less than 2 characters
feat(utils/index.js): export abortMessage utility function
* test: complete additional tests
* feat: Azure OpenAI as a separate endpoint
* chore: remove extraneous console logs
* fix(azureOpenAI): use chatCompletion endpoint
* chore(initializeClient.js): delete initializeClient.js file
chore(askOpenAI.js): delete old OpenAI route handler
chore(handlers.js): remove trailing whitespace in thought variable assignment
* chore(chatgpt-client.js): remove unused chatgpt-client.js file
refactor(index.js): remove askClient import and export from index.js
* chore(chatgpt-client.tokens.js): update test script for memory usage and encoding performance
The test script in `chatgpt-client.tokens.js` has been updated to measure the memory usage and encoding performance of the client. The script now includes information about the initial memory usage, peak memory usage, final memory usage, and memory usage after a timeout. It also provides insights into the number of encoding requests that can be processed per second.
The script has been modified to use the `OpenAIClient` class instead of the `ChatGPTClient` class. Additionally, the number of iterations for the encoding loop has been reduced to 10,000.
A timeout function has been added to simulate a delay of 15 seconds. After the timeout, the memory usage is measured again.
The script now handles uncaught exceptions and logs any errors that occur, except for errors related to failed fetch requests.
Note: This is a test script and should not be used in production
* feat(FakeClient.js): add a new class `FakeClient` that extends `BaseClient` and implements methods for a fake client
feat(FakeClient.js): implement the `setOptions` method to handle options for the fake client
feat(FakeClient.js): implement the `initializeFakeClient` function to initialize a fake client with options and fake messages
fix(OpenAIClient.js): remove duplicate `maxTokensMap` import and use the one from utils
feat(BaseClient): return promptTokens and completionTokens
* refactor(gptPlugins): refactor ChatAgent to PluginsClient, which extends OpenAIClient
* refactor: client paths
* chore(jest.config.js): remove jest.config.js file
* fix(PluginController.js): update file path to manifest.json
feat(gptPlugins.js): add support for aborting messages
refactor(ask/index.js): rename askGPTPlugins to gptPlugins for consistency
* fix(BaseClient.js): fix spacing in generateTextStream function signature
refactor(BaseClient.js): remove unnecessary push to currentMessages in generateUserMessage function
refactor(BaseClient.js): remove unnecessary push to currentMessages in handleStartMethods function
refactor(PluginsClient.js): remove unused variables and date formatting in constructor
refactor(PluginsClient.js): simplify mapping of pastMessages in getCompletionPayload function
* refactor(GoogleClient): GoogleClient now extends BaseClient
* chore(.env.example): add AZURE_OPENAI_MODELS variable
fix(api/routes/ask/gptPlugins.js): enable Azure integration if PLUGINS_USE_AZURE is true
fix(api/routes/endpoints.js): getOpenAIModels function now accepts options, use AZURE_OPENAI_MODELS if PLUGINS_USE_AZURE is true
fix(client/components/Endpoints/OpenAI/Settings.jsx): remove console.log statement
docs(features/azure.md): add documentation for Azure OpenAI integration and environment variables
* fix(e2e:popup): includes the icon + endpoint names in role, name property
* fix(Chat.jsx): conversation no longer navigates upon message creation, which would cause re-render/flicker
* chore(.gitignore): ignore storageState.json in all directories
chore(storageState.json): delete e2e/storageState.json file
* test(e2e): fix old tests with new playwright setup & add helper script for codegen
* fix(Conversation.jsx): add data-testid attribute to <a> element
test(messages.spec.js): add test for expected navigation after receiving message
test(messages.spec.js): add test for page navigations
* chore(Plugin.jsx): import Spinner from '~/components' instead of '../svg/Spinner'
chore(index.jsx): import Spinner from '~/components' instead of '../svg/Spinner'
chore(Spinner.jsx): change classProp prop to className prop in Spinner component
feat(index.ts): export Spinner component from './Spinner'
* fix: increase username max length and accept '-' in regex
* fix: increase username max length and accept '-' in regex
* fix: increase username max length and accept '-' in regex
* Update documents for mkdocs compatibility
* documents update
* documents update
* Update README.md
* Update README.md
add link to "https://docs.librechat.ai" on the logo
* document updates
* docs - badge updates
* docs - badge updates
* docs - badge updates
* Update docker_install.md
* Update .env.example
update default MONGO_URI to port 27018 so local install can communicate with the docker db
* Update windows_install.md
fix typo
* fix: #546 issue with closing registration
* refactor: change casing of controller files for consistency
* fix: ensure registrationEnabled is sending a boolean value
* refactor: modifications to openId code
feat(initializeFunctionsAgent.js): add support for openai-functions agent type
feat(askGPTPlugins.js): change default agent to functions and skip completion
feat(cleanupPreset.js): change default agent to functions and skip completion
feat(getDefaultConversation.js): change default agent to functions and skip completion
feat(handleSubmit.js): change default agent to functions and skip completion
* style(FunctionsAgent.js): remove unnecessary comments and update PREFIX variable
refactor(initializeFunctionsAgent.js): update to use initializeAgentExecutorWithOptions
deps(package.json): update langchain to v0.0.95
refactor(askGPTPlugins.js): pass endpointOption to onStart function
* fix(ChatAgent.js): handle undefined delta content in progressMessage.choices array
* style(client): adjust height and add overflow to EditPresetDialog, AgentSettings, and Settings components
style(client): adjust size and add overflow to NewConversationMenu and PresetItems components
style(ui): add overflow to DialogContent component
* style(Settings.jsx): change height of settings component to md:h-[350px] h-[490px]
* chore(docker): add .env and **/.env to .dockerignore
refactor(docker): remove unnecessary .env file copy and removal in Dockerfile
* style(AgentSettings): adjust Switch placement fix(EditPresetDialog): correctly show functions setting in preset
feat(ChatAgent.js): add a check for images when completion is skipped to add to response
feat(askGPTPlugins.js): add skipCompletion option to agentOptions
feat(client): add Switch component to ui components and use for new Agent Settings
chore(package.json): ignore client directory in nodemonConfig
The `toolInput` object was not being properly logged in the `ChatAgent.js` and `handlers.js` files. The `JSON.stringify()` method was added to properly log the object.
- Improve logging format in ChatAgent.js by adding more details to the log
- Add support for functionsAgent in ChatAgent.js to format the log differently
- Improve formatAction function in handlers.js to handle empty thoughts and add support for functionsAgent
Add support for selecting an agent in the GPT plugins endpoint. The agent can be selected from a dropdown menu in the AgentSettings component. The default agent is set to 'classic' in the cleanupPreset, getDefaultConversation, and handleSubmit functions.
* feat: add api for config
* feat: add data service to client
* feat: update client pages with values from config endpoint
* test: update tests
* Update configurations and documentation to remove VITE_SHOW_GOOGLE_LOGIN_OPTION and change VITE_APP_TITLE to APP_TITLE
* include APP_TITLE with startup config
* Add test for new route
* update backend-review pipeline
* comment out test until we can figure out testing routes in CI
* update: .env.example
---------
Co-authored-by: fuegovic <32828263+fuegovic@users.noreply.github.com>
* feat(OpenAI, PaLM): add new models
refactor(chatgpt-client.js): use object to map max tokens for each model
refactor(askChatGPTBrowser.js, askGPTPlugins.js, askOpenAI.js): comment out unused function calls and error handling
feat(askGoogle.js): add support for codechat-bison model
refactor(endpoints.js): add gpt-4-0613 and gpt-3.5-turbo-16k to available models for OpenAI and GPT plugins
refactor(EditPresetDialog.jsx): hide examples for codechat-bison model in google endpoint
style(EndpointOptionsPopover.jsx): add cn utility function import and use it to set additionalButton className
refactor(Google/Settings.jsx): conditionally render custom name and prompt prefix fields based on model type
The code has been refactored to conditionally render the custom name and prompt prefix fields based on the type of model selected. If the model starts with 'codechat-', the fields will not be rendered.
refactor(Settings.jsx): remove duplicated code and wrap a section in a conditional statement based on a variable
style(Input): add z-index to Input component to fix overlapping issue
feat(GoogleOptions): disable Examples button when model starts with 'codechat-' prefix
* feat(.env.example, endpoints.js): add PLUGIN_MODELS environment variable and use it to get plugin models in endpoints.js
* Create HetznerUbuntuSetup.md
Step-by-step guide for someone who is starting from scratch on this project with a bare server.
* Updated Readme & Heroku
I submitted the original Heroku.md (to the discord) and they are way out of date. Just corrected them, moved the Hetzner file to the cloud deploy, and updated the readme to point to the file.
* Update HetznerUbuntuSetup.md
* Update README.md
- Remove api/.env and .env from .dockerignore file
- Add COPY .env .env to Dockerfile to copy .env file to docker build
- Add RUN rm .env to Dockerfile to remove .env file after build
- Remove build args from docker-compose.yml file
refactor(client): convert Dialog, DialogButton, Input, Label, Checkbox, and DialogTemplate components from jsx to tsx
refactor(client): export ClearChatsButton component from General.tsx
refactor(client): add useCallback hook to moveToTop function in Nav component
chore(client): remove unnecessary dependencies from package.json
feat(client): add General tab to Settings component
feat(client): add CogIcon component
refactor(client): move General tab content to separate file
fix(client): fix clearConvosMutation call in Settings component
feat(svg): add CogIcon component
refactor(conversation.js): add useCallback hook to newConversation function
refactor(conversations.js): add useCallback hook to refreshConversations function
chore(tsconfig.json): change jsx option to 'preserve'
* improve final reply for gpt-4, gpt-3.5 needs a more stable approach
* fix: better context output for gpt-3.5
* fix: added clarification for better context output for gpt-3.5
* feat(PluginsOptions): add advanced mode to show/hide options
style(PluginsOptions): add styles for advanced mode and show/hide options
* minor changes to styling
* refactor(langchain): add support for custom GPT-4 agent
This commit adds support for a custom GPT-4 agent in the langchain
module. The `CustomGpt4Agent` class extends the `ZeroShotAgent` class
and includes a new `createPrompt` method that generates a prompt
template for the agent. The `initializeCustomAgent` function has been
updated to use the `CustomGpt4Agent` class when the model is not GPT-3.
The `instructions.js` file has also been updated to include new
instructions for the GPT-4 agent. The `formatInstructions` method has
been removed and replaced with `gpt4Instructions` and `prefix2` and
`suffix2` have been added to include the new instructions.
feat(langchain): add custom output parser for langchain agents
This commit adds a custom output parser for langchain agents. The new parser is called CustomOutputParser and it extends ZeroShotAgentOutputParser. It takes a fields object as a parameter and sets the tools and longestToolName properties. It also sets the finishToolNameRegex property to match the final answer. The parse method of the CustomOutputParser class takes a text parameter and returns an object with returnValues, log, and toolInput properties.
This commit also adds a Gpt4OutputParser class that extends ZeroShotAgentOutputParser. It takes a fields object as a parameter and sets the tools and longestToolName properties. It also sets the finishToolNameRegex property to match the final answer. The parse method of the Gpt4OutputParser class takes a text parameter and returns an object with returnValues, log, and toolInput properties.
feat(langchain): add isGpt3 parameter to
* Stable Diffusion Plugin (#204)
* Added stable diffusion plugin
* Added example prompt
* Fixed naming
* Removed brackets in the prompt
* fix: improved agent for gpt-3.5
* fix: outparser, gpt3 instructions, and wolfram error handling
* chore: update langchain to 0.0.71
* fix: long parsing action input fix
* fix: make plugin select close on clicking label/button
* fix: make plugin select close on clicking label/button
* fix: wolfram input formatting and gpt-3 payload without plugins
* chore(api): update axios package version to 1.3.4
feat(api): add requireJwtAuth middleware to askGPTPlugins endpoint
fix(api): replace session user with user id in askGPTPlugins endpoint
docs(LOCAL_INSTALL.md): update guide for local installation and testing
This commit updates the guide for local installation and testing of the
ChatGPT-Clone app. It includes instructions for locally running the app,
updating the app version, and running tests. It also includes a new
option for running the app using Docker. The commit also fixes some
typos and formatting issues.
* add reverseProxy to plugins client
* chore(Dockerfile-app): add Dockerfile for building and running the app in a container
docs: remove outdated guides on Google search and Bing jailbreak mode
docs(LOCAL_INSTALL.md): remove outdated Windows installation instructions and update MeiliSearch configuration file
* fix: handle n/a parsing error better, reduce token waste if no agentic behavior is needed
* style: fix formatting and add parentheses around arrow function parameter
style: change hover background color to white and dark hover background color to gray-700
* chore: re-organize agent dir and files
* feat(ChatAgent.js): add support for PlanAndExecuteAgentExecutor
feat(PlanAndExecuteAgentExecutor.js): add PlanAndExecuteAgentExecutor class
feat(planExecutor.js): add demo for PlanAndExecuteAgentExecutor
* feat: add azure support to plugins
* refactor(utils): add basePath endpoint for genAzureEndpoint
feat(api): add support for Azure OpenAI API in various modules and tools
* feat: add plugin api for fetching available tools
* feat: add data service for getting available plugins
* feat: first iteration plugin store UI
* refactor: rename files to follow proper naming convention
* feat: Plugin store UI components
* feat: create separate user routes, service, controller, and add plugins to user model
* feat: create data service for adding and removing plugins per user
* feat: UI for adding and removing plugins, displaying plugins in dropdown based on what user has installed
* fix: merge conflicts from main
* fix: fix plugin items titles
* fix: tool.value -> tool.pluginKey
* fix: testing returnDirect for self-reflection
* fix: add browser tool to manifest
* refactor(outputParser.js): remove commented out code
feat(outputParser.js): add support for thought input when there is no action input
* handling 'use tool' edge case
* merge main to langchain
* fix(User.js, auth.service.js, localStrategy.js): change deprecated Joi.validate() to schema.validate() method (#322)
* fix(auth.service.js): fixes deprecated error callback in mongoose save method (#323)
* chore: run formatting script with new rules
* refactor: add requiresAuth to manifest, fix uninstall button
* version with plugin auth as dialog modal
* feat: Complete frontend for plugin auth
* frontend styling updates
* feat: api for plugin auth
* feat: Add tooltip with field description to plugin auth form
* fix: issue with plugin that has no auth
* feat(tools): add support for user-specific API keys
This commit adds support for user-specific API keys for the following tools:
- Google Search API
- Web Browser
- SerpAPI
- Zapier
- DALL-E
- Wolfram Alpha API
It also adds support for OpenAI API key for the Web Browser tool.
The `validateTools` function now takes a `user` parameter and checks for user-specific API keys before falling back to environment variables.
The `loadTools` function now takes a `user` parameter and initializes the tools with user-specific API keys if available.
The `manifest.json` file has been updated to include the new `authConfig` fields for the tools that support user-specific API keys.
The `askGPTPlugins.js` file has been updated to use the `validateTools` function with the `user` parameter.
refactor(ChatAgent.js): add user parameter to initialize function and pass it to loadTools function
refactor(tools/index.js): set default value for tools parameter in validateTools function
refactor(askGPTPlugins.js): remove duplicate user variable declaration and use the one from req object
* refactor(ChatAgent.js): await validTool() before pushing to this.tools array
refactor(tools/index.js): use Map instead of Set to store valid tools
refactor(tools/index.js): filter availableTools to only validate tools passed in
refactor(PluginController.js): filter out duplicate plugins by pluginKey
refactor(crypto.js): use environment variables for encryption key and initialization vector
feat(PluginService.js): add null check for pluginAuth in getUserPluginAuthValue()
* feat(api): add credentials key and IV to .env.example for securely storing credentials
* Adds testing for handling tools, introducing a test env to the backend
Fixes bugs & optimizes code as revealed through testing, including:
- wolfram.js: fixes bug where wolfram was not handling authentication
- ChatAgent.js: ChatAgent modified to reflect 'handleTools' changes
- handleTools.js: Moves logic out of index file
- handleTools.js: loadTools: returns only requested tools
- handleTools.js: validTools: correctly returns tools based on authentication
* test(index.test.js): add test to validate a tool from an environment variable
* test(tools): add test for initializing an authenticated tool through Environment Variables
* refactor(ChatAgent.js): remove commented out code and unused imports
* refactor(ChatAgent.js): move instructions to a separate file and import them
fix(ChatAgent.js): replace hardcoded instructions with imported ones
* refactor(ChatAgent.js): change import path for TextStream
refactor(stream.js): remove unused TextStream class
* chore(.gitignore): add .env.test to gitignore
refactor(ChatAgent.js): rename CustomChatAgent to ChatAgent
test(ChatAgent.test.js): add tests for ChatAgent class
refactor(outputParser.js): remove OldOutputParser class
refactor(outputParser.js): rename CustomOutputParser to OutputParser
docs(.env.test.example): add comment explaining how to use OPENAI_API_KEY
refactor(jestSetup.js): use dotenv to load environment variables from .env.test file
* Various optimizations and config, add tests for PluginStoreDialog
* test(ChatAgent.test.js): add test to check if chat history is returned correctly
* test: unit tests for plugin store
* test: add frontend-test script to root package.json
* feat(ChatAgent.js, askGPTPlugins.js): add support for aborting chat requests (in progress)
* test: add more client tests
* feat(ChatAgent): allow plugin requests to be cancelled
* feat(ChatAgent): allow message regeneration
* feat(ChatAgent): remember last selected tools
* Remove plugins we don't yet have from manifest.json
* fix(ChatAgent.js): increase maxAttempts from 1 to 2
fix(ChatAgent.js): change error message to 'Cancelled.' if message was aborted mid-generation
fix(openaiCreateImage.js): replace unwanted characters in input string
fix(handlers.js): compare action.tool in lowercase to 'self-reflection'
* fix(ChatAgent): Fix up plugin I/O formatting for n/a actions
* refactor(Plugin.jsx): remove unused import statement
feat(Plugin.jsx): add Plugin component with svg paths and styles
* refactor: simplify credential encryption/decryption by using a single key and IV for all environments. Update crypto.js and .env.example files accordingly.
* fix(ChatAgent.js): reduce maxAttempts from 2 to 1
feat(ChatAgent.js): add model information to responseMessage object
feat(Message.js): add model field to messageSchema
feat(Message.js): add model field to message object
feat(Message.jsx): pass model information to getIcon function
feat(getIcon.jsx): add Plugin component and handle plugin messages differently
* feat(askGPTPlugins.js): add model property to the ask function response object
feat(EndpointItem.jsx): add message property to the EndpointItem component
feat(MessageHeader.jsx): add Plugin icon to the plugins section
feat(MessageHeader.jsx): change alpha to beta in the plugins section
feat(svg): add Plugin, GPTIcon, and BingIcon components to the svg folder
refactor(EndpointItems.jsx): remove unused import statement
* refactor(googleSearch.js, wolfram.js): change error handling to return a message instead of throwing an error
* refactor(CustomAgent): remove commented code and change return object to include returnValues property
* feat(CustomAgent.js): add currentDateString to createPrompt method options
deps(api/package.json): update langchain to v0.0.81
* fix: do not show pagination if the maxPage is 1
* Add Zapier back to manifest (accidentally removed)
* chore(api): update langchain dependency to version 0.0.84
* feat(DALL-E.js): add DALL-E tool for generating images using OpenAI's DALL-E API
refactor(handleTools.js): update import for DALL-E tool
refactor(index.test.js): update import for DALL-E tool
refactor(stablediffusion.js): add check for image directory existence before saving image
* refactor(CustomAgent): rename instructions prefix variable to gpt3 and add gpt4 instructions
feat(CustomAgent): add support for gpt-4 model
fix(initializeCustomAgent.js): pass model name to createPrompt method
fix(outputParser.js): set selectedTool to 'self-reflection' when tool parsing fails
* style(langchain/tools): update guidelines for image creation in DALL-E and StableDiffusion
- Update guidelines for image creation in DALL-E and StableDiffusion tools
- Emphasize the importance of "showing" and not "telling" the imagery in crafting input
- Update formatting for the example prompt for generating a realistic portrait photo of a man
- Generate images only once per human query unless explicitly requested by the user
* docs(tools): update tool descriptions for DALL-E and Stable Diffusion
- Update the description for DALL-E tool to indicate that it is exclusively for visual content and provide guidelines for generating images with a focus on visual attributes.
- Update the description for Stable Diffusion tool to indicate that it is exclusively for visual content and provide guidelines for generating images with a focus on visual attributes.
* chore(api): update "@waylaidwanderer/chatgpt-api" dependency to version "^1.36.3"
* refactor(ChatAgent.js): use environment variable for reverse proxy url
refactor(ChatAgent.js): use environment variable for openai base path
refactor(instructions.js): update gpt3 and gpt3-v2 instructions
refactor(outputParser.js): update finishToolNameRegex in CustomOutputParser class
* refactor(DALL-E.js): change apiKey and azureKey fields to uppercase
refactor(googleSearch.js): change cx and apiKey fields to uppercase
feat(manifest.json): add authConfig field for Stable Diffusion WebUI API URL
refactor(stablediffusion.js): add url field to constructor and change getServerURL() to this.url
refactor(wolfram.js): change apiKey field to uppercase WOLFRAM_APP_ID
* refactor(handleTools.js): simplify tool loading and add support for custom tool constructors and options
* refactor(handleTools.js): remove commented out code and unused imports
* refactor(handleTools.js, index.js): change file name from wolfram.js to Wolfram.js and selfReflection.js to SelfReflection.js to follow PascalCase convention
* refactor(outputParser.js, askGPTPlugins.js): improve code readability and remove unnecessary comments
* feat(GoogleSearch.js): add GoogleSearchAPI tool to allow agents to use the Google Custom Search API
feat(SelfReflection.js): add SelfReflectionTool to allow agents to reflect on their thoughts and actions
feat(StableDiffusion.js): add StableDiffusionAPI tool to allow agents to generate images using stable diffusion webui's api
feat(Wolfram.js): add WolframAlphaAPI tool for computation, math, curated knowledge & real-time data through WolframAlpha.
* testing openai specs
* doc: fix link in .env.example
* package-update
* fix(MultiSelectDropDown.jsx): handle null or undefined values in availableValues array
* refactor(DALL-E.js, StableDiffusion.js): remove 'dist/' from image path
feat(docker-compose.yml): add comments for reverse proxy configuration
* chore(.gitignore): ignore client/public/images/
fix(DALL-E.js, StableDiffusion.js): change image path from dist/ to public/
feat(index.js): add support for serving static files from client/public/ directory
* fix: remove selected tool when uninstalled
* plugin options in progress
* fix: fix issue with uninstalling a plugin that is in use and typescript errors
* feat(gptPlugins): add Preset support for GPT Plugins endpoint
feat(ChatAgent.js): add support for agentOptions object
feat(convoSchema.js): add agentOptions field to conversation schema
feat(defaults.js): add agentOptions object to defaults
feat(presetSchema.js): add agentOptions field to preset schema
feat(askGPTPlugins.js): add support for agentOptions object in request body
feat(EditPresetDialog.jsx): add support for showing/hiding GPT Plugins agent settings
feat(EditPresetDialog.jsx): add support for setting GPT Plugins agent options
fix(EndpointOptionsDialog.jsx): change endpoint name from 'gptPlugins' to 'Plugins'
feat(AgentSettings.jsx): add AgentSettings component for GPT plugins configuration
feat(client): add GPT Plugins settings component and endpoint to Settings component
fix(client): remove unused imports in GoogleOptions component
feat(PluginsOptions): add support for agent settings and refactor code
feat(PluginsOptions): add GPTIcon to show/hide agent settings button
feat(index.ts): export SVG components
feat(GPTIcon.jsx): add className prop to GPTIcon component
feat(GPTIcon.jsx): import cn function from utils
feat(BingIcon.tsx): export BingIcon component
feat(index.ts): export BingIcon component
feat(index.ts): export MessagesSquared component
refactor(cleanupPreset.js): add default values for agentOptions in gptPlugins endpoint
feat(getDefaultConversation.js, handleSubmit.js): add agentOptions object to conversation object for GPT plugins endpoint. Update default temperature value to 0.8. Add chatGptLabel and promptPrefix properties to conversation object.
* fix: set default convo back to null
* refactor(ChatAgent.js, askGPTPlugins.js, AgentSettings.jsx): change variable names for better readability and remove redundant code
* test: add RecoilRoot to layout-test-utils
* refactor(askGPTPlugins.js): remove redundant code and use endpointOption directly
feat(askGPTPlugins.js): add validation for tools in endpointOption before using it
* chore(ChatAgent.js, Settings.jsx): add agentOptions to saveConvo function and adjust Settings component height
The ChatAgent.js file was modified to include the agentOptions object in the saveConvo function. The Settings.jsx file was modified to adjust the height of the component to ensure that all content is visible.
* refactor(ChatAgent.js): extract reverseProxyUrl option to a class property and add support for it
feat(ChatAgent.js): add support for completionMode option in sendApiMessage method
feat(ChatAgent.js): add support for user-provided promptPrefix in buildPrompt method
* feat(plugins): allow preset change mid conversation
* refactor: playwright config
* build: update configs
* test: add automated setup process for playwright
* test: update messages spec to delete message after its been created
* build: add github action for e2e to workflows
* make husky install conditional
* build: try making husky install exit if running in ci
* ignore husky on ci
* chore: update OPENAI_KEY to OPENAI_API_KEY in .github/playwright.yml and api/.env.example
refactor(chatgpt-client.js): update OPENAI_KEY to OPENAI_API_KEY
feat(langchain): add demo-aiplugin.js and demo-yaml.js, remove test2.js, test3.js, and test4.js
chore: remove unused test files
fix(titleConvo.js): fix typo in environment variable name
fix(askGPTPlugins.js): fix typo in environment variable name
fix(endpoints.js): fix typo in environment variable name
docs: update installation guide to use OPENAI_API_KEY instead of OPENAI_KEY in .env file
* fix(index.test.js): change import of GoogleSearchAPI to use uppercase G in GoogleSearch
* backtrack and redo
* add jwt secret
* try manually installing vite
* refactor workflow again
* move vite to root and add frontend:build script
* chore(api): bump langchain version
* feat(PluginController.js): authenticate plugins from environment variables if they are set
feat(PluginStoreDialog.tsx): show plugin auth form only if plugin is not authenticated by env var and require authentication
feat(types.ts): add authenticated field to TPlugin type definition
* docs: update google_search.md and add stable_diffusion.md
* Update stable_diffusion.md
* refactor(Wolfram.js): remove newline characters from query before encoding
docs(wolfram.md): add instructions for setting WOLFRAM_APP_ID in api.env to bypass prompt for AppID in plugin
* refactor(Wolfram.js): replace deprecated replaceAll method with replace method
* Update wolfram.md
* fix(askGPTPlugins): error message will reference correct Parent Message
* refactor(chatgpt-client.js, ChatAgent.js): simplify maxContextTokens calculation and add promptPrefix parameter to buildPrompt method
* docs: initial draft of intro to plugins
* Update introduction.md
* Update introduction.md
* Feature: User/Reg cleanup + Install / Upgrade script for langchain (#427)
* test: login tests
* test: finish login tests
* test: initial tests for registration
* test: registration specs
* feature: Init a app config file
- Simplifies the ENV vars too
- Legacy fallbacks for older builds
* refactor(auth): Refactor log in/out controllers
- Moves both login and logout controllers to their own file
* chore(jwt): Throw warning if secret is default
* feature(frontend): Ability to disable registration
* feature(env): Env in the root + version support
ie .env.prod, .env.dev, .env.test
* feature: Upgrade .env script for users
* chore(config): Refactor and remove legacy env refs
* feature(upgrade): Upgrade script for .env changes
* feature: Install script and upgrade script
* bugfix: Uncomment line to remove old .env file
* chore: rename OPENAI_KEY to OPENAI_API_KEY
* chore: Cleanup config changes/bugs
* bugfix: Fix config and node env issues
* bugfix: Config validation logic
* bugfix: Handle unusual env configs gracefully
* bugfix: Revert route changes and fix registration disable calling
* bugfix: Fix env issues in frontend
* bugfix: Fix login
* bugfix: Fix frontend envs
* bugfix: Fix frontend jest tests
* bugfix: Fix upgrade scripts
* bugfix: Allow install in non-tty envs
* bugfix(windows): Use cross-env to set for windows
* bugfix(env): Handle .env being incorrect to begin with for client domain
* chore(merge-conflict): Update to LibreChat
* chore(merge-conflict): Update to package-lock
---------
Co-authored-by: Daniel D Orlando <dan@danorlando.com>
* chore: comment out unused agent options
* refactor playwright.yml again
* try adding .npmrc
* delete playwright yml
* create new action
* test new playwright action
* Update langchain plugins docs (#461)
* Update: install docs (LibreChat) (#458)
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Update documentation_guidelines.md
* Update introduction.md
add link to readme
* Update stable_diffusion.md
add link back to readme
* Update wolfram.md
add link back to readme
* Update README.md
add Plugins to ToC
* feat(ChatAgent.js): add support for langchainProxy configuration option
Add a new configuration option `langchainProxy` to the ChatAgent class. If the option is set, the `basePath` configuration option of the `ChatOpenAI` instance is set to the base path of `langchainProxy`.
* bugfix(errors): Possible workaround for error flashing (#463)
* Test/user auth system client tests (#462)
* test: login tests
* test: finish login tests
* test: initial tests for registration
* test: registration specs
* modify for new secrets
* modify for new secrets
* fix corrupted package-lock
* remove env vars for testing
* chore(api): update langchain dependency to version 0.0.91
* Update introduction.md
* Update introduction.md
* Update introduction.md
* run it again
* try externalizing uuid package in rollupoptions to fix build error
* update authenticate script for LibreChat
* add npm install playwright/test to run
* try adding langchain dependency to root package.json to resolve zod error
* add missing env vars
* fix: no longer renders html in markdown content
fix: patch XSS vulnerability completely by handling cursor on the frontend without css/html
* fix(Content.jsx): fix cursor logic so it never shows for static messages
* bugfix(langchain): Upgrade script, docker, env and docs (#465)
* bugfix(errors): Remove incorrect manual fix from misunderstanding
* chore(env): Lets not make a .env.prod and use the prod values in the default root .env
- .env.dev will still be created
* chore(upgrade.js): Lets tell the user about .env.dev if we create it
* bugfix(env): Move to full name environments for vite
- .env.prod => .env.production
- .env.dev => .env.development
* chore(env-example): Explain how to get google login working in production
* bugfix(oauth): Minor fix to point isProduction to a correct value
* bugfix: Typo in public
* chore(docs): Update docs to note the changes to .env
* chore(docs): Include note on how to get google auth working in dev and how to disable registration
* bugfix: Fix missing env changes
* bugfix: Fix up docker to work with new env / npm changes
* Update .env.example
Cleanup the env of the palm2 instruction and fix to formating
* chore(docker): Simplify Docker deployments
- Needs work to support dev env/hotreload
* bugfix: Remove volume map for client dir
* chore(env-example): Change instructions to be more user centric
---------
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
* update: install docs (#466)
* Add files via upload
* Update apis-and-tokens.md
* Update apis-and-tokens.md
* Update docker_install.md
* Update linux_install.md
* Rename apis-and-tokens.md to apis_and_tokens.md
* Update docker_install.md
* Update linux_install.md
* Update mac_install.md
* Update linux_install.md
* Update docker_install.md
* Update windows_install.md
* Update apis_and_tokens.md
* Update mac_install.md
* Update linux_install.md
* Update docker_install.md
* Update README.md
* Update README.md : Breaking Changes
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
* Update README.md (#468)
add new API/Token docs to Toc
* docs: guide on how to create your own plugin
* Update make_your_own.md
* Update make_your_own.md
* feat(docker): add build args for frontend variables in Dockerfile
feat(docker-compose): add build args for frontend variables in docker-compose.yml
* Update docker_install.md
* Update docker_install.md
* Update docker_install.md
* Update docker_install.md
* docs: update (#469)
* Update: make_your_own.md
* Update README.md
add `make_your_own.md` to ToC
* Update linux_install.md
* Update mac_install.md
* Update windows_install.md
* Update apis_and_tokens.md
* Update docker_install.md
* Update docker_install.md
* Update linux_install.md
* Update mac_install.md
* Update windows_install.md
* Update apis_and_tokens.md
* Update user_auth_system.md
* Update docker_install.md
clean up of repeated information
* Update docker_install.md
* Update docker_install.md
typo
* fix: fix issue with pluginstore next and prev buttons going out of bounds
* fix: add icon for web browser plugin
* docs(GoogleSearch.js): update description of GoogleSearchAPI class to be more descriptive of its functionality
* feat(ask/handlers.js): add cursor to indicate ongoing progress of a long-running task
fix(Content.jsx): handle null content in the message stream by replacing it with an empty string (with a space so a text space is rendered)
* Update README.md
* Update README.md
* fix: plugin option stacking order
* update: web browser icon (#470)
* Delete web-browser.png
* update: web browser icon
* Update readme (#472)
* Update README.md
Discord badge now displays the number of online users
Project description has been updated to reflect current status
Feature section has been updated to reflect current capabilities
Sponsors section is now located just above the contributors section
Roadmap has been removed as it was outdated.
* Delete roadmap.md
Roadmap has been removed to streamline document maintenance.
* Update README.md
* Update README.md
* Delete CHANGELOG.md
* add frontend unit test action
* action for backend unit test run
* add env vars for backend tests
* add step for install api deps
* use test:ci script
* make test:ci run from api folder
* add script for installing linux x64 sharp
* move jest setup from root to /api
* fix: pluginstore in mobile view getting clipped and not scrolling
* change scripts to test:client and test:api in root package.json
* test api pipeline sharp installation
* remove sharp installation
* last attempt
* revert
* docs(linux_install.md): remove duplicate git clone command
* chore(Dockerfile): comment out nginx-client build stage
docs(README.md): update installation instructions and mention docker-compose changes
docs(features/plugins/introduction.md): bold plugin names and add emphasis to notes
* feat: add superscript and subscript support to markdown rendering
refactor: support markdown citations for BingAI
* refactor: support markdown citations for BingAI
* chore(client): add cross-env package to dependencies
refactor(client): comment out uuid from external rollup options in vite.config.ts
* feat(package-lock.json): add Jest as a devDependency and remove uuidv4 dependency
* feat(workflows): add jest branch to backend and frontend unit tests on push and pull_request events
* chore(workflows): update Node.js version to 19.x in backend and frontend review workflows
* test(PluginStoreDialog.spec.tsx): update test to reflect new pagination
The test was updated to reflect the new pagination. The test now expects to see Plugin 6 and Plugin 7 on the second page instead of Plugin 3, Plugin 4, and Plugin 5. The previous expectations were commented out.
* chore: update package versions to 0.5.0
chore: remove jest branch from backend-review.yml
feat: add support for feat/playwright-jest-cicd branch in backend-review.yml
fix(api): fix sampleTools variable in index.test.js
* fix(Content.jsx): replace escaped whitespace with invisible character
---------
Co-authored-by: David Shin <42793498+dncc89@users.noreply.github.com>
Co-authored-by: Daniel D Orlando <dan@danorlando.com>
Co-authored-by: LaraClara <2524209+ClaraLeigh@users.noreply.github.com>
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
* components for plugins in progress
* WIP: add langchain client implementation for tools/plugins
feat(langchain): add loadHistory function for loading chat history from database
feat(langchain): add saveMessageToDatabase function for saving chat messages to database
* chore(Memory.js): remove Memory.js file from the project directory.
* WIP: adding plugin functionality
——————————————————
fix(eslintrc.js): change arrow-parens rule to always require parentheses
refactor(agent.js): reorganize imports and add new imports
feat(agent.js): add support for saving and loading chat history
feat(agent.js): add support for saving messages to database
feat(agent.js): add ChatAgent class with initialize and sendMessage methods
fix(langchain): use getConvo and saveMessage functions from models.js instead of Conversation and Message models
feat(langchain): add user parameter to loadHistory and saveMessageToDatabase functions
chore(package.json): update langchain package version to 0.0.59 and add langchain script to run test2.js file
——————————————————
* WIP: testing agent initialization
* WIP: testing various agent methods
feat(agent.js): add CustomChatAgent class and initializeAgentExecutorWithOptions method
feat(customChatAgent.js): add CustomPromptTemplate and CustomOutputParser classes
refactor(langchain): uncomment code for input2 and options
feat(langchain): add input1 to read comments on a youtube video
docs(langchain): remove commented code and add whitespace to package.json
* WIP: feat: plugin endpoint, backend class working
* feat(agent.js): add support for Zapier NLA API key
feat(agent.js): add ZapierToolKit to tools if zapierApiKey is provided
feat(customAgent.js): change prompt prefix and suffix to reflect new task-based prompt
feat(test4.js): add test for new task-based prompt
* style(langchain): improve readability and add comments to code
feat(langchain): update prompt message for custom agent
fix(langchain): update message format in test4.js
* style(customAgent.js): remove unnecessary capitalization and rephrase some sentences
test(langchain): add test2 and test3 scripts to package.json
* chore(customAgent.js): fix typo in comment, change "an" to "identical"
* WIP: gpt-4 testing
* feat(langchain): add AIPluginTool and HumanTool classes
fix(langchain): remove zapierApiKey option from ChatAgent constructor
refactor(langchain): update langchain package to v0.0.64
misc(langchain): update test2, test3, and test4 scripts to use --inspect flag
* feat(langchain): add GoogleSearchAPI tool for searching the web using Google Custom Search API
* feat(askGPTPlugins.js): add support for progress callback in ask function
fix(agent.js): pass progress callback to sendApiMessage function
* refactor(agent.js): load tools from options and initialize them in constructor
feat(agent.js): add support for environment variable SERPAPI_API_KEY
feat(agent.js): add support for environment variable ZAPIER_NLA_API_KEY
docs(agent.js): remove commented out code and add comments to clarify code
* chore(langchain): remove unused files loadHistory.js and saveMessage.js
* feat(validateTools.js): add function to validate API keys for supported tools
* feat(langchain): update langchain package to version 0.0.66
feat(langchain): add support for GPT-4 model
fix(server/index.js): fix uncaughtException handler to ignore 'fetch failed' errors
* refactor(agent.js): remove FORMAT_INSTRUCTIONS and replace with a more concise message
refactor(agent.js): remove unused variable 'errorMessage'
refactor(agent.js): change 'result' variable initialization to an empty object instead of null
refactor(agent.js): change error message when response generation fails
refactor(agent.js): change output message when response generation fails
refactor(agent.js): change output message when response generation succeeds
* chore(langchain): comment out unused model in ChatAgent constructor
feat(langchain): add test5 script to package.json for running test5.js script
* refactor(agent.js): change response to answer and update message
refactor(test3.js, test5.js): remove commented out code and add comments
The changes in agent.js are to improve the message that is returned to the user. The word "response" has been changed to "answer" to better reflect the output of the chatbot. The message has also been updated to provide clearer instructions to the user.
The changes in test3.js and test5.js are to remove commented out code and add comments to improve readability.
* docs: update links to LOCAL_INSTALL.md and defaultSystemMessage.md
fix: fix typo in BingAI/Settings.jsx
feat: add Dockerfile for app containerization
docs(google_search.md): add guide for setting up Google Custom Search API key and ID
* docs: update link to system message guidelines in Bing AI Settings component
docs: update link to system message guidelines in GOOGLE_SEARCH.md
feat: add JAILBREAK_INFO.md guide for Bing AI jailbreak mode system message guidelines
* style(api): remove unnecessary quotes and empty values from .env.example
style(agent.js): refactor getActions method to accept an input parameter
feat(agent.js): add handleChainEnd method to CustomChatAgent class
style(customAgent.js): add a new line to the end of the file
style(test5.js): comment out unused variable and update input1 variable
style(googleSearch.js): change tool name to kebab-case
* chore(langchain): comment out handleChainEnd method in agent.js
feat(langchain): add browser tool to ChatAgent in test2.js
feat(langchain): add modelOptions to ChatAgent in test2.js
feat(langchain): change question in input1 and request article review summary in test5.js
* fix(askGPTPlugins.js): fix syntax error by removing extra comma in parentMessageId field
feat(askGPTPlugins.js): add default value of null to parentMessageId parameter in ask function
* fix(askGPTPlugins.js): change endpoint string from 'GPTPlugins' to 'gptPlugins'
feat(endpoints.js): add support for gptPlugins endpoint
feat(PresetItem.jsx): add support for gptPlugins endpoint
feat(HoverButtons.jsx): add support for gptPlugins endpoint
feat(createPayload.ts): add support for gptPlugins endpoint
feat(types.ts): add gptPlugins endpoint to EModelEndpoint enum
feat(endpoints.js): add gptPlugins endpoint to availableEndpoints selector
feat(cleanupPreset.js): add support for gptPlugins endpoint
feat(getDefaultConversation.js): add support for gptPlugins endpoint
feat(getIcon.jsx): add support for gptPlugins endpoint
feat(handleSubmit.js): add support for gptPlugins endpoint
* refactor(agent.js): remove debug option from options object
refactor(agent.js): change tool name from 'google-search' to 'google'
refactor(agent.js): update description for 'google' tool
feat(agent.js): add support for citing sources when using web links in response message
fix(agent.js): update error message to not mention error to user
feat(agent.js): add unique message ids for user message and response message
feat(agent.js): limit number of search results to 5 in 'google' tool
refactor(validateTools.js): add console log to show valid tools
* feat(askGPTPlugins.js): add support for GPT-3.5-turbo model and validate model option
refactor(askGPTPlugins.js): remove unused imports and variables
refactor(askGPTPlugins.js): remove commented code
refactor(askGPTPlugins.js): remove unused parameters in ask function
feat(ask/index.js): add askGPTPlugins route to router
* feat(NewConversationMenu): add alpha tag to gptPlugins endpoint and rename it to Plugins
* refactor(askGPTPlugins.js): remove commented code and unused imports
feat(askGPTPlugins.js): add support for debug option in endpointOption
feat(askGPTPlugins.js): add support for chatGptLabel, promptPrefix, temperature, top_p, presence_penalty, and frequency_penalty in endpointOption
feat(askGPTPlugins.js): add support for sending plugin and pluginend events
feat(askGPTPlugins.js): add onAgentAction and onChainEnd callbacks to ChatAgent.sendMessage
refactor(titleConvo.js): comment out unused imports
refactor(validateTools.js): comment out console.log statement
refactor(agent.js): change saveMessage to include unfinished property
feat(agent.js): add endpoint property to saveConvo call in saveMessageToDatabase
feat(askGPTPlugins.js): add validateTools import and use it to validate endpointOption.tools before passing to ChatAgent constructor
feat(askGPTPlugins.js
* refactor(MessageHeader.jsx): extract plugins section into a separate variable and add support for gptPlugins endpoint
fix(MessageHeader.jsx): disable clicking on non-clickable endpoints
* components for plugins in progress
* feat(Plugin.jsx): add plugin prop to Plugin component and display plugin name
feat(Plugin.jsx): add loading state and display loading spinner
feat(Plugin.jsx): add Disclosure component to Plugin component
feat(Plugin.jsx): add Disclosure.Panel to Plugin component to display team pricing information
feat(Spinner.jsx): add classProp prop to Spinner component to allow for custom styling
feat(Landing.jsx): add Plugin component to Landing page for testing
testing gpt plugins
feat(plugins): Milestone commit
- Add formatAction function to format plugin actions.
- Add prefix.js file to store the prefix message for ChatAgent.
- Update ask function to include plugin object to store plugin data.
- Update onAgentAction and onChainEnd functions to format plugin data and send intermediate messages.
- Update response object to include plugin data.
The `handlers.js` file now includes a `formatAction` function that formats the action object for display in the UI. The `createOnProgress` function now returns a `sendIntermediateMessage` function that sends intermediate messages to the client.
feat (client): add support for plugins in messages
This commit adds support for plugins in messages. It includes changes to the `handlers.js`, `index.jsx`, `CodeBlock.jsx`, `Message.jsx`, `MessageHeader.jsx`, and `Plugin.jsx` files.
The `index.jsx` file now includes a `plugin` property in the `messageHandler` function.
The `CodeBlock.jsx` file now includes a `plugin` property that determines the language of the code block.
The `Message.jsx` file now includes a `Plugin` component that displays the plugin used in the message.
The `MessageHeader.jsx` file now includes a `Plugins` component that displays the enabled plugins.
feat(langchain): add OpenAICreateImage tool for generating images based on user prompts
fix(langchain): update validateTools to include create-image tool
fix(langchain): save plugin data to messageSchema
fix(server/routes/askGPTPlugins.js): save userMessage and response to messageSchema
feat(langchain): add SelfReflectionTool
Add a new tool to the LangChain agent, SelfReflectionTool, which enhances the agent's self-awareness by reflecting on its thoughts before taking action. The tool provides a space for the agent to explore and organize its ideas in response to the user's message.
Also, update the prefix message to reflect the changes in the agent's behavior and the way it should engage with the user. The prefix message now emphasizes the use of tools when necessary, and relying on the agent's knowledge for creative requests. It also provides clear instructions on how to use the 'Action' input and how to carry out tasks in the sequence written by the human.
Finally, update the OpenAICreateImage tool to return the image URL in markdown format. The tool replaces newlines and spaces in the input text with hyphens to create a valid markdown link.
Milestone commit: better error handling with custom output parser, dir and file re-org
style(langchain): fix formatting and add comments to prefix.js
fix(langchain): remove commented out code in test6.js
feat(langchain): reduce maxAttempts from 3 to 2 in CustomChatAgent's buildPromptPrefix method
feat(langchain): add null check for result.output in CustomChatAgent's buildPromptPrefix method
style(langchain): improve consistency and readability of code
This commit improves the consistency and readability of the code in the langchain directory. Specifically, it:
- Changes the case of the "Thought" output in the CustomChatAgent class to match the "Thought" output in the SelfReflectionTool class.
- Adds a currentDateString property to the CustomChatAgent class to avoid repeating the same code in multiple places.
- Updates the prefix in the prefix.js file to match the current objectives of the ChatGPT model.
- Changes the description of the OpenAICreateImage tool to request a description of the image to be generated.
- Updates the tools used by the ChatAgent in the askGPTPlugins.js file to include the Google and Browser tools instead of the Calculator and Create-Image tools.
feat: add wolfram, improve image creation, rename to dall-e
* refactor(langchain): update language and formatting in various files
- Update tool-based instructions to use proper Markdown syntax for image URLs
- Adjust temperature for modelOptions in CustomChatAgent class
- Comment out console.debug statement in CustomChatAgent class
- Update prefix in initializeCustomAgent function to use proper line breaks
- Update prefix in instructions.js to use proper line breaks and change "user" to "human"
- Update input in test6.js to use Ezra Pound instead of Hemingway
- Update return statement in OpenAICreateImage class to use "generated-image" as alt-text
- Update description in SelfReflectionTool class to provide clearer instructions
- Update tools in ask function in askGPTPlugins.js to use only the DALL-E tool and enable debug mode
feat(ask): add support for DALL-E tool in formatAction function
feat(ask): add support for self-reflection tool in formatAction function
feat(Plugin.jsx): add support for self-reflection tool in Plugin component
fix(Plugin.jsx): fix Plugin component to not display 'None' when latest is not available
* docs(openaiCreateImage.js): update tool description to clarify usage
* feat(agent.js): add message parameter to initialize function
feat(agent.js): pass message parameter to SelfReflectionTool constructor
feat(customAgent.js): add longestToolName variable to CustomOutputParser
feat(openaiCreateImage.js): replace new lines with spaces in prompt parameter
feat(selfReflection.js): add message parameter to SelfReflectionTool constructor
feat(selfReflection.js): add placeholder response to selfReflect function
* feat: frontend plugin selection
* fix: agent updates, available tools via endpoint config
* fix: improve frontend plugin selection
* feat: further customize agent and bypass executor when no tools are provided
* fix: key issue in multiselect and allow setting changes during convo in plugins endpoint
* fix: convo will save modelOptions, fix persistent errors with agent
* fix: add looser final answer parsing and edit action formatting
* fix: handle edge case where stop token is not hit and causes long parsing error
* feat: trying new prompt for image creation
* fix: improvements based on gpt-3.5
* feat: allow setting model options throughout plugin conversation
* fix: agent adjustments
* improve final reply for gpt-4, gpt-3.5 needs a more stable approach
* fix: better context output for gpt-3.5
* fix: added clarification for better context output for gpt-3.5
* feat(PluginsOptions): add advanced mode to show/hide options
style(PluginsOptions): add styles for advanced mode and show/hide options
* minor changes to styling
* refactor(langchain): add support for custom GPT-4 agent
This commit adds support for a custom GPT-4 agent in the langchain
module. The `CustomGpt4Agent` class extends the `ZeroShotAgent` class
and includes a new `createPrompt` method that generates a prompt
template for the agent. The `initializeCustomAgent` function has been
updated to use the `CustomGpt4Agent` class when the model is not GPT-3.
The `instructions.js` file has also been updated to include new
instructions for the GPT-4 agent. The `formatInstructions` method has
been removed and replaced with `gpt4Instructions` and `prefix2` and
`suffix2` have been added to include the new instructions.
feat(langchain): add custom output parser for langchain agents
This commit adds a custom output parser for langchain agents. The new parser is called CustomOutputParser and it extends ZeroShotAgentOutputParser. It takes a fields object as a parameter and sets the tools and longestToolName properties. It also sets the finishToolNameRegex property to match the final answer. The parse method of the CustomOutputParser class takes a text parameter and returns an object with returnValues, log, and toolInput properties.
This commit also adds a Gpt4OutputParser class that extends ZeroShotAgentOutputParser. It takes a fields object as a parameter and sets the tools and longestToolName properties. It also sets the finishToolNameRegex property to match the final answer. The parse method of the Gpt4OutputParser class takes a text parameter and returns an object with returnValues, log, and toolInput properties.
feat(langchain): add isGpt3 parameter to
* Stable Diffusion Plugin (#204)
* Added stable diffusion plugin
* Added example prompt
* Fixed naming
* Removed brackets in the prompt
* fix: improved agent for gpt-3.5
* fix: outparser, gpt3 instructions, and wolfram error handling
* chore: update langchain to 0.0.71
* fix: long parsing action input fix
* fix: make plugin select close on clicking label/button
* fix: make plugin select close on clicking label/button
* fix: wolfram input formatting and gpt-3 payload without plugins
* chore(api): update axios package version to 1.3.4
feat(api): add requireJwtAuth middleware to askGPTPlugins endpoint
fix(api): replace session user with user id in askGPTPlugins endpoint
docs(LOCAL_INSTALL.md): update guide for local installation and testing
This commit updates the guide for local installation and testing of the
ChatGPT-Clone app. It includes instructions for locally running the app,
updating the app version, and running tests. It also includes a new
option for running the app using Docker. The commit also fixes some
typos and formatting issues.
* add reverseProxy to plugins client
* chore(Dockerfile-app): add Dockerfile for building and running the app in a container
docs: remove outdated guides on Google search and Bing jailbreak mode
docs(LOCAL_INSTALL.md): remove outdated Windows installation instructions and update MeiliSearch configuration file
* fix: handle n/a parsing error better, reduce token waste if no agentic behavior is needed
* style: fix formatting and add parentheses around arrow function parameter
style: change hover background color to white and dark hover background color to gray-700
* chore: re-organize agent dir and files
* feat(ChatAgent.js): add support for PlanAndExecuteAgentExecutor
feat(PlanAndExecuteAgentExecutor.js): add PlanAndExecuteAgentExecutor class
feat(planExecutor.js): add demo for PlanAndExecuteAgentExecutor
* feat: add azure support to plugins
* refactor(utils): add basePath endpoint for genAzureEndpoint
feat(api): add support for Azure OpenAI API in various modules and tools
* feat: add plugin api for fetching available tools
* feat: add data service for getting available plugins
* feat: first iteration plugin store UI
* refactor: rename files to follow proper naming convention
* feat: Plugin store UI components
* feat: create separate user routes, service, controller, and add plugins to user model
* feat: create data service for adding and removing plugins per user
* feat: UI for adding and removing plugins, displaying plugins in dropdown based on what user has installed
* fix: merge conflicts from main
* fix: fix plugin items titles
* fix: tool.value -> tool.pluginKey
* fix: testing returnDirect for self-reflection
* fix: add browser tool to manifest
* refactor(outputParser.js): remove commented out code
feat(outputParser.js): add support for thought input when there is no action input
* handling 'use tool' edge case
* merge main to langchain
* fix(User.js, auth.service.js, localStrategy.js): change deprecated Joi.validate() to schema.validate() method (#322)
* fix(auth.service.js): fixes deprecated error callback in mongoose save method (#323)
* chore: run formatting script with new rules
* refactor: add requiresAuth to manifest, fix uninstall button
* version with plugin auth as dialog modal
* feat: Complete frontend for plugin auth
* frontend styling updates
* feat: api for plugin auth
* feat: Add tooltip with field description to plugin auth form
* fix: issue with plugin that has no auth
* feat(tools): add support for user-specific API keys
This commit adds support for user-specific API keys for the following tools:
- Google Search API
- Web Browser
- SerpAPI
- Zapier
- DALL-E
- Wolfram Alpha API
It also adds support for OpenAI API key for the Web Browser tool.
The `validateTools` function now takes a `user` parameter and checks for user-specific API keys before falling back to environment variables.
The `loadTools` function now takes a `user` parameter and initializes the tools with user-specific API keys if available.
The `manifest.json` file has been updated to include the new `authConfig` fields for the tools that support user-specific API keys.
The `askGPTPlugins.js` file has been updated to use the `validateTools` function with the `user` parameter.
refactor(ChatAgent.js): add user parameter to initialize function and pass it to loadTools function
refactor(tools/index.js): set default value for tools parameter in validateTools function
refactor(askGPTPlugins.js): remove duplicate user variable declaration and use the one from req object
* refactor(ChatAgent.js): await validTool() before pushing to this.tools array
refactor(tools/index.js): use Map instead of Set to store valid tools
refactor(tools/index.js): filter availableTools to only validate tools passed in
refactor(PluginController.js): filter out duplicate plugins by pluginKey
refactor(crypto.js): use environment variables for encryption key and initialization vector
feat(PluginService.js): add null check for pluginAuth in getUserPluginAuthValue()
* feat(api): add credentials key and IV to .env.example for securely storing credentials
* Adds testing for handling tools, introducing a test env to the backend
Fixes bugs & optimizes code as revealed through testing, including:
- wolfram.js: fixes bug where wolfram was not handling authentication
- ChatAgent.js: ChatAgent modified to reflect 'handleTools' changes
- handleTools.js: Moves logic out of index file
- handleTools.js: loadTools: returns only requested tools
- handleTools.js: validTools: correctly returns tools based on authentication
* test(index.test.js): add test to validate a tool from an environment variable
* test(tools): add test for initializing an authenticated tool through Environment Variables
* refactor(ChatAgent.js): remove commented out code and unused imports
* refactor(ChatAgent.js): move instructions to a separate file and import them
fix(ChatAgent.js): replace hardcoded instructions with imported ones
* refactor(ChatAgent.js): change import path for TextStream
refactor(stream.js): remove unused TextStream class
* chore(.gitignore): add .env.test to gitignore
refactor(ChatAgent.js): rename CustomChatAgent to ChatAgent
test(ChatAgent.test.js): add tests for ChatAgent class
refactor(outputParser.js): remove OldOutputParser class
refactor(outputParser.js): rename CustomOutputParser to OutputParser
docs(.env.test.example): add comment explaining how to use OPENAI_API_KEY
refactor(jestSetup.js): use dotenv to load environment variables from .env.test file
* Various optimizations and config, add tests for PluginStoreDialog
* test(ChatAgent.test.js): add test to check if chat history is returned correctly
* test: unit tests for plugin store
* test: add frontend-test script to root package.json
* feat(ChatAgent.js, askGPTPlugins.js): add support for aborting chat requests (in progress)
* test: add more client tests
* feat(ChatAgent): allow plugin requests to be cancelled
* feat(ChatAgent): allow message regeneration
* feat(ChatAgent): remember last selected tools
* Remove plugins we don't yet have from manifest.json
* fix(ChatAgent.js): increase maxAttempts from 1 to 2
fix(ChatAgent.js): change error message to 'Cancelled.' if message was aborted mid-generation
fix(openaiCreateImage.js): replace unwanted characters in input string
fix(handlers.js): compare action.tool in lowercase to 'self-reflection'
* fix(ChatAgent): Fix up plugin I/O formatting for n/a actions
* refactor(Plugin.jsx): remove unused import statement
feat(Plugin.jsx): add Plugin component with svg paths and styles
* refactor: simplify credential encryption/decryption by using a single key and IV for all environments. Update crypto.js and .env.example files accordingly.
* fix(ChatAgent.js): reduce maxAttempts from 2 to 1
feat(ChatAgent.js): add model information to responseMessage object
feat(Message.js): add model field to messageSchema
feat(Message.js): add model field to message object
feat(Message.jsx): pass model information to getIcon function
feat(getIcon.jsx): add Plugin component and handle plugin messages differently
* feat(askGPTPlugins.js): add model property to the ask function response object
feat(EndpointItem.jsx): add message property to the EndpointItem component
feat(MessageHeader.jsx): add Plugin icon to the plugins section
feat(MessageHeader.jsx): change alpha to beta in the plugins section
feat(svg): add Plugin, GPTIcon, and BingIcon components to the svg folder
refactor(EndpointItems.jsx): remove unused import statement
* refactor(googleSearch.js, wolfram.js): change error handling to return a message instead of throwing an error
* refactor(CustomAgent): remove commented code and change return object to include returnValues property
* feat(CustomAgent.js): add currentDateString to createPrompt method options
deps(api/package.json): update langchain to v0.0.81
* fix: do not show pagination if the maxPage is 1
* Add Zapier back to manifest (accidentally removed)
* chore(api): update langchain dependency to version 0.0.84
* feat(DALL-E.js): add DALL-E tool for generating images using OpenAI's DALL-E API
refactor(handleTools.js): update import for DALL-E tool
refactor(index.test.js): update import for DALL-E tool
refactor(stablediffusion.js): add check for image directory existence before saving image
* refactor(CustomAgent): rename instructions prefix variable to gpt3 and add gpt4 instructions
feat(CustomAgent): add support for gpt-4 model
fix(initializeCustomAgent.js): pass model name to createPrompt method
fix(outputParser.js): set selectedTool to 'self-reflection' when tool parsing fails
* style(langchain/tools): update guidelines for image creation in DALL-E and StableDiffusion
- Update guidelines for image creation in DALL-E and StableDiffusion tools
- Emphasize the importance of "showing" and not "telling" the imagery in crafting input
- Update formatting for the example prompt for generating a realistic portrait photo of a man
- Generate images only once per human query unless explicitly requested by the user
* docs(tools): update tool descriptions for DALL-E and Stable Diffusion
- Update the description for DALL-E tool to indicate that it is exclusively for visual content and provide guidelines for generating images with a focus on visual attributes.
- Update the description for Stable Diffusion tool to indicate that it is exclusively for visual content and provide guidelines for generating images with a focus on visual attributes.
* chore(api): update "@waylaidwanderer/chatgpt-api" dependency to version "^1.36.3"
* refactor(ChatAgent.js): use environment variable for reverse proxy url
refactor(ChatAgent.js): use environment variable for openai base path
refactor(instructions.js): update gpt3 and gpt3-v2 instructions
refactor(outputParser.js): update finishToolNameRegex in CustomOutputParser class
* refactor(DALL-E.js): change apiKey and azureKey fields to uppercase
refactor(googleSearch.js): change cx and apiKey fields to uppercase
feat(manifest.json): add authConfig field for Stable Diffusion WebUI API URL
refactor(stablediffusion.js): add url field to constructor and change getServerURL() to this.url
refactor(wolfram.js): change apiKey field to uppercase WOLFRAM_APP_ID
* refactor(handleTools.js): simplify tool loading and add support for custom tool constructors and options
* refactor(handleTools.js): remove commented out code and unused imports
* refactor(handleTools.js, index.js): change file name from wolfram.js to Wolfram.js and selfReflection.js to SelfReflection.js to follow PascalCase convention
* refactor(outputParser.js, askGPTPlugins.js): improve code readability and remove unnecessary comments
* feat(GoogleSearch.js): add GoogleSearchAPI tool to allow agents to use the Google Custom Search API
feat(SelfReflection.js): add SelfReflectionTool to allow agents to reflect on their thoughts and actions
feat(StableDiffusion.js): add StableDiffusionAPI tool to allow agents to generate images using stable diffusion webui's api
feat(Wolfram.js): add WolframAlphaAPI tool for computation, math, curated knowledge & real-time data through WolframAlpha.
* testing openai specs
* doc: fix link in .env.example
* package-update
* fix(MultiSelectDropDown.jsx): handle null or undefined values in availableValues array
* refactor(DALL-E.js, StableDiffusion.js): remove 'dist/' from image path
feat(docker-compose.yml): add comments for reverse proxy configuration
* chore(.gitignore): ignore client/public/images/
fix(DALL-E.js, StableDiffusion.js): change image path from dist/ to public/
feat(index.js): add support for serving static files from client/public/ directory
* fix: remove selected tool when uninstalled
* plugin options in progress
* fix: fix issue with uninstalling a plugin that is in use and typescript errors
* feat(gptPlugins): add Preset support for GPT Plugins endpoint
feat(ChatAgent.js): add support for agentOptions object
feat(convoSchema.js): add agentOptions field to conversation schema
feat(defaults.js): add agentOptions object to defaults
feat(presetSchema.js): add agentOptions field to preset schema
feat(askGPTPlugins.js): add support for agentOptions object in request body
feat(EditPresetDialog.jsx): add support for showing/hiding GPT Plugins agent settings
feat(EditPresetDialog.jsx): add support for setting GPT Plugins agent options
fix(EndpointOptionsDialog.jsx): change endpoint name from 'gptPlugins' to 'Plugins'
feat(AgentSettings.jsx): add AgentSettings component for GPT plugins configuration
feat(client): add GPT Plugins settings component and endpoint to Settings component
fix(client): remove unused imports in GoogleOptions component
feat(PluginsOptions): add support for agent settings and refactor code
feat(PluginsOptions): add GPTIcon to show/hide agent settings button
feat(index.ts): export SVG components
feat(GPTIcon.jsx): add className prop to GPTIcon component
feat(GPTIcon.jsx): import cn function from utils
feat(BingIcon.tsx): export BingIcon component
feat(index.ts): export BingIcon component
feat(index.ts): export MessagesSquared component
refactor(cleanupPreset.js): add default values for agentOptions in gptPlugins endpoint
feat(getDefaultConversation.js, handleSubmit.js): add agentOptions object to conversation object for GPT plugins endpoint. Update default temperature value to 0.8. Add chatGptLabel and promptPrefix properties to conversation object.
* fix: set default convo back to null
* refactor(ChatAgent.js, askGPTPlugins.js, AgentSettings.jsx): change variable names for better readability and remove redundant code
* test: add RecoilRoot to layout-test-utils
* refactor(askGPTPlugins.js): remove redundant code and use endpointOption directly
feat(askGPTPlugins.js): add validation for tools in endpointOption before using it
* chore(ChatAgent.js, Settings.jsx): add agentOptions to saveConvo function and adjust Settings component height
The ChatAgent.js file was modified to include the agentOptions object in the saveConvo function. The Settings.jsx file was modified to adjust the height of the component to ensure that all content is visible.
* refactor(ChatAgent.js): extract reverseProxyUrl option to a class property and add support for it
feat(ChatAgent.js): add support for completionMode option in sendApiMessage method
feat(ChatAgent.js): add support for user-provided promptPrefix in buildPrompt method
* feat(plugins): allow preset change mid conversation
* chore: update OPENAI_KEY to OPENAI_API_KEY in .github/playwright.yml and api/.env.example
refactor(chatgpt-client.js): update OPENAI_KEY to OPENAI_API_KEY
feat(langchain): add demo-aiplugin.js and demo-yaml.js, remove test2.js, test3.js, and test4.js
chore: remove unused test files
fix(titleConvo.js): fix typo in environment variable name
fix(askGPTPlugins.js): fix typo in environment variable name
fix(endpoints.js): fix typo in environment variable name
docs: update installation guide to use OPENAI_API_KEY instead of OPENAI_KEY in .env file
* fix(index.test.js): change import of GoogleSearchAPI to use uppercase G in GoogleSearch
* chore(api): bump langchain version
* feat(PluginController.js): authenticate plugins from environment variables if they are set
feat(PluginStoreDialog.tsx): show plugin auth form only if plugin is not authenticated by env var and require authentication
feat(types.ts): add authenticated field to TPlugin type definition
* docs: update google_search.md and add stable_diffusion.md
* Update stable_diffusion.md
* refactor(Wolfram.js): remove newline characters from query before encoding
docs(wolfram.md): add instructions for setting WOLFRAM_APP_ID in api.env to bypass prompt for AppID in plugin
* refactor(Wolfram.js): replace deprecated replaceAll method with replace method
* Update wolfram.md
* fix(askGPTPlugins): error message will reference correct Parent Message
* refactor(chatgpt-client.js, ChatAgent.js): simplify maxContextTokens calculation and add promptPrefix parameter to buildPrompt method
* docs: initial draft of intro to plugins
* Update introduction.md
* Update introduction.md
* Feature: User/Reg cleanup + Install / Upgrade script for langchain (#427)
* test: login tests
* test: finish login tests
* test: initial tests for registration
* test: registration specs
* feature: Init a app config file
- Simplifies the ENV vars too
- Legacy fallbacks for older builds
* refactor(auth): Refactor log in/out controllers
- Moves both login and logout controllers to their own file
* chore(jwt): Throw warning if secret is default
* feature(frontend): Ability to disable registration
* feature(env): Env in the root + version support
ie .env.prod, .env.dev, .env.test
* feature: Upgrade .env script for users
* chore(config): Refactor and remove legacy env refs
* feature(upgrade): Upgrade script for .env changes
* feature: Install script and upgrade script
* bugfix: Uncomment line to remove old .env file
* chore: rename OPENAI_KEY to OPENAI_API_KEY
* chore: Cleanup config changes/bugs
* bugfix: Fix config and node env issues
* bugfix: Config validation logic
* bugfix: Handle unusual env configs gracefully
* bugfix: Revert route changes and fix registration disable calling
* bugfix: Fix env issues in frontend
* bugfix: Fix login
* bugfix: Fix frontend envs
* bugfix: Fix frontend jest tests
* bugfix: Fix upgrade scripts
* bugfix: Allow install in non-tty envs
* bugfix(windows): Use cross-env to set for windows
* bugfix(env): Handle .env being incorrect to begin with for client domain
* chore(merge-conflict): Update to LibreChat
* chore(merge-conflict): Update to package-lock
---------
Co-authored-by: Daniel D Orlando <dan@danorlando.com>
* chore: comment out unused agent options
* Update langchain plugins docs (#461)
* Update: install docs (LibreChat) (#458)
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Update documentation_guidelines.md
* Update introduction.md
add link to readme
* Update stable_diffusion.md
add link back to readme
* Update wolfram.md
add link back to readme
* Update README.md
add Plugins to ToC
* feat(ChatAgent.js): add support for langchainProxy configuration option
Add a new configuration option `langchainProxy` to the ChatAgent class. If the option is set, the `basePath` configuration option of the `ChatOpenAI` instance is set to the base path of `langchainProxy`.
* bugfix(errors): Possible workaround for error flashing (#463)
* Test/user auth system client tests (#462)
* test: login tests
* test: finish login tests
* test: initial tests for registration
* test: registration specs
* chore(api): update langchain dependency to version 0.0.91
* Update introduction.md
* Update introduction.md
* Update introduction.md
* fix: no longer renders html in markdown content
fix: patch XSS vulnerability completely by handling cursor on the frontend without css/html
* fix(Content.jsx): fix cursor logic so it never shows for static messages
* bugfix(langchain): Upgrade script, docker, env and docs (#465)
* bugfix(errors): Remove incorrect manual fix from misunderstanding
* chore(env): Lets not make a .env.prod and use the prod values in the default root .env
- .env.dev will still be created
* chore(upgrade.js): Lets tell the user about .env.dev if we create it
* bugfix(env): Move to full name environments for vite
- .env.prod => .env.production
- .env.dev => .env.development
* chore(env-example): Explain how to get google login working in production
* bugfix(oauth): Minor fix to point isProduction to a correct value
* bugfix: Typo in public
* chore(docs): Update docs to note the changes to .env
* chore(docs): Include note on how to get google auth working in dev and how to disable registration
* bugfix: Fix missing env changes
* bugfix: Fix up docker to work with new env / npm changes
* Update .env.example
Cleanup the env of the palm2 instruction and fix to formating
* chore(docker): Simplify Docker deployments
- Needs work to support dev env/hotreload
* bugfix: Remove volume map for client dir
* chore(env-example): Change instructions to be more user centric
---------
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
* update: install docs (#466)
* Add files via upload
* Update apis-and-tokens.md
* Update apis-and-tokens.md
* Update docker_install.md
* Update linux_install.md
* Rename apis-and-tokens.md to apis_and_tokens.md
* Update docker_install.md
* Update linux_install.md
* Update mac_install.md
* Update linux_install.md
* Update docker_install.md
* Update windows_install.md
* Update apis_and_tokens.md
* Update mac_install.md
* Update linux_install.md
* Update docker_install.md
* Update README.md
* Update README.md : Breaking Changes
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
* Update README.md (#468)
add new API/Token docs to Toc
* docs: guide on how to create your own plugin
* Update make_your_own.md
* Update make_your_own.md
* feat(docker): add build args for frontend variables in Dockerfile
feat(docker-compose): add build args for frontend variables in docker-compose.yml
* Update docker_install.md
* Update docker_install.md
* Update docker_install.md
* Update docker_install.md
* docs: update (#469)
* Update: make_your_own.md
* Update README.md
add `make_your_own.md` to ToC
* Update linux_install.md
* Update mac_install.md
* Update windows_install.md
* Update apis_and_tokens.md
* Update docker_install.md
* Update docker_install.md
* Update linux_install.md
* Update mac_install.md
* Update windows_install.md
* Update apis_and_tokens.md
* Update user_auth_system.md
* Update docker_install.md
clean up of repeated information
* Update docker_install.md
* Update docker_install.md
typo
* fix: fix issue with pluginstore next and prev buttons going out of bounds
* fix: add icon for web browser plugin
* docs(GoogleSearch.js): update description of GoogleSearchAPI class to be more descriptive of its functionality
* feat(ask/handlers.js): add cursor to indicate ongoing progress of a long-running task
fix(Content.jsx): handle null content in the message stream by replacing it with an empty string (with a space so a text space is rendered)
* Update README.md
* Update README.md
* fix: plugin option stacking order
* update: web browser icon (#470)
* Delete web-browser.png
* update: web browser icon
* Update readme (#472)
* Update README.md
Discord badge now displays the number of online users
Project description has been updated to reflect current status
Feature section has been updated to reflect current capabilities
Sponsors section is now located just above the contributors section
Roadmap has been removed as it was outdated.
* Delete roadmap.md
Roadmap has been removed to streamline document maintenance.
* Update README.md
* Update README.md
* Delete CHANGELOG.md
* fix: pluginstore in mobile view getting clipped and not scrolling
* docs(linux_install.md): remove duplicate git clone command
* chore(Dockerfile): comment out nginx-client build stage
docs(README.md): update installation instructions and mention docker-compose changes
docs(features/plugins/introduction.md): bold plugin names and add emphasis to notes
* feat: add superscript and subscript support to markdown rendering
refactor: support markdown citations for BingAI
* refactor: support markdown citations for BingAI
---------
Co-authored-by: David Shin <42793498+dncc89@users.noreply.github.com>
Co-authored-by: Daniel D Orlando <dan@danorlando.com>
Co-authored-by: LaraClara <2524209+ClaraLeigh@users.noreply.github.com>
Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Release: rename project from ChatGPT Clone to LibreChat
Release: rename project from ChatGPT Clone to LibreChat
* Update documentation_guidelines.md
* Improve UI with style changes and add Settings button
- Improved the UI of the `Input` and `Message` components.
- Added a `Settings` button to the `NavLinks` component.
- Introduced a `Settings` component to handle user settings.
- Refactored the `Dialog` component for consistency.
* Revert not needed changes
* Updated style.css to only work for select
* feat: Remove Dark Mode component and add theme selection feature
This commit removes the Dark Mode component from the navigation bar and replaces it with a theme selection dropdown menu in the Settings dialog. The implementation of the theme selection feature includes a function that allows the user to set the theme based on the system, light, or dark mode.
* Add auto theme setting to Settings component.
This commit adds a new state variable to keep track of whether the auto theme is enabled or not. It also registers an event listener to update the theme based on system preference changes. The event listener is removed when the component is unmounted.
* Improve user experience by allowing customized themes
- Create `selectedOption` state to track user-selected theme
- Remove unused `isAutoTheme` state variable
* feat(Nav): Add SVG icon to settings gear
This commit adds an SVG icon to the settings gear in the Navigation component's Settings file. The new SVG icon replaces the previous GearIcon component.
* refactor(ui): Update overlay background color
This commit updates the background color of the overlay in the AlertDialog and Dialog components by changing the classes applied to the elements. The new color is a transition from `bg-black/50 backdrop-blur-sm` to `bg-gray-500/90 dark:bg-gray-800/90`. This change improves the readability of the dialog boxes.
* Refactor ThemeContext to include system theme and fix bug in Settings
The ThemeContext now includes a "system" theme and ClearConvos no longer relies on the "selected option" state to update the theme. The bug is now fixed if the system theme changes.
* Refactor DialogTemplate styles and color scheme
Adjusted the color scheme of the DialogTemplate component to dark mode, updated the background color to gray-900 and removed unnecessary classes.
* Refactor: Change button logic to require confirmation before clearing convos
This commit refactors the code by adding a confirmation dialog to prompt for a user's confirmation before clearing all conversations in the Settings.jsx file. The change ensures the user is aware of the irreversible action before initiating the clearConvos function. Additionally, the commit updates the clear chat button's class name and changes the button's onClick logic to call the confirmClearConvos function instead of directly invoking the clearConvos method.
* Refactor component name to reflect functionality change.
- Changed component name from ClearConvos to Settings to support potential future use cases.
* Refactor conversation clearing functionality in `Settings.jsx`
This commit optimizes the conversation clearing functionality in the `Settings.jsx` component by removing the `confirmClearConvos` function and directly calling the `clearConvos` function on confirmation. This change will simplify the code and improve the user experience.
* Refactor Input component UI styles
Simplify Input component styles by simplifying the gradient background, removing border color styles, and updating button styles.
* feat: Add e2e test for Settings modal
This commit adds an e2e test to verify whether the Settings modal is displayed on the landing page. It uses a headless browser to navigate to the page and interacts with it to verify if the dialog and its components are visible.
* test: Add Navigation and Settings tests
Add Navigation and Settings tests to verify that the navigation bar and Settings button are visible and that the Settings modal displays the expected content. The settings modal verification includes checking whether the modal is visible, if the modal title, tab list, clear conversation button and theme are present, and if the theme option can be selected to change the mode.
* Quick fix
* feat(navbar): Add confirmation before clearing conversations
Adding confirmation modal to prevent accidentally clearing conversations. Before, once you clicked on the "Clear" button it immediately clears all conversations. With this change, if you click on "Clear" the first time, it will change the text to "Confirm Clear" and if you click it again, it will clear all conversations.
* Add click functionality to the navigation bar and improve UI design
The code introduced click functionality to the nav bar and improved the user interface. It also used the new theme select feature to change the theme to dark.
* test: Add test for dark mode theme change
Refactor the test for Navigation suite to check for the 'dark' class in the HTML element when the 'dark' theme is selected in the modal. This ensures that the dark mode theme change works correctly, and improves test coverage.
* Improve navigation test clarity
This commit improves code clarity and adds more detailed test assertions to the navigation suite. New assert statements are added to check whether the modal theme selection changes the theme and that the HTML element receives the 'dark' class. A new function `changeMode` was introduced to avoid code repetition. A short description was added to the commit message to adhere to best practices.
* Improve navigation test clarity
This commit improves code clarity and adds more detailed test assertions to the navigation suite. New assert statements are added to check whether the modal theme selection changes the theme and that the HTML element receives the 'dark' class. A new function `changeMode` was introduced to avoid code repetition. A short description was added to the commit message to adhere to best practices.
* Hotfix
* Removed repetation
* Refactor: Change text-gray-400 to text-white/50 to make tailwind more cleaner
* style: Update CSS classes to improve the conversation UI
- Update Conversation component to improve UX
- Changed styling for group hover effect using shades of gray
- Improved color contrast of the Message component for easy readability
- Replaced class names in buildTree.js with a new class name
- Added a new color theme (gray-1000) in tailwind.config to replace an old background color.
* Refactor EndpointItem, EndpointItems, and NewConversationMenu for better user experience
- The `EndpointItem` component now accepts an `isSelected` prop instead of `onSelect` to better reflect its usage in `EndpointItems` and `NewConversationMenu`.
- `EndpointItems` component now has a `selectedEndpoint` prop to highlight the selected item in the list.
- `NewConversationMenu` now has a gap between the endpoint options to improve user experience.
* Added error messages
* refactor: Improve endpoint menu highlighting and error handling
In the UI, when the user selects an endpoint, the active class is now properly set. In the error handling function, `isJson` is now a private function called by `getError`, which provides better parsing of error messages, and returns more succinct messages upon encountering specific errors. Finally, a new end-to-end test has been added to check if the active class is properly set on selecting an endpoint in the new conversation menu.
* test: Add Conversation and Change Path of Auth JSON
In the Landing spec, test the functionality to create conversations and check that the number of items has increased. In the Popup spec, change the path of the Auth JSON used by the context.
* Fixed logo issues
* Make everything not rounded
* Added time
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
* feat: Add clear button to search bar
This commit introduces a clear button to the SearchBar component using the X icon from Lucide-React. When the user enters a query in the input field, the clear button appears allowing them to easily remove the search term. The clear button is hidden when there is no search term entered.
* Refactor SearchBar component to improve user experience
Changed SearchBar's input field to add padding on the left side and an absolute positioned search icon. Also, added absolute positioned X icon on the right side when there is an input value, ensuring a better user experience.
* Refactor SearchBar component to show Clear Search icon dynamically
This commit makes changes to the SearchBar React component to render the Clear Search X icon only when the input field has a value. A showClearIcon state using useState hook is added and updated every time the input value changes. The useEffect hook is used to handle the case when the user clears the input value. This allows better UX by providing clear intent to the user that the icon is clickable and will clear the search query.
* Improve UX: Add styling to clear button & export button
This commit modifies the NavLinks component to improve user experience by removing a rounded styling to the "Clear conversations" and "Export conversations" buttons. Prior to this change, the buttons had a rounded styling.
* Refactor submit button styling for improved accessibility and readability.
Changed submit button styling for better accessibility and readability, including adjustments to padding and hover effects. The new styles ensure that the button is easily clickable for all users, while also improving its visual appearance.
* hotfix
* Improve UI styling in Conversation component
Changed the background color and hover effect of the conversation link in Conversation component to make it more visually appealing. The previous background color was '#2A2B32' and now it's 'gray-800'. The 'px-4' class has also been changed to 'hover:pr-4' for better readability.
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
* Rename .github/PULL_REQUEST_TEMPLATE/PULL-REQUEST.md to .github/pull_request_template.md
fix: Pull Request Template Location
* documents -> docs
* Update windows_install.md
Fix: Docker hyperlink
* Update linux_install.md
Fix: Layout (step 6)
* Rename docs/contributions/code_of_conduct.md to CODE_OF_CONDUCT.md
fix: Code of Conduct location according to GitHub's Guide
* Update CODE_OF_CONDUCT.md
Update: Contact info
* Update README.md
Update: Code of Conduct hyperlink in TOC
* Update CODE_OF_CONDUCT.md
Update: Link to ReadMe
* Update CONTRIBUTORS.md
update: add new name to the list
* Update and rename docs/contributions/contributor_guidelines.md to CONTRIBUTING.md
fix: change location according to GitHub's standards
* Delete CONTRIBUTORS.md
delete: contributor.md from root (already present in readme)
* Update SECURITY.md
* Update CONTRIBUTING.md
Update discord link to point to rules
* Update README.md
Update discord link to point to rules
* Update README.md
fix: ToC
* feat(NewConversationMenu): add id to the new conversation menu button
refactor(EndpointItem): remove onSelect prop and setTokenDialogOpen state variable
test(messages.spec.js): add e2e test for messaging suite to check if textbox is focused after receiving message
* test(Input): add test id to input field for e2e testing
test(messages.spec.js): add endpoint variable and refactor test to check if textbox is focused after receiving message
* test(messages.spec.js): refactor test to use a variable for message content
Refactored the test to use a variable for message content instead of a hardcoded string.
* fix(PaLM2): input losing focus on message stream ending
* fix(askOpenAI.js): fix typo in variable name from newUserMassageId to newUserMessageId
* feat(chatgpt-browser.js, askBingAI.js, askChatGPTBrowser.js): add onEventMessage callback to browserClient
Add onEventMessage callback to browserClient to handle event messages from the server. In askChatGPTBrowser.js, add a getPartialMessage variable to store the partial message text. In askBingAI.js, fix a typo in the variable name newUserMassageId to newUserMessageId. In askChatGPTBrowser.js, remove the preSendRequest parameter and move the sendMessage call to the onEventMessage callback. In askChatGPTBrowser.js, add a check for null or undefined value of getPartialMessage before appending it to the error message.
* fix(bing): input no longer loses input focus as convoId is persisted from beginning of convo
* refactor(Input): remove unused code and fix input autofocus
feat(package.json): add e2e:test-auth script to test authentication flow with saved storage
* refactor(askGoogle.js): extract saveConvo function call to a separate function
feat(askGoogle.js): add endpoint property to the conversation object
refactor(handleSubmit.js): rename chatGptLabel to modelLabel in useMessageHandler function
* refactor(askGoogle.js): remove unused endpointOption spread operator
* modify tsconfig and set up unit tests
* generate .d.ts files
* setup project dependencies and configuration for unit tests
* Add test setup and layout-test-utils along with first spec
* Add paths back to tsconfig
* remove type=module from package.json
* Add typescript definition for .env
* update package-lock
* fix: tokenizer will count completion tokens correctly, remove global var, will allow unofficial models for alternative endpoints
* refactor(askBingAI.js, Settings.jsx, types.ts, cleanupPreset.js, getDefaultConversation.js, handleSubmit.js): change default toneStyle to 'creative' instead of 'fast' for Bing AI endpoint.
* fix(SiblingSwitch): correctly appears now
style(HoverButtons.jsx): add 'active' class to hover buttons
* chore: cleanup root dir and move extraneous dev related files to documents/dev
* chore: cleanup root dir and move extraneous dev related files to documents/dev
* chore(.gitignore): add auth.json to gitignore
test(landing.spec.js): remove commented out code and add check for landing page title
test(login.spec.js): add test for login page title
feat(package.json): add e2e:auth script to generate auth.json storage file for e2e tests
* test(landing.spec.js): add beforeEach hook to create a new browser context with auth.json storage state
test(landing.spec.js): change test name from 'landing page' to 'Landing title'
fix(package.json): change e2e:auth script to save auth.json in e2e directory
* style(NavLinks.jsx): add 'as="div"' to Menu.Item components
refactor(Nav.jsx): remove unused code and add isMobile function to check if user is on mobile device
* conditionally render menuitem with search
---------
Co-authored-by: stunt_pilot <twitchstuntpilot@gmail.com>
* chore(client): update lucide-react package to version 0.220.0
style(client): change color of MessageHeader component text to gray-500
style(client): change color of nav-close-button to gray-400 and nav-open-button to gray-500
feat(client): add Panel component to replace svg icons in Nav component
* fix: forwardRef errors in Nav Menu
* refactor(SearchBar.jsx): change clearSearch prop destructuring to props destructuring
refactor(SearchBar.jsx): add ref prop to SearchBar component
refactor(getIcon.jsx): remove unused imports
refactor(getIcon.jsx): add nullish coalescing operator to user.name and user.avatar properties
* fix (NavLinks): modals no longer close on nav menu close
* style(ExportModel.jsx): remove unnecessary z-index property from a div element
* style(ExportModel.jsx): remove trailing whitespace in input element
* refactor(Message.jsx): remove unused cancelled variable
fix(Message.jsx): fix error message length exceeding 512 characters
refactor(MenuItem.jsx): remove unused MenuItem component
* Refactor UI styles & configurations
- Modify button styles and their color schemes to create a consistent user experience when interacting with buttons.
- Adjust the design of the search bar to a more user-friendly layout by changing its background color and styling.
- Create a responsive mobile behavior for the navigation bar to hide it behind a menu icon instead of permanently displaying it.
* Update .gitignore to exclude unnecessary files for Meilisearch
Update .gitignore to exclude meilisearch.exe and data.ms/*, which are not necessary for Meilisearch.
* feat: Add getCurrentBreakpoint function to get current breakpoint
This commit adds a getCurrentBreakpoint function to determine the current breakpoint of the viewport. The function uses fullConfig to determine the biggest breakpoint value of the window, and returns the corresponding breakpoint. It also updates the useEffect function to use getCurrentBreakpoint instead of checking if the userAgent matches a mobile regex.
* Update tailwind import path in Nav component
The import path for the tailwind config was updated in the Nav component to match the new project structure. This ensures that the correct Tailwind styles are applied to the component and improves maintainability.
* Add ThemeContext and cn utility function to Nav component
This commit adds the ThemeContext and cn utility function to the Nav component's dependencies with useContext and import respectively. It also modifies a class name with a ternary operator that toggles based on the theme value passed via ThemeContext.
* Update Nav button styles for better visibility
Changed the button styles for the Nav close and open buttons to enhance visibility. The text color for both buttons will now change when hovering to gray and gray-600 respectively.
* Improve message header styles and add transition effects
This commit updates the MessageHeader component styles by adjusting the text color, as well as adding transition effects to enhance the hover experience. The commit also tweaks mobile styles by adding a transition effect to `.nav` when resizing the window to mobile size.
* Refactor the message header component styling for better visual contrast
The message header component was refactored to improve its visual contrast by changing the text color for better readability. The styles of the component were modified to improve hover behavior as well as transition effects. The setSaveAsDialogShow method was shifted to the onClick prop to only execute when the endpoint is not 'chatGPTBrowser'.
* refactor: Update styling of MessageHeader and Nav buttons
The commit message describes changes made to the MessageHeader and Nav components. It summarizes the code changes as a refactor of the CSS styling for the buttons in both components, specifically updating the text and hover colors for the dark and light themes.
* refactor(SearchBar.jsx): extract onChange function to a separate function and add onKeyDown event listener to prevent spacebar from propagating
* refactor(SearchBar.jsx): extract onChange function to a separate function and add onKeyDown event listener to prevent spacebar from propagating
* refactor(SearchBar.jsx): remove unused React import statement
* build/refactor: move lint/prettier packages to project root, install husky, add pre-commit hook
* refactor: reformat files
* build: put full eslintrc back with all rules
* refactor(endpoints.js): remove console.log statement
refactor(index.html): change title to "ChatGPT Clone"
* feat(Chat.jsx): set document title to conversation title or VITE_APP_TITLE or 'Chat' if conversation is null
- Add support for user-provided OpenAI API key by setting OPENAI_KEY to
"user_provided" in .env.example
- Pass oaiApiKey to titleConvo function in titleConvo.js
- Pass oaiApiKey to askClient function in askOpenAI.js
- Modify openAI object in endpoints.js to include userProvide property
based on whether OPENAI_KEY is set to "user_provided" or not.
* Added functionality to allow users to set custom api keys
* Added error handling
* Changed token to apiKey
* Changed apiKey to oaiApiKey
* added azure openai ui
* Removed logging
* Changed configure to Use
* Made checked position more rounded
* Made setting api key optional if it is openai
* Modified error handling
* Add support for insufficient_quota errors
* Fixed faulty error detection
* removed logging
* Release 0.4.5
* Update @waylaidwanderer/node-chatgpt-api to latest version
* Update dockerfiles to use workspaces and ensure packages are @ latest
* Remove package-lock.json files from workspace directories as no longer needed
* refactor(api): remove deprecated text-davinci-002-render-paid model from CHATGPT_MODELS
refactor(api/client): change model comparison to use startsWith() instead of === for GPT-4 models
* Create multilingual_information.md
add a multilingual document with basic information about the project for non-native English speakers
* Update README toc to add multilingual info
add the multilingual info doc to the table of content (under General Information)
* doc: coding conventions and proposal submissions
* make coding_contention.md path relative in contributor guidelines
* fix: remove / from coding conventions link
* revert unintended package-lock.json change
* used default checkmark which is included in project
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
* feat(api): add googleapis package to package.json
feat(api): add reqDemo.js file to make a request to Google Cloud AI Platform API to get a response from a chatbot model.
* feat: add PaLM2 support
* feat(conversationPreset.js): add support for topP and topK for google endpoint
feat(askGoogle.js): add support for topP and topK for google endpoint
feat(ask/index.js): add google endpoint
feat(endpoints.js): add google endpoint
feat(MessageHeader.jsx): add support for modelLabel for google endpoint
feat(PresetItem.jsx): add support for modelLabel for google endpoint
feat(HoverButtons.jsx): add support for google endpoint
feat(createPayload.ts): add google endpoint
feat(types.ts): add google endpoint
feat(store/endpoints.js): add google endpoint
feat(cleanupPreset.js): add support for topP and topK for google endpoint
feat(getDefaultConversation.js): add support for topP and topK for google endpoint
feat(handleSubmit.js): add support for topP and topK for google endpoint
* fix: messages payload
* refactor(GoogleClient.js): set maxContextTokens based on isTextModel value
feat(GoogleClient.js): add delay option to TextStream constructor
feat(getIcon.jsx): add support for google endpoint and PaLM2 model label
* feat: palm frontend changes
* feat(askGoogle.js): set default example to empty input and output
feat(Examples.jsx): add ability to add and remove examples
refactor(Settings.jsx): remove examples from props and setOption function
style(GoogleOptions): remove unnecessary whitespace after Settings2 import
feat(GoogleOptions): add addExample and removeExample functions to manage examples
fix(cleanupPreset): set default example to [{ input: '', output: ''}]
fix(getDefaultConversation): set default example to [{ input: '', output: ''}]
fix(handleSubmit): set default example to [{ input: '', output: ''}]
* style(client): adjust height of settings and examples components to 350px
fix(client): fix path to palm.png image in getIcon.jsx file
* style(EndpointOptionsPopover.jsx, Examples.jsx, Settings.jsx): improve button styles and update input placeholders
* feat (palm): finalize examples on the frontend
* feat(GoogleClient.js): filter out empty examples in options
feat(GoogleClient.js): add support for promptPrefix in buildPayload method
feat(GoogleClient.js): add support for examples in buildPayload method
feat(conversationPreset.js): add maxOutputTokens field to conversation preset schema
feat(presetSchema.js): add examples field to preset schema
feat(askGoogle.js): add support for examples and promptPrefix in endpointOption
feat(EditPresetDialog.jsx): add Examples component for Google endpoint
feat(EditPresetDialog.jsx): add button to show/hide Examples component
feat(EditPresetDialog.jsx): add functionality to add, remove, and edit examples in Examples component
feat(EndpointOptionsDialog.jsx): change endpoint name to PaLM for Google endpoint
feat(Settings.jsx): add maxHeight prop to limit height of Settings component in EditPresetDialog and EndpointOptionsDialog
fix(Settings.jsx): add examples prop to ChatGPTBrowser component
fix(EndpointItem.jsx): add alternate name for google endpoint
fix(MessageHeader.jsx): change title for google endpoint to PaLM
feat(endpoints.js): add google endpoint to endpointsConfig
fix(cleanupPreset.js): add missing comma in examples array
* chore: change endpoint order
* feat(PaLM 2): complete for testing
* fix(PaLM): handle blocked messages
* chore: NPM Workspaces and scripts
- Allows everything to be run in the root directory
* chore:Update package-lock after workspace change
* docs: Minor docs typo fix
- most people run in dev mode, ie vite runs the server, this defaults to that method
* release: 0.4.2
* docs: update changelog and readme for v0.4.2 release
* docs(README.md): add important information about new user system and env variables
* feat: Create structured data logging system with Pino
This commit creates a new feature that enables structured data logging using the Pino logging library. The structured data logging feature allows for more granular and customizable logging, making it easier to analyze and debug issues in the application.
The changes made in this commit include:
- Adding support for structured data logging using the Pino API
- Adding support to redact sensible data from logging output using pino
redact.
- Pino integrate natively with fluentd, logstash, Docker Logging Drivers
and other JSON based system.
* Add pino package to project
* Logging-System: Add support for an array of regex to redact
* Logging-Systems: Add Redact Patterns and Pino Redact Paths + Boolean logics wasn't right.
Co-authored-by: Olivier Contant <ocontant@users.noreply.github.com>
This commit adds support for generating Azure OpenAI API endpoints in the
`chatgpt-client.js` and `titleConvo.js` files. The `genAzureEndpoint` function
in `genAzureEndpoints.js` generates the endpoint URL based on the provided
parameters. The `chatgpt-client.js` and `titleConvo.js` files now use this
function to generate the endpoint URL when the `AZURE_OPENAI_API_KEY` environment
variable is set.
* Update CONTRIBUTORS.md
* Update CHANGELOG.md
v0.4.1 Changelog
v0.4.1 changelog and link
Contributors in the TOC
* Update README.md
add a link to the alternative docs from @DavidDev1334
* Update linux_install.md
Credit @DavidDev1334 for linux install doc
Fixed Error handling, Code duplication and Naming conventions. Contact me for more information at: DavidTheDev#0166
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
feat(api): add support for Azure OpenAI API
- Add Azure OpenAI API environment variables to .env.example
- Modify chatgpt-client.js to use Azure OpenAI API if environment variables are present
- Modify askOpenAI.js to use arrow function syntax
- Modify handlers.js to add console.log statement for partial variable
* chore(docker-compose.yml): update docker-compose file to use local node-api image build instead of docker hub image build
* chore(docker-compose.yml): update docker image version to 0.4.0
* server-side JWT auth implementation
* move oauth routes and strategies, fix bugs
* backend modifications for wiring up the frontend login and reg forms
* Add frontend data services for login and registration
* Add login and registration forms
* Implment auth context, functional client side auth
* protect routes with jwt auth
* finish local strategy (using local storage)
* Start setting up google auth
* disable token refresh, remove old auth middleware
* refactor client, add ApiErrorBoundary context
* disable google and facebook strategies
* fix: fix presets not displaying specific to user
* fix: fix issue with browser refresh
* fix: casing issue with User.js (#11)
* delete user.js to be renamed
* fix: fix casing issue with User.js
* comment out api error watcher temporarily
* fix: issue with api error watcher (#12)
* delete user.js to be renamed
* fix: fix casing issue with User.js
* comment out api error watcher temporarily
* feat: add google auth social login
* fix: make google login url dynamic based on dev/prod
* fix: bug where UI is briefly displayed before redirecting to login
* fix: fix cookie expires value for local auth
* Update README.md
* Update LOCAL_INSTALL structure
* Add local testing instructions
* Only load google strategy if client id and secret are provided
* Update .env.example files with new params
* fix issue with not redirecting to register form
* only show google login button if value is set in .env
* cleanup log messages
* Add label to button for google login on login form
* doc: fix client/server url values in .env.example
* feat: add error message details to registration failure
* Restore preventing paste on confirm password
* auto-login user after registering
* feat: forgot password (#24)
* make login/reg pages look like openai's
* add password reset data services
* new form designs similar to openai, add password reset pages
* add api's for password reset
* email utils for password reset
* remove bcrypt salt rounds from process.env
* refactor: restructure api auth code, consolidate routes (#25)
* add api's for password reset
* remove bcrypt salt rounds from process.env
* refactor: consolidate auth routes, use controller pattern
* refactor: code cleanup
* feat: migrate data to first user (#26)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes after refactor (#27)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: issue with auto-login when logging out then logging in with new browser window (#28)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: Update README and .env.example files with user system information (#29)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: update README and .env.example files
* Fixup: LOCAL_INSTALL.md PS instructions (#200) (#30)
Co-authored-by: alfredo-f <alfredo.fomitchenko@mail.polimi.it>
* feat: send user with completion to protect against abuse (#31)
* Fixup: LOCAL_INSTALL.md PS instructions (#200)
* server-side JWT auth implementation
* move oauth routes and strategies, fix bugs
* backend modifications for wiring up the frontend login and reg forms
* Add frontend data services for login and registration
* Add login and registration forms
* Implment auth context, functional client side auth
* protect routes with jwt auth
* finish local strategy (using local storage)
* Start setting up google auth
* disable token refresh, remove old auth middleware
* refactor client, add ApiErrorBoundary context
* disable google and facebook strategies
* fix: fix presets not displaying specific to user
* fix: fix issue with browser refresh
* fix: casing issue with User.js (#11)
* delete user.js to be renamed
* fix: fix casing issue with User.js
* comment out api error watcher temporarily
* feat: add google auth social login
* fix: make google login url dynamic based on dev/prod
* fix: bug where UI is briefly displayed before redirecting to login
* fix: fix cookie expires value for local auth
* Only load google strategy if client id and secret are provided
* Update .env.example files with new params
* fix issue with not redirecting to register form
* only show google login button if value is set in .env
* cleanup log messages
* Add label to button for google login on login form
* doc: fix client/server url values in .env.example
* feat: add error message details to registration failure
* Restore preventing paste on confirm password
* auto-login user after registering
* feat: forgot password (#24)
* make login/reg pages look like openai's
* add password reset data services
* new form designs similar to openai, add password reset pages
* add api's for password reset
* email utils for password reset
* remove bcrypt salt rounds from process.env
* refactor: restructure api auth code, consolidate routes (#25)
* add api's for password reset
* remove bcrypt salt rounds from process.env
* refactor: consolidate auth routes, use controller pattern
* refactor: code cleanup
* feat: migrate data to first user (#26)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes after refactor (#27)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: issue with auto-login when logging out then logging in with new browser window (#28)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: Update README and .env.example files with user system information (#29)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: update README and .env.example files
* Send user id to openai to protect against abuse
* add meilisearch to gitignore
* Remove webpack
---------
Co-authored-by: alfredo-f <alfredo.fomitchenko@mail.polimi.it>
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Alfredo Fomitchenko <alfredo.fomitchenko@mail.polimi.it>
I continued the work on the standardization of the layout. I also eliminated duplicate key=value pairs to simplify the configuration and reduce the likelihood of errors. I also updated some of the commented instructions and notes throughout the file to keep the instructions clear while making it easier to prevent errors when using a script to parse the key=value pairs.
fix(tokenizer.js): add try-catch block and error handling
style(SetTokenDialog/index.jsx): fix typo in sentence
refactor(data-service.ts): change argument format to match server API
fix(addToCache.js): remove unused variables and parameters
feat(addToCache.js): add message to cache with id, parentMessageId, role, and text
fix(askOpenAI.js): remove parentMessageId parameter from addToCache call
feat(MessageHandler.jsx): add latestMessage to store on cancel of submission, and generate messageId and parentMessageId for latestMessage
fix(api): change arrowParens prettier option to always
fix(api): update addToCache to include endpointOption and latestMessage
fix(api): update askOpenAI to include endpointOption in abortControllers
fix(client): remove abortKey state and add currentParent state to MessageHandler
feat(askOpenAI.js): add abort endpoint to cancel requests
feat(MessageHandler): add abort functionality to cancel requests
feat(submission.js): add lastResponse and source atoms to store
feat(handleSubmit.js): add stopGenerating function to cancel requests
[200~refactor(presets.js): remove unused getPreset function
refactor(presets.js): use arrow function syntax for map callback
refactor(presets.js): add console.log for debugging purposes
refactor(presets.js): simplify map callback syntax
refactor(presets.js): remove commented out code
refactor(FileUpload.jsx): remove commented out code
refactor(NewConversationMenu.jsx): rename data parameter to res for
clarity
refactor(NewConversationMenu.jsx): rename clearPresetsTrigger to
deletePresetsTrigger for clarity
refactor(NewConversationMenu.jsx): add onDeletePreset prop to
PresetItems component
refactor(PresetItem.jsx): add TrashIcon component and onDeletePreset
prop
refactor(PresetItems.jsx): add onDeletePreset prop to PresetItem
component
feat: support OPENAI_REVERSE_PROXY
feat: support set availModels in env file
fix: chatgpt Browser send logic refactor.
fix: title wrong usage of responseMessage
BREAKING: some env paramaters has been changed!
feat(FileUpload.jsx): add support for importing JSON files and fetching presets after import
feat(NewConversationMenu.jsx): add FileUpload component to select and import JSON files
feat(fetchers.js): add handleFileSelected function to handle importing JSON files and uploading presets to the server
feat(conversationPreset.js): add context and systemMessage fields to conversation preset schema
feat(askBingAI.js): pass context and systemMessage parameters to ask function
feat(Settings.jsx): add toneStyle prop to BingAISettings component
feat(BingAIOptions/index.jsx): add useEffect to check if advanced mode is needed
feat(cleanupPreset.js): add context and systemMessage fields to cleaned up preset object
feat(getDefaultConversation.js): add context and systemMessage fields to default conversation object
feat(handleSubmit.js): add context and systemMessage fields to message object
feat(BingAI): convert toneStyle to lowercase before setting it in state
feat(BingAI): pass setToneStyle function to Settings component
refactor(BingAI): remove unused import and change setOption to setToneStyle in Settings component
refactor(fetchers.js): add axiosPost function for debounced axios post requests
feat(api): add @dqbd/tiktoken package as a dependency
feat(api): add /api/tokenizer endpoint to tokenize text using @dqbd/tiktoken
feat(client): add toneStyle dropdown to BingAI Settings component
feat(client): add token count to BingAI Settings component
style(ui): add z-index to Dropdown and EndpointOptionsPopover components
Add z-index to Dropdown and EndpointOptionsPopover components to ensure they are displayed above other components.
This commit adds support for multiple GPT models in the chatGPT-browser
client. The available models are now stored in a Map object, which maps
the model label to its corresponding model.
The commit adds a new component, ChatGPTOptions, to the client
UI to allow the user to select the GPT model to use in the chat. The
component is only displayed when the chatGPT-browser endpoint is
selected.
refactor(Dockerfile): change port number from 3080 to 80
refactor(Dockerfile): remove unnecessary EXPOSE command
refactor(package.json): remove devDependencies for Vite and React plugin
# Set to determine which user info property returned from OpenID Provider to store as the User's username
OPENID_USERNAME_CLAIM=
# Set to determine which user info property returned from OpenID Provider to store as the User's name
OPENID_NAME_CLAIM=
# Optional audience parameter for OpenID authorization requests
OPENID_AUDIENCE=
OPENID_BUTTON_LABEL=
OPENID_IMAGE_URL=
# Set to true to automatically redirect to the OpenID provider when a user visits the login page
# This will bypass the login form completely for users, only use this if OpenID is your only authentication method
OPENID_AUTO_REDIRECT=false
# Set to true to use PKCE (Proof Key for Code Exchange) for OpenID authentication
OPENID_USE_PKCE=false
#Set to true to reuse openid tokens for authentication management instead of using the mongodb session and the custom refresh token.
OPENID_REUSE_TOKENS=
#By default, signing key verification results are cached in order to prevent excessive HTTP requests to the JWKS endpoint.
#If a signing key matching the kid is found, this will be cached and the next time this kid is requested the signing key will be served from the cache.
#Default is true.
OPENID_JWKS_URL_CACHE_ENABLED=
OPENID_JWKS_URL_CACHE_TIME= # 600000 ms eq to 10 minutes leave empty to disable caching
#Set to true to trigger token exchange flow to acquire access token for the userinfo endpoint.
OPENID_ON_BEHALF_FLOW_FOR_USERINFO_REQUIRED=
OPENID_ON_BEHALF_FLOW_USERINFO_SCOPE="user.read" # example for Scope Needed for Microsoft Graph API
# Set to true to use the OpenID Connect end session endpoint for logout
OPENID_USE_END_SESSION_ENDPOINT=
#========================#
# SharePoint Integration #
#========================#
# Requires Entra ID (OpenID) authentication to be configured
# Enable SharePoint file picker in chat and agent panels
# ENABLE_SHAREPOINT_FILEPICKER=true
# SharePoint tenant base URL (e.g., https://yourtenant.sharepoint.com)
# Redis with TLS/SSL encryption and CA certificate
# REDIS_URI=rediss://127.0.0.1:6380
# REDIS_CA=/path/to/ca-cert.pem
# Elasticache may need to use an alternate dnsLookup for TLS connections. see "Special Note: Aws Elasticache Clusters with TLS" on this webpage: https://www.npmjs.com/package/ioredis
# Enable alternative dnsLookup for redis
# REDIS_USE_ALTERNATIVE_DNS_LOOKUP=true
# Redis authentication (if required)
# REDIS_USERNAME=your_redis_username
# REDIS_PASSWORD=your_redis_password
# Redis key prefix configuration
# Use environment variable name for dynamic prefix (recommended for cloud deployments)
Thank you to all the contributors who have helped make this project possible! We welcome various types of contributions, such as bug reports, documentation improvements, feature requests, and code contributions.
## Contributing Guidelines
If the feature you would like to contribute has not already received prior approval from the project maintainers (i.e., the feature is currently on the [roadmap](https://github.com/users/danny-avila/projects/2)), please submit a request in the [Feature Requests & Suggestions category](https://github.com/danny-avila/LibreChat/discussions/new?category=feature-requests-suggestions) of the discussions board before beginning work on it. The requests should include specific implementation details, including areas of the application that will be affected by the change (including designs if applicable), and any other relevant information that might be required for a speedy review. However, proposals are not required for small changes, bug fixes, or documentation improvements. Small changes and bug fixes should be tied to an [issue](https://github.com/danny-avila/LibreChat/issues) and included in the corresponding pull request for tracking purposes.
Please note that a pull request involving a feature that has not been reviewed and approved by the project maintainers may be rejected. We appreciate your understanding and cooperation.
If you would like to discuss the changes you wish to make, join our [Discord community](https://discord.librechat.ai), where you can engage with other contributors and seek guidance from the community.
## Our Standards
We strive to maintain a positive and inclusive environment within our project community. We expect all contributors to adhere to the following standards:
- Using welcoming and inclusive language.
- Being respectful of differing viewpoints and experiences.
- Gracefully accepting constructive criticism.
- Focusing on what is best for the community.
- Showing empathy towards other community members.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with these standards.
## To contribute to this project, please adhere to the following guidelines:
## 1. Development Setup
1. Use Node.JS 20.x.
2. Install typescript globally: `npm i -g typescript`.
3. Run `npm ci` to install dependencies.
4. Build the data provider: `npm run build:data-provider`.
5. Build data schemas: `npm run build:data-schemas`.
- Install [MongoDB Community Edition](https://www.mongodb.com/docs/manual/administration/install-community/), ensure that `mongosh` connects to your local instance.
- Run: `npx install playwright`, then `npx playwright install`.
1. Before starting work, make sure your main branch has the latest commits with `npm run update`.
3. Run linting command to find errors: `npm run lint`. Alternatively, ensure husky pre-commit checks are functioning.
3. After your changes, reinstall packages in your current branch using `npm run reinstall` and ensure everything still works.
- Restart the ESLint server ("ESLint: Restart ESLint Server" in VS Code command bar) and your IDE after reinstalling or updating.
4. Clear web app localStorage and cookies before and after changes.
5. For frontend changes, compile typescript before and after changes to check for introduced errors: `cd client && npm run build`.
6. Run backend unit tests: `npm run test:api`.
7. Run frontend unit tests: `npm run test:client`.
8. Run integration tests: `npm run e2e`.
## 3. Git Workflow
We utilize a GitFlow workflow to manage changes to this project's codebase. Follow these general steps when contributing code:
1. Fork the repository and create a new branch with a descriptive slash-based name (e.g., `new/feature/x`).
2. Implement your changes and ensure that all tests pass.
3. Commit your changes using conventional commit messages with GitFlow flags. Begin the commit message with a tag indicating the change type, such as "feat" (new feature), "fix" (bug fix), "docs" (documentation), or "refactor" (code refactoring), followed by a brief summary of the changes (e.g., `feat: Add new feature X to the project`).
4. Submit a pull request with a clear and concise description of your changes and the reasons behind them.
5. We will review your pull request, provide feedback as needed, and eventually merge the approved changes into the main branch.
## 4. Commit Message Format
We follow the [semantic format](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) for commit messages.
### Example
```
feat: add hat wobble
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
```
### Commit Guidelines
- Do your best to reduce the number of commits, organizing them as much possible. Look into [squashing commits](https://www.freecodecamp.org/news/git-squash-commits/) in order to keep a neat history.
- For those that care about maximizing commits for stats, adhere to the above as I 'squash and merge' an unorganized and/or unformatted commit history, which reduces the number of your commits to 1,:
```
* Update Br.tsx
* Update Es.tsx
* Update Br.tsx
```
## 5. Pull Request Process
When submitting a pull request, please follow these guidelines:
- Ensure that any installation or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes to the interface, including new environment variables, exposed ports, useful file locations, and container parameters.
- Increase the version numbers in any example files and the README.md to reflect the new version that the pull request represents. We use [SemVer](http://semver.org/) for versioning.
Ensure that your changes meet the following criteria:
- All tests pass as highlighted [above](#1-development-notes).
- The code is well-formatted and adheres to our coding standards.
- The commit history is clean and easy to follow. You can use `git rebase` or `git merge --squash` to clean your commit history before submitting the pull request.
- The pull request description clearly outlines the changes and the reasons behind them. Be sure to include the steps to test the pull request.
## 6. Naming Conventions
Apply the following naming conventions to branches, labels, and other Git-related entities:
- **Branch names:** Descriptive and slash-based (e.g., `new/feature/x`).
- **Labels:** Descriptive and kebab case (e.g., `bug-fix`).
- **JS/TS:** Directories and file names: Descriptive and camelCase. First letter uppercased for React files (e.g., `helperFunction.ts, ReactComponent.tsx`).
- **Docs:** Directories and file names: Descriptive and snake_case (e.g., `config_files.md`).
## 7. TypeScript Conversion
1. **Original State**: The project was initially developed entirely in JavaScript (JS).
2. **Frontend Transition**:
- We are in the process of transitioning the frontend from JS to TypeScript (TS).
- The transition is nearing completion.
- This conversion is feasible due to React's capability to intermix JS and TS prior to code compilation. It's standard practice to compile/bundle the code in such scenarios.
3. **Backend Considerations**:
- Transitioning the backend to TypeScript would be a more intricate process, especially for an established Express.js server.
- **Options for Transition**:
- **Single Phase Overhaul**: This involves converting the entire backend to TypeScript in one go. It's the most straightforward approach but can be disruptive, especially for larger codebases.
- **Incremental Transition**: Convert parts of the backend progressively. This can be done by:
- Maintaining a separate directory for TypeScript files.
- Gradually migrating and testing individual modules or routes.
- Using a build tool like `tsc` to compile TypeScript files independently until the entire transition is complete.
- **Compilation Considerations**:
- Introducing a compilation step for the server is an option. This would involve using tools like `ts-node` for development and `tsc` for production builds.
- However, this is not a conventional approach for Express.js servers and could introduce added complexity, especially in terms of build and deployment processes.
- **Current Stance**: At present, this backend transition is of lower priority and might not be pursued.
## 8. Module Import Conventions
- `npm` packages first,
- from longest line (top) to shortest (bottom)
- Followed by typescript types (pertains to data-provider and client workspaces)
- longest line (top) to shortest (bottom)
- types from package come first
- Lastly, local imports
- longest line (top) to shortest (bottom)
- imports with alias `~` treated the same as relative import with respect to line length
**Note:** ESLint will automatically enforce these import conventions when you run `npm run lint --fix` or through pre-commit hooks.
---
Please ensure that you adapt this summary to fit the specific context and nuances of your project.
Thanks for taking the time to fill out this bug report!
Before submitting, please:
- Search existing [Issues and Discussions](https://github.com/danny-avila/LibreChat/discussions) to see if your bug has already been reported
- Use [Discussions](https://github.com/danny-avila/LibreChat/discussions) instead of Issues for:
- General inquiries
- Help with setup
- Questions about whether you're experiencing a bug
- type:textarea
id:what-happened
attributes:
label:What happened?
description:Also tell us, what did you expect to happen?
placeholder:Please give as many details as possible
validations:
required:true
- type:textarea
id:version-info
attributes:
label:Version Information
description:|
If using Docker, please run and provide the output of:
```bash
docker images | grep librechat
```
If running from source, please run and provide the output of:
```bash
git rev-parse HEAD
```
placeholder:Paste the output here
validations:
required:true
- type:textarea
id:steps-to-reproduce
attributes:
label:Steps to Reproduce
description:Please list the steps needed to reproduce the issue.
placeholder:"1. Step 1\n2. Step 2\n3. Step 3"
validations:
required:true
- type:dropdown
id:browsers
attributes:
label:What browsers are you seeing the problem on?
multiple:true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Mobile (iOS)
- Mobile (Android)
- type:textarea
id:logs
attributes:
label:Relevant log output
description:|
Please paste relevant logs that were created when reproducing the error.
Log locations:
- Docker:Project root directory ./logs
- npm:./api/logs
There are two types of logs that can help diagnose the issue:
- debug logs (debug-YYYY-MM-DD.log)
- error logs (error-YYYY-MM-DD.log)
Error logs contain exact stack traces and are especially helpful, but both can provide valuable information.
Please only include the relevant portions of logs that correspond to when you reproduced the error.
For UI-related issues, browser console logs can be very helpful. You can provide these as screenshots or paste the text here.
render:shell
validations:
required:true
- type:textarea
id:screenshots
attributes:
label:Screenshots
description:If applicable, add screenshots to help explain your problem. You can drag and drop, paste images directly here or link to them.
- type:checkboxes
id:terms
attributes:
label:Code of Conduct
description:By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label:I agree to follow this project's Code of Conduct
description:Please provide as many details as possible.
placeholder:Please provide as many details as possible.
validations:
required:true
- type:textarea
id:details
attributes:
label:More details
description:Please provide additional details if needed.
placeholder:Please provide additional details if needed.
validations:
required:true
- type:dropdown
id:subject
attributes:
label:Which components are impacted by your request?
multiple:true
options:
- General
- UI
- Endpoints
- Plugins
- Other
- type:textarea
id:screenshots
attributes:
label:Pictures
description:If relevant, please include images to help clarify your request. You can drag and drop images directly here, paste them, or provide a link to them.
- type:checkboxes
id:terms
attributes:
label:Code of Conduct
description:By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label:I agree to follow this project's Code of Conduct
description:Request to add a new language for LibreChat translations.
title:"New Language Request: "
labels:["✨ enhancement","🌍 i18n"]
body:
- type:markdown
attributes:
value:|
Thank you for taking the time to submit a new language request! Please fill out the following details so we can review your request.
- type:input
id:language_name
attributes:
label:Language Name
description:Please provide the full name of the language (e.g., Spanish, Mandarin).
placeholder:e.g., Spanish
validations:
required:true
- type:input
id:iso_code
attributes:
label:ISO 639-1 Code
description:Please provide the ISO 639-1 code for the language (e.g., es for Spanish). You can refer to [this list](https://www.w3schools.com/tags/ref_language_codes.asp) for valid codes.
placeholder:e.g., es
validations:
required:true
- type:checkboxes
id:terms
attributes:
label:Code of Conduct
description:By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md).
options:
- label:I agree to follow this project's Code of Conduct
At LibreChat, we prioritize the security of our project and value the contributions of security researchers in helping us improve the security of our codebase. If you discover a security vulnerability within our project, we appreciate your responsible disclosure. Please follow the guidelines below to report any vulnerabilities to us:
**Note: Only report sensitive vulnerability details via the appropriate private communication channels mentioned below. Public channels, such as GitHub issues and Discord, should be used for initiating contact and establishing private communication channels.**
## Communication Channels
When reporting a security vulnerability, you have the following options to reach out to us:
- **Option 1: GitHub Security Advisory System**: We encourage you to use GitHub's Security Advisory system to report any security vulnerabilities you find. This allows us to receive vulnerability reports directly through GitHub. For more information on how to submit a security advisory report, please refer to the [GitHub Security Advisories documentation](https://docs.github.com/en/code-security/getting-started-with-security-vulnerability-alerts/about-github-security-advisories).
- **Option 2: GitHub Issues**: You can initiate first contact via GitHub Issues. However, please note that initial contact through GitHub Issues should not include any sensitive details.
- **Option 3: Discord Server**: You can join our [Discord community](https://discord.librechat.ai) and initiate first contact in the `#issues` channel. However, please ensure that initial contact through Discord does not include any sensitive details.
_After the initial contact, we will establish a private communication channel for further discussion._
### When submitting a vulnerability report, please provide us with the following information:
- A clear description of the vulnerability, including steps to reproduce it.
- The version(s) of the project affected by the vulnerability.
- Any additional information that may be useful for understanding and addressing the issue.
We strive to acknowledge vulnerability reports within 72 hours and will keep you informed of the progress towards resolution.
## Security Updates and Patching
We are committed to maintaining the security of our open-source project, LibreChat, and promptly addressing any identified vulnerabilities. To ensure the security of our project, we adhere to the following practices:
- We prioritize security updates for the current major release of our software.
- We actively monitor the GitHub Security Advisory system and the `#issues` channel on Discord for any vulnerability reports.
- We promptly review and validate reported vulnerabilities and take appropriate actions to address them.
- We release security patches and updates in a timely manner to mitigate any identified vulnerabilities.
Please note that as a security-conscious community, we may not always disclose detailed information about security issues until we have determined that doing so would not put our users or the project at risk. We appreciate your understanding and cooperation in these matters.
## Scope
This security policy applies to the following GitHub repository:
If you have any questions or concerns regarding the security of our project, please join our [Discord community](https://discord.librechat.ai) and report them in the appropriate channel. You can also reach out to us by [opening an issue](https://github.com/danny-avila/LibreChat/issues/new) on GitHub. Please note that the response time may vary depending on the nature and severity of the inquiry.
## Acknowledgments
We would like to express our gratitude to the security researchers and community members who help us improve the security of our project. Your contributions are invaluable, and we sincerely appreciate your efforts.
## Bug Bounty Program
We currently do not have a bug bounty program in place. However, we welcome and appreciate any
security-related contributions through pull requests (PRs) that address vulnerabilities in our codebase. We believe in the power of collaboration to improve the security of our project and invite you to join us in making it more robust.
"template":"## [#{{TO_TAG}}] - #{{TO_TAG_DATE}}\n\nChanges from #{{FROM_TAG}} to #{{TO_TAG}}.\n\n#{{CHANGELOG}}\n\n[See full release details][release-#{{TO_TAG}}]\n\n[release-#{{TO_TAG}}]: https://github.com/#{{OWNER}}/#{{REPO}}/releases/tag/#{{TO_TAG}}\n\n---",
"pr_template":"- #{{TITLE}} by **@#{{AUTHOR}}** in [##{{NUMBER}}](#{{URL}})",
- Please ensure that you have thoroughly read and understood the [Contributing Docs](https://github.com/danny-avila/LibreChat/blob/main/.github/CONTRIBUTING.md) before submitting your Pull Request.
⚠️ Documentation Updates Notice:
- Kindly note that documentation updates are managed in this repository: [librechat.ai](https://github.com/LibreChat-AI/librechat.ai)
## Summary
Please provide a brief summary of your changes and the related issue. Include any motivation and context that is relevant to your changes. If there are any dependencies necessary for your changes, please list them here.
## Change Type
Please delete any irrelevant options.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Translation update
## Testing
Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.
### **Test Configuration**:
## Checklist
Please delete any irrelevant options.
- [ ] My code adheres to this project's style guidelines
- [ ] I have performed a self-review of my own code
- [ ] I have commented in any complex areas of my code
- [ ] I have made pertinent documentation changes
- [ ] My changes do not introduce new warnings
- [ ] I have written tests demonstrating that my changes are effective or that my feature works
- [ ] Local unit tests pass with my changes
- [ ] Any changes dependent on mine have been merged and published in downstream modules.
- [ ] A pull request for updating the documentation has been submitted.
# When triggered by repository_dispatch, skip sync step.
- name:Skip sync step on non-push events
if:${{ github.event_name != 'push' }}
run:echo "Skipping sync as the event is not a push."
create-pull-request:
name:Create Translation PR on Version Published
runs-on:ubuntu-latest
needs:sync-translations
permissions:
contents:write
pull-requests:write
steps:
# 1. Check out the repository.
- name:Checkout Repository
uses:actions/checkout@v4
# 2. Download translation files from locize.
- name:Download Translations from locize
uses:locize/download@v2
with:
project-id:${{ secrets.LOCIZE_PROJECT_ID }}
path:"client/src/locales"
# 3. Create a Pull Request using built-in functionality.
- name:Create Pull Request
uses:peter-evans/create-pull-request@v7
with:
token:${{ secrets.GITHUB_TOKEN }}
sign-commits:true
commit-message:"🌍 i18n: Update translation.json with latest translations"
base:main
branch:i18n/locize-translation-update
reviewers:danny-avila
title:"🌍 i18n: Update translation.json with latest translations"
body:|
**Description**:
- 🎯 **Objective**:Update `translation.json` with the latest translations from locize.
- 🔍 **Details**:This PR is automatically generated upon receiving a versionPublished event with version "latest". It reflects the newest translations provided by locize.
All notable changes to this project will be documented in this file.
## [Unreleased]
### ✨ New Features
- ✨ feat: implement search parameter updates by **@mawburn** in [#7151](https://github.com/danny-avila/LibreChat/pull/7151)
- 🎏 feat: Add MCP support for Streamable HTTP Transport by **@benverhees** in [#7353](https://github.com/danny-avila/LibreChat/pull/7353)
- 🔒 feat: Add Content Security Policy using Helmet middleware by **@rubentalstra** in [#7377](https://github.com/danny-avila/LibreChat/pull/7377)
- ✨ feat: Add Normalization for MCP Server Names by **@danny-avila** in [#7421](https://github.com/danny-avila/LibreChat/pull/7421)
- 📊 feat: Improve Helm Chart by **@hofq** in [#3638](https://github.com/danny-avila/LibreChat/pull/3638)
- 🦾 feat: Claude-4 Support by **@danny-avila** in [#7509](https://github.com/danny-avila/LibreChat/pull/7509)
- 🪨 feat: Bedrock Support for Claude-4 Reasoning by **@danny-avila** in [#7517](https://github.com/danny-avila/LibreChat/pull/7517)
### 🌍 Internationalization
- 🌍 i18n: Add `Danish` and `Czech` and `Catalan` localization support by **@rubentalstra** in [#7373](https://github.com/danny-avila/LibreChat/pull/7373)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#7375](https://github.com/danny-avila/LibreChat/pull/7375)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#7468](https://github.com/danny-avila/LibreChat/pull/7468)
### 🔧 Fixes
- 💬 fix: update aria-label for accessibility in ConvoLink component by **@berry-13** in [#7320](https://github.com/danny-avila/LibreChat/pull/7320)
- 🔑 fix: use `apiKey` instead of `openAIApiKey` in OpenAI-like Config by **@danny-avila** in [#7337](https://github.com/danny-avila/LibreChat/pull/7337)
- 🔄 fix: update navigation logic in `useFocusChatEffect` to ensure correct search parameters are used by **@mawburn** in [#7340](https://github.com/danny-avila/LibreChat/pull/7340)
- 🔄 fix: Improve MCP Connection Cleanup by **@danny-avila** in [#7400](https://github.com/danny-avila/LibreChat/pull/7400)
- 🛡️ fix: Preset and Validation Logic for URL Query Params by **@danny-avila** in [#7407](https://github.com/danny-avila/LibreChat/pull/7407)
- 🌘 fix: artifact of preview text is illegible in dark mode by **@nhtruong** in [#7405](https://github.com/danny-avila/LibreChat/pull/7405)
- 🛡️ fix: Temporarily Remove CSP until Configurable by **@danny-avila** in [#7419](https://github.com/danny-avila/LibreChat/pull/7419)
- 💽 fix: Exclude index page `/` from static cache settings by **@sbruel** in [#7382](https://github.com/danny-avila/LibreChat/pull/7382)
### ⚙️ Other Changes
- 📜 docs: CHANGELOG for release v0.7.8 by **@github-actions[bot]** in [#7290](https://github.com/danny-avila/LibreChat/pull/7290)
- 📦 chore: Update API Package Dependencies by **@danny-avila** in [#7359](https://github.com/danny-avila/LibreChat/pull/7359)
- 📜 docs: Unreleased Changelog by **@github-actions[bot]** in [#7321](https://github.com/danny-avila/LibreChat/pull/7321)
- 📜 docs: Unreleased Changelog by **@github-actions[bot]** in [#7434](https://github.com/danny-avila/LibreChat/pull/7434)
- 🛡️ chore: `multer` v2.0.0 for CVE-2025-47935 and CVE-2025-47944 by **@danny-avila** in [#7454](https://github.com/danny-avila/LibreChat/pull/7454)
- 📂 refactor: Improve `FileAttachment`& File Form Deletion by **@danny-avila** in [#7471](https://github.com/danny-avila/LibreChat/pull/7471)
- 📊 chore: Remove Old Helm Chart by **@hofq** in [#7512](https://github.com/danny-avila/LibreChat/pull/7512)
- 🪖 chore: bump helm app version to v0.7.8 by **@austin-barrington** in [#7524](https://github.com/danny-avila/LibreChat/pull/7524)
---
## [v0.7.8] -
Changes from v0.7.8-rc1 to v0.7.8.
### ✨ New Features
- ✨ feat: Enhance form submission for touch screens by **@berry-13** in [#7198](https://github.com/danny-avila/LibreChat/pull/7198)
- 🔍 feat: Additional Tavily API Tool Parameters by **@glowforge-opensource** in [#7232](https://github.com/danny-avila/LibreChat/pull/7232)
- 🐋 feat: Add python to Dockerfile for increased MCP compatibility by **@technicalpickles** in [#7270](https://github.com/danny-avila/LibreChat/pull/7270)
### 🔧 Fixes
- 🔧 fix: Google Gemma Support & OpenAI Reasoning Instructions by **@danny-avila** in [#7196](https://github.com/danny-avila/LibreChat/pull/7196)
- 🛠️ fix: Conversation Navigation State by **@danny-avila** in [#7210](https://github.com/danny-avila/LibreChat/pull/7210)
- 🔄 fix: o-Series Model Regex for System Messages by **@danny-avila** in [#7245](https://github.com/danny-avila/LibreChat/pull/7245)
- 🔖 fix: Custom Headers for Initial MCP SSE Connection by **@danny-avila** in [#7246](https://github.com/danny-avila/LibreChat/pull/7246)
- 🛡️ fix: Deep Clone `MCPOptions` for User MCP Connections by **@danny-avila** in [#7247](https://github.com/danny-avila/LibreChat/pull/7247)
- 🔄 fix: URL Param Race Condition and File Draft Persistence by **@danny-avila** in [#7257](https://github.com/danny-avila/LibreChat/pull/7257)
- 🔄 fix: Assistants Endpoint & Minor Issues by **@danny-avila** in [#7274](https://github.com/danny-avila/LibreChat/pull/7274)
- 🔄 fix: Ollama Think Tag Edge Case with Tools by **@danny-avila** in [#7275](https://github.com/danny-avila/LibreChat/pull/7275)
### ⚙️ Other Changes
- 📜 docs: CHANGELOG for release v0.7.8-rc1 by **@github-actions[bot]** in [#7153](https://github.com/danny-avila/LibreChat/pull/7153)
- 🔄 refactor: Artifact Visibility Management by **@danny-avila** in [#7181](https://github.com/danny-avila/LibreChat/pull/7181)
- 📦 chore: Bump Package Security by **@danny-avila** in [#7183](https://github.com/danny-avila/LibreChat/pull/7183)
- 🌿 refactor: Unmount Fork Popover on Hide for Better Performance by **@danny-avila** in [#7189](https://github.com/danny-avila/LibreChat/pull/7189)
- 🧰 chore: ESLint configuration to enforce Prettier formatting rules by **@mawburn** in [#7186](https://github.com/danny-avila/LibreChat/pull/7186)
- 🎨 style: Improve KaTeX Rendering for LaTeX Equations by **@andresgit** in [#7223](https://github.com/danny-avila/LibreChat/pull/7223)
- 📝 docs: Update `.env.example` Google models by **@marlonka** in [#7254](https://github.com/danny-avila/LibreChat/pull/7254)
- 💬 refactor: MCP Chat Visibility Option, Google Rates, Remove OpenAPI Plugins by **@danny-avila** in [#7286](https://github.com/danny-avila/LibreChat/pull/7286)
- 📜 docs: Unreleased Changelog by **@github-actions[bot]** in [#7214](https://github.com/danny-avila/LibreChat/pull/7214)
- 🔍 feat: Mistral OCR API / Upload Files as Text by **@danny-avila** in [#6274](https://github.com/danny-avila/LibreChat/pull/6274)
- 🤖 feat: Support OpenAI Web Search models by **@danny-avila** in [#6313](https://github.com/danny-avila/LibreChat/pull/6313)
- 🔗 feat: Agent Chain (Mixture-of-Agents) by **@danny-avila** in [#6374](https://github.com/danny-avila/LibreChat/pull/6374)
- ⌛ feat: `initTimeout` for Slow Starting MCP Servers by **@perweij** in [#6383](https://github.com/danny-avila/LibreChat/pull/6383)
- 🚀 feat: `S3` Integration for File handling and Image uploads by **@rubentalstra** in [#6142](https://github.com/danny-avila/LibreChat/pull/6142)
- 🔒feat: Enable OpenID Auto-Redirect by **@leondape** in [#6066](https://github.com/danny-avila/LibreChat/pull/6066)
- 🚀 feat: Integrate `Azure Blob Storage` for file handling and image uploads by **@rubentalstra** in [#6153](https://github.com/danny-avila/LibreChat/pull/6153)
- 🚀 feat: Add support for custom `AWS` endpoint in `S3` by **@rubentalstra** in [#6431](https://github.com/danny-avila/LibreChat/pull/6431)
- 🚀 feat: Add support for LDAP STARTTLS in LDAP authentication by **@rubentalstra** in [#6438](https://github.com/danny-avila/LibreChat/pull/6438)
- 🚀 feat: Refactor schema exports and update package version to 0.0.4 by **@rubentalstra** in [#6455](https://github.com/danny-avila/LibreChat/pull/6455)
- 🔼 feat: Add Auto Submit For URL Query Params by **@mjaverto** in [#6440](https://github.com/danny-avila/LibreChat/pull/6440)
- 🛠 feat: Enhance Redis Integration, Rate Limiters & Log Headers by **@danny-avila** in [#6462](https://github.com/danny-avila/LibreChat/pull/6462)
- 💵 feat: Add Automatic Balance Refill by **@rubentalstra** in [#6452](https://github.com/danny-avila/LibreChat/pull/6452)
- 🗣️ feat: add support for gpt-4o-transcribe models by **@berry-13** in [#6483](https://github.com/danny-avila/LibreChat/pull/6483)
- 🎨 feat: UI Refresh for Enhanced UX by **@berry-13** in [#6346](https://github.com/danny-avila/LibreChat/pull/6346)
- 🌍 feat: Add support for Hungarian language localization by **@rubentalstra** in [#6508](https://github.com/danny-avila/LibreChat/pull/6508)
- 🚀 feat: Add Gemini 2.5 Token/Context Values, Increase Max Possible Output to 64k by **@danny-avila** in [#6563](https://github.com/danny-avila/LibreChat/pull/6563)
- 🚀 feat: Enhance MCP Connections For Multi-User Support by **@danny-avila** in [#6610](https://github.com/danny-avila/LibreChat/pull/6610)
- 🚀 feat: Enhance S3 URL Expiry with Refresh; fix: S3 File Deletion by **@danny-avila** in [#6647](https://github.com/danny-avila/LibreChat/pull/6647)
- 🚀 feat: enhance UI components and refactor settings by **@berry-13** in [#6625](https://github.com/danny-avila/LibreChat/pull/6625)
- 💬 feat: move TemporaryChat to the Header by **@berry-13** in [#6646](https://github.com/danny-avila/LibreChat/pull/6646)
- 🚀 feat: Use Model Specs + Specific Endpoints, Limit Providers for Agents by **@danny-avila** in [#6650](https://github.com/danny-avila/LibreChat/pull/6650)
- 🪙 feat: Sync Balance Config on Login by **@danny-avila** in [#6671](https://github.com/danny-avila/LibreChat/pull/6671)
- 🔦 feat: MCP Support for Non-Agent Endpoints by **@danny-avila** in [#6775](https://github.com/danny-avila/LibreChat/pull/6775)
- 🗃️ feat: Code Interpreter File Persistence between Sessions by **@danny-avila** in [#6790](https://github.com/danny-avila/LibreChat/pull/6790)
- 🖥️ feat: Code Interpreter API for Non-Agent Endpoints by **@danny-avila** in [#6803](https://github.com/danny-avila/LibreChat/pull/6803)
- ⚡ feat: Self-hosted Artifacts Static Bundler URL by **@danny-avila** in [#6827](https://github.com/danny-avila/LibreChat/pull/6827)
- 🐳 feat: Add Jemalloc and UV to Docker Builds by **@danny-avila** in [#6836](https://github.com/danny-avila/LibreChat/pull/6836)
- 🤖 feat: GPT-4.1 by **@danny-avila** in [#6880](https://github.com/danny-avila/LibreChat/pull/6880)
- 👋 feat: remove Edge TTS by **@berry-13** in [#6885](https://github.com/danny-avila/LibreChat/pull/6885)
- feat: nav optimization by **@berry-13** in [#5785](https://github.com/danny-avila/LibreChat/pull/5785)
- 🗺️ feat: Add Parameter Location Mapping for OpenAPI actions by **@peeeteeer** in [#6858](https://github.com/danny-avila/LibreChat/pull/6858)
- 🤖 feat: Support `o4-mini` and `o3` Models by **@danny-avila** in [#6928](https://github.com/danny-avila/LibreChat/pull/6928)
- 🎨 feat: OpenAI Image Tools (GPT-Image-1) by **@danny-avila** in [#7079](https://github.com/danny-avila/LibreChat/pull/7079)
- 🗓️ feat: Add Special Variables for Prompts & Agents, Prompt UI Improvements by **@danny-avila** in [#7123](https://github.com/danny-avila/LibreChat/pull/7123)
### 🌍 Internationalization
- 🌍 i18n: Add Thai Language Support and Update Translations by **@rubentalstra** in [#6219](https://github.com/danny-avila/LibreChat/pull/6219)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6220](https://github.com/danny-avila/LibreChat/pull/6220)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6240](https://github.com/danny-avila/LibreChat/pull/6240)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6241](https://github.com/danny-avila/LibreChat/pull/6241)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6277](https://github.com/danny-avila/LibreChat/pull/6277)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6414](https://github.com/danny-avila/LibreChat/pull/6414)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6505](https://github.com/danny-avila/LibreChat/pull/6505)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6530](https://github.com/danny-avila/LibreChat/pull/6530)
- 🌍 i18n: Add Persian Localization Support by **@rubentalstra** in [#6669](https://github.com/danny-avila/LibreChat/pull/6669)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#6667](https://github.com/danny-avila/LibreChat/pull/6667)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#7126](https://github.com/danny-avila/LibreChat/pull/7126)
- 🌍 i18n: Update translation.json with latest translations by **@github-actions[bot]** in [#7148](https://github.com/danny-avila/LibreChat/pull/7148)
### 👐 Accessibility
- 🎨 a11y: Update Model Spec Description Text by **@berry-13** in [#6294](https://github.com/danny-avila/LibreChat/pull/6294)
- 🗑️ a11y: Add Accessible Name to Button for File Attachment Removal by **@kangabell** in [#6709](https://github.com/danny-avila/LibreChat/pull/6709)
- ⌨️ a11y: enhance accessibility & visual consistency by **@berry-13** in [#6866](https://github.com/danny-avila/LibreChat/pull/6866)
- 🙌 a11y: Searchbar/Conversations List Focus by **@danny-avila** in [#7096](https://github.com/danny-avila/LibreChat/pull/7096)
- 👐 a11y: Improve Fork and SplitText Accessibility by **@danny-avila** in [#7147](https://github.com/danny-avila/LibreChat/pull/7147)
### 🔧 Fixes
- 🐛 fix: Avatar Type Definitions in Agent/Assistant Schemas by **@danny-avila** in [#6235](https://github.com/danny-avila/LibreChat/pull/6235)
- 🔧 fix: MeiliSearch Field Error and Patch Incorrect Import by #6210 by **@rubentalstra** in [#6245](https://github.com/danny-avila/LibreChat/pull/6245)
- 🔏 fix: Enhance Two-Factor Authentication by **@rubentalstra** in [#6247](https://github.com/danny-avila/LibreChat/pull/6247)
- 🐛 fix: Await saveMessage in abortMiddleware to ensure proper execution by **@sh4shii** in [#6248](https://github.com/danny-avila/LibreChat/pull/6248)
- 🔧 fix: Axios Proxy Usage And Bump `mongoose` by **@danny-avila** in [#6298](https://github.com/danny-avila/LibreChat/pull/6298)
- 🔧 fix: comment out MCP servers to resolve service run issues by **@KunalScriptz** in [#6316](https://github.com/danny-avila/LibreChat/pull/6316)
- 🔧 fix: Update Token Calculations and Mapping, MCP `env` Initialization by **@danny-avila** in [#6406](https://github.com/danny-avila/LibreChat/pull/6406)
- 🐞 fix: Agent "Resend" Message Attachments + Source Icon Styling by **@danny-avila** in [#6408](https://github.com/danny-avila/LibreChat/pull/6408)
- 🐛 fix: Prevent Crash on Duplicate Message ID by **@Odrec** in [#6392](https://github.com/danny-avila/LibreChat/pull/6392)
- 🔐 fix: Invalid Key Length in 2FA Encryption by **@rubentalstra** in [#6432](https://github.com/danny-avila/LibreChat/pull/6432)
- 🏗️ fix: Fix Agents Token Spend Race Conditions, Expand Test Coverage by **@danny-avila** in [#6480](https://github.com/danny-avila/LibreChat/pull/6480)
- 🔃 fix: Draft Clearing, Claude Titles, Remove Default Vision Max Tokens by **@danny-avila** in [#6501](https://github.com/danny-avila/LibreChat/pull/6501)
- 🔧 fix: Update username reference to use user.name in greeting display by **@rubentalstra** in [#6534](https://github.com/danny-avila/LibreChat/pull/6534)
- 🔧 fix: S3 Download Stream with Key Extraction and Blob Storage Encoding for Vision by **@danny-avila** in [#6557](https://github.com/danny-avila/LibreChat/pull/6557)
- 🔧 fix: Mistral type strictness for `usage`& update token values/windows by **@danny-avila** in [#6562](https://github.com/danny-avila/LibreChat/pull/6562)
- 🔧 fix: Consolidate Text Parsing and TTS Edge Initialization by **@danny-avila** in [#6582](https://github.com/danny-avila/LibreChat/pull/6582)
- 🔧 fix: Ensure continuation in image processing on base64 encoding from Blob Storage by **@danny-avila** in [#6619](https://github.com/danny-avila/LibreChat/pull/6619)
- ✉️ fix: Fallback For User Name In Email Templates by **@danny-avila** in [#6620](https://github.com/danny-avila/LibreChat/pull/6620)
- 🔧 fix: Azure Blob Integration and File Source References by **@rubentalstra** in [#6575](https://github.com/danny-avila/LibreChat/pull/6575)
- 🐛 fix: Safeguard against undefined addedEndpoints by **@wipash** in [#6654](https://github.com/danny-avila/LibreChat/pull/6654)
- 🤖 fix: Gemini 2.5 Vision Support by **@danny-avila** in [#6663](https://github.com/danny-avila/LibreChat/pull/6663)
- 🔄 fix: Avatar & Error Handling Enhancements by **@danny-avila** in [#6687](https://github.com/danny-avila/LibreChat/pull/6687)
- 🔧 fix: Chat Middleware, Zod Conversion, Auto-Save and S3 URL Refresh by **@danny-avila** in [#6720](https://github.com/danny-avila/LibreChat/pull/6720)
- 🔧 fix: Agent Capability Checks & DocumentDB Compatibility for Agent Resource Removal by **@danny-avila** in [#6726](https://github.com/danny-avila/LibreChat/pull/6726)
- 🔄 fix: Improve audio MIME type detection and handling by **@berry-13** in [#6707](https://github.com/danny-avila/LibreChat/pull/6707)
- 🪺 fix: Update Role Handling due to New Schema Shape by **@danny-avila** in [#6774](https://github.com/danny-avila/LibreChat/pull/6774)
- 🗨️ fix: Show ModelSpec Greeting by **@berry-13** in [#6770](https://github.com/danny-avila/LibreChat/pull/6770)
- 🔧 fix: Keyv and Proxy Issues, and More Memory Optimizations by **@danny-avila** in [#6867](https://github.com/danny-avila/LibreChat/pull/6867)
- ✨ fix: Implement dynamic text sizing for greeting and name display by **@berry-13** in [#6833](https://github.com/danny-avila/LibreChat/pull/6833)
- 📝 fix: Mistral OCR Image Support and Azure Agent Titles by **@danny-avila** in [#6901](https://github.com/danny-avila/LibreChat/pull/6901)
- 📢 fix: Invalid `engineTTS` and Conversation State on Navigation by **@berry-13** in [#6904](https://github.com/danny-avila/LibreChat/pull/6904)
- 🛠️ fix: Improve Accessibility and Display of Conversation Menu by **@danny-avila** in [#6913](https://github.com/danny-avila/LibreChat/pull/6913)
- 🔧 fix: Agent Resource Form, Convo Menu Style, Ensure Draft Clears on Submission by **@danny-avila** in [#6925](https://github.com/danny-avila/LibreChat/pull/6925)
- 🔀 fix: MCP Improvements, Auto-Save Drafts, Artifact Markup by **@danny-avila** in [#7040](https://github.com/danny-avila/LibreChat/pull/7040)
- 🐋 fix: Improve Deepseek Compatbility by **@danny-avila** in [#7132](https://github.com/danny-avila/LibreChat/pull/7132)
- 🐙 fix: Add Redis Ping Interval to Prevent Connection Drops by **@peeeteeer** in [#7127](https://github.com/danny-avila/LibreChat/pull/7127)
### ⚙️ Other Changes
- 📦 refactor: Move DB Models to `@librechat/data-schemas` by **@rubentalstra** in [#6210](https://github.com/danny-avila/LibreChat/pull/6210)
- 📦 chore: Patch `axios` to address CVE-2025-27152 by **@danny-avila** in [#6222](https://github.com/danny-avila/LibreChat/pull/6222)
- ⚠️ refactor: Use Error Content Part Instead Of Throwing Error for Agents by **@danny-avila** in [#6262](https://github.com/danny-avila/LibreChat/pull/6262)
- 🏃♂️ refactor: Improve Agent Run Context & Misc. Changes by **@danny-avila** in [#6448](https://github.com/danny-avila/LibreChat/pull/6448)
- 📝 docs: librechat.example.yaml by **@ineiti** in [#6442](https://github.com/danny-avila/LibreChat/pull/6442)
- 🏃♂️ refactor: More Agent Context Improvements during Run by **@danny-avila** in [#6477](https://github.com/danny-avila/LibreChat/pull/6477)
- 🔃 refactor: Allow streaming for `o1` models by **@danny-avila** in [#6509](https://github.com/danny-avila/LibreChat/pull/6509)
- 🔧 chore: `Vite` Plugin Upgrades & Config Optimizations by **@rubentalstra** in [#6547](https://github.com/danny-avila/LibreChat/pull/6547)
- 🔧 refactor: Consolidate Logging, Model Selection & Actions Optimizations, Minor Fixes by **@danny-avila** in [#6553](https://github.com/danny-avila/LibreChat/pull/6553)
- 🎨 style: Address Minor UI Refresh Issues by **@berry-13** in [#6552](https://github.com/danny-avila/LibreChat/pull/6552)
- 🔧 refactor: Enhance Model & Endpoint Configurations with Global Indicators 🌍 by **@berry-13** in [#6578](https://github.com/danny-avila/LibreChat/pull/6578)
- 💬 style: Chat UI, Greeting, and Message adjustments by **@berry-13** in [#6612](https://github.com/danny-avila/LibreChat/pull/6612)
- ⚡ refactor: DocumentDB Compatibility for Balance Updates by **@danny-avila** in [#6673](https://github.com/danny-avila/LibreChat/pull/6673)
- 🧹 chore: Update ESLint rules for React hooks by **@rubentalstra** in [#6685](https://github.com/danny-avila/LibreChat/pull/6685)
- 🪙 chore: Update Gemini Pricing by **@RedwindA** in [#6731](https://github.com/danny-avila/LibreChat/pull/6731)
- 🪺 refactor: Nest Permission fields for Roles by **@rubentalstra** in [#6487](https://github.com/danny-avila/LibreChat/pull/6487)
- 📦 chore: Update `caniuse-lite` dependency to version 1.0.30001706 by **@rubentalstra** in [#6482](https://github.com/danny-avila/LibreChat/pull/6482)
- ⚙️ refactor: OAuth Flow Signal, Type Safety, Tool Progress & Updated Packages by **@danny-avila** in [#6752](https://github.com/danny-avila/LibreChat/pull/6752)
- 📦 chore: bump vite from 6.2.3 to 6.2.5 by **@dependabot[bot]** in [#6745](https://github.com/danny-avila/LibreChat/pull/6745)
- 💾 chore: Enhance Local Storage Handling and Update MCP SDK by **@danny-avila** in [#6809](https://github.com/danny-avila/LibreChat/pull/6809)
- 🤖 refactor: Improve Agents Memory Usage, Bump Keyv, Grok 3 by **@danny-avila** in [#6850](https://github.com/danny-avila/LibreChat/pull/6850)
- 💾 refactor: Enhance Memory In Image Encodings & Client Disposal by **@danny-avila** in [#6852](https://github.com/danny-avila/LibreChat/pull/6852)
- 🔁 refactor: Token Event Handler and Standardize `maxTokens` Key by **@danny-avila** in [#6886](https://github.com/danny-avila/LibreChat/pull/6886)
- 🔍 refactor: Search & Message Retrieval by **@berry-13** in [#6903](https://github.com/danny-avila/LibreChat/pull/6903)
- 🎨 style: standardize dropdown styling & fix z-Index layering by **@berry-13** in [#6939](https://github.com/danny-avila/LibreChat/pull/6939)
- 📙 docs: CONTRIBUTING.md by **@dblock** in [#6831](https://github.com/danny-avila/LibreChat/pull/6831)
- 🧭 refactor: Modernize Nav/Header by **@danny-avila** in [#7094](https://github.com/danny-avila/LibreChat/pull/7094)
- 🪶 refactor: Chat Input Focus for Conversation Navigations & ChatForm Optimizations by **@danny-avila** in [#7100](https://github.com/danny-avila/LibreChat/pull/7100)
- 🔃 refactor: Streamline Navigation, Message Loading UX by **@danny-avila** in [#7118](https://github.com/danny-avila/LibreChat/pull/7118)
- 📜 docs: Unreleased changelog by **@github-actions[bot]** in [#6265](https://github.com/danny-avila/LibreChat/pull/6265)
- Agent Marketplace: Discover and deploy community-built agents
- Collaborative Sharing: Share agents with specific users and groups
- Flexible & Extensible: Use MCP Servers, tools, file search, code execution, and more
- Compatible with Custom Endpoints, OpenAI, Azure, Anthropic, AWS Bedrock, Google, Vertex AI, Responses API, and more
- [Model Context Protocol (MCP) Support](https://modelcontextprotocol.io/clients#librechat) for Tools
- 🔍 **Web Search**:
- Search the internet and retrieve relevant information to enhance your AI context
- Combines search providers, content scrapers, and result rerankers for optimal results
- **Customizable Jina Reranking**: Configure custom Jina API URLs for reranking services
- **[Learn More →](https://www.librechat.ai/docs/features/web_search)**
- 🪄 **Generative UI with Code Artifacts**:
- [Code Artifacts](https://youtu.be/GfTj7O4gmd0?si=WJbdnemZpJzBrJo3) allow creation of React, HTML, and Mermaid diagrams directly in chat
- 🎨 **Image Generation & Editing**
- Text-to-image and image-to-image with [GPT-Image-1](https://www.librechat.ai/docs/features/image_gen#1--openai-image-tools-recommended)
- Text-to-image with [DALL-E (3/2)](https://www.librechat.ai/docs/features/image_gen#2--dalle-legacy), [Stable Diffusion](https://www.librechat.ai/docs/features/image_gen#3--stable-diffusion-local), [Flux](https://www.librechat.ai/docs/features/image_gen#4--flux), or any [MCP server](https://www.librechat.ai/docs/features/image_gen#5--model-context-protocol-mcp)
- Produce stunning visuals from prompts or refine existing images with a single instruction
- 💾 **Presets & Context Management**:
- Create, Save, & Share Custom Presets
- Switch between AI Endpoints and Presets mid-chat
- Edit, Resubmit, and Continue Messages with Conversation branching
- Create and share prompts with specific users and groups
- [Fork Messages & Conversations](https://www.librechat.ai/docs/features/fork) for Advanced Context control
- 💬 **Multimodal & File Interactions**:
- Upload and analyze images with Claude 3, GPT-4.5, GPT-4o, o1, Llama-Vision, and Gemini 📸
- Chat with Files using Custom Endpoints, OpenAI, Azure, Anthropic, AWS Bedrock, & Google 🗃️
- Polski, Português (PT), Português (BR), Русский, 日本語, Svenska, 한국어, Tiếng Việt
- Türkçe, Nederlands, עברית, Català, Čeština, Dansk, Eesti, فارسی
- Suomi, Magyar, Հայերեն, Bahasa Indonesia, ქართული, Latviešu, ไทย, ئۇيغۇرچە
- 🧠 **Reasoning UI**:
- Dynamic Reasoning UI for Chain-of-Thought/Reasoning AI models like DeepSeek-R1
## All AI Conversations under One Roof. ##
Assistant AIs are the future and OpenAI revolutionized this movement with ChatGPT. While numerous methods exist to integrate them, this app commemorates the original styling of ChatGPT, with the ability to integrate any current/future AI models, while improving upon original client features, such as conversation search and prompt templates (currently WIP).
- 🎨 **Customizable Interface**:
- Customizable Dropdown & Interface that adapts to both power users and newcomers
This project was started early in Feb '23, anticipating the release of the official ChatGPT API from OpenAI, and now uses it. Through this clone, you can avoid ChatGPT Plus in favor of free or pay-per-call APIs. I will soon deploy a demo of this app. Feel free to contribute, clone, or fork. Currently dockerized.
- 🗣️ **Speech & Audio**:
- Chat hands-free with Speech-to-Text and Text-to-Speech
- Automatically send and play Audio
- Supports OpenAI, Azure OpenAI, and Elevenlabs
## Updates
<detailsopen>
<summary><strong>2023-03-12</strong></summary>
- 📥 **Import & Export Conversations**:
- Import Conversations from LibreChat, ChatGPT, Chatbot UI
- Export conversations as screenshots, markdown, text, json
- 🔍 **Search & Discovery**:
- Search all messages/conversations
- 👥 **Multi-User & Secure Access**:
- Multi-User, Secure Authentication with OAuth2, LDAP, & Email Login Support
- Built-in Moderation, and Token spend tools
- ⚙️ **Configuration & Deployment**:
- Configure Proxy, Reverse Proxy, Docker, & many Deployment options
- Use completely local or deploy on the cloud
Really thankful for all the issues reported and contributions made, the project's features and improvements have accelerated as result. Honorable mention is [wtlyu](https://github.com/wtlyu) for contributing a lot of mindful code, namely hostname configuration and mobile styling. I will upload images on next release for faster docker setup, and starting updating them simultaneously with this repo.
Many improvements across the board, the biggest is being able to start conversations simultaneously (again thanks to [wtlyu](https://github.com/wtlyu) for bringing it to my attention), as you can switch conversations or start a new chat without any response streaming from a prior one, as the backend will still process/save client responses. Just watch out for any rate limiting from OpenAI/Microsoft if this is done excessively.
Adding support for conversation search is next! Thank you [mysticaltech](https://github.com/mysticaltech) for bringing up a method I can use for this.
</details>
<details>
<details>
<summary><strong>2023-03-09</strong></summary>
Released v.0.0.2
Adds Sydney (jailbroken Bing AI) to the model menu. Thank you [DavesDevFails](https://github.com/DavesDevFails) for bringing it to my attention in this [issue](https://github.com/danny-avila/chatgpt-clone/issues/13). Bing/Sydney now correctly cite links, more styling to come. Fix some overlooked bugs, and model menu doesn't close upon deleting a customGpt.
I've re-enabled the ChatGPT browser client (free version) since it might be working for most people, it no longer works for me. Sydney is the best free route anyway.
</details>
<details>
<summary><strong>2023-03-07</strong></summary>
Due to increased interest in the repo, I've dockerized the app as of this update for quick setup! See setup instructions below. I realize this still takes some time with installing docker dependencies, so it's on the roadmap to have a deployed demo. Besides this, I've made major improvements for a lot of the existing features across the board, mainly UI/UX.
- 📖 **Open-Source & Community**:
- Completely Open-Source & Built in Public
- Community-driven development, support, and feedback
[For a thorough review of our features, see our docs here](https://docs.librechat.ai/) 📚
Also worth noting, the method to access the Free Version is no longer working, so I've removed it from model selection until further notice.
Custom prompt prefixing and labeling is now supported through the official API. This nets some interesting results when you need ChatGPT for specific uses or entertainment. Select 'CustomGPT' in the model menu to configure this, and you can choose to save the configuration or reference it by conversation. Model selection will change by conversation.
</details>
<details>
<summary><strong>2023-03-01</strong></summary>
Official ChatGPT API is out! Removed davinci since the official API is extremely fast and 10x less expensive. Since user labeling and prompt prefixing is officially supported, I will add a View feature so you can set this within chat, which gives the UI an added use case. I've kept the BrowserClient, since it's free to use like the official site.
The Messages UI correctly mirrors code syntax highlighting. The exact replication of the cursor is not 1-to-1 yet, but pretty close. Later on in the project, I'll implement tests for code edge cases and explore the possibility of running code in-browser. Right now, unknown code defaults to javascript, but will detect language as close as possible.
</details>
<details>
<summary><strong>2023-02-21</strong></summary>
BingAI is integrated (although sadly limited by Microsoft with the 5 msg/convo limit, 50 msgs/day). I will need to handle the case when Bing refuses to give more answers on top of the other styling features I have in mind. Official ChatGPT use is back with the new BrowserClient. Brainstorming how to handle the UI when the Ai model changes, since conversations can't be persisted between them (or perhaps build a way to achieve this at some level).
</details>
<details>
<summary><strong>2023-02-15</strong></summary>
Just got access to Bing AI so I'll be focusing on integrating that through waylaidwanderer's 'experimental' BingAIClient.
</details>
<details>
<summary><strong>2023-02-14</strong></summary>
Official ChatGPT use is no longer possible though I recently used it with waylaidwanderer's [reverse proxy method](https://github.com/waylaidwanderer/node-chatgpt-api/blob/main/README.md#using-a-reverse-proxy), and before that, through leaked models he also discovered.
Currently, this project is only functional with the `text-davinci-003` model.
</details>
</details>
## 🪶 All-In-One AI Conversations with LibreChat
# Table of Contents
- [ChatGPT Clone](#chatgpt-clone)
- [All AI Conversations under One Roof.](#all-ai-conversations-under-one-roof)
- [Updates](#updates)
- [Table of Contents](#table-of-contents)
- [Roadmap](#roadmap)
- [Features](#features)
- [Tech Stack](#tech-stack)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Usage](#usage)
- [Local](#local)
- [Docker](#docker)
- [Access Tokens](#access-tokens)
- [Proxy](#proxy)
- [Updating](#updating)
- [Use Cases](#use-cases)
- [Origin](#origin)
- [Caveats](#caveats)
- [Regarding use of Official ChatGPT API](#regarding-use-of-official-chatgpt-api)
- [Contributing](#contributing)
- [License](#license)
LibreChat brings together the future of assistant AIs with the revolutionary technology of OpenAI's ChatGPT. Celebrating the original styling, LibreChat gives you the ability to integrate multiple AI models. It also integrates and enhances original client features such as conversation and message search, prompt templates and plugins.
## Roadmap
With LibreChat, you no longer need to opt for ChatGPT Plus and can instead use free or pay-per-call APIs. We welcome contributions, cloning, and forking to enhance the capabilities of this advanced chatbot platform.
> **Warning**
[](https://www.youtube.com/watch?v=ilfwGQtJNlI)
> This is a work in progress. I'm building this in public. FYI there is still a lot of tech debt to cleanup. You can follow the progress here or on my [Linkedin](https://www.linkedin.com/in/danny-avila).
Click on the thumbnail to open the video☝️
Here are my recently completed and planned features:
---
- [x] Persistent conversation
- [x] Rename, delete conversations
- [x] UI Error handling
- [x] Bing AI integration
- [x] AI model change handling (start new convos within existing, remembers last selected)
- [x] Code block handling (highlighting, markdown, clipboard, language detection)
- [x] Markdown handling
- [x] Customize prompt prefix/label (custom ChatGPT using official API)
- [x] Server convo pagination (limit fetch and load more with 'show more' button)
- [x] Config file for easy startup (docker compose)
- [x] Mobile styling (thanks to [wtlyu](https://github.com/wtlyu))
<imgalt="Star History Chart"src="https://api.star-history.com/svg?repos=danny-avila/LibreChat&type=Date&theme=dark"onerror="this.src='https://api.star-history.com/svg?repos=danny-avila/LibreChat&type=Date'"/>
The Bing Access Token is the "_U" cookie from bing.com. Use dev tools or an extension while logged into the site to view it.
## ✨ Contributions
**Note:** Specific error handling and styling for this model is still in progress.
</details>
Contributions, suggestions, bug reports and fixes are welcome!
### Proxy
For new features, components, or extensions, please open an issue and discuss before sending a PR.
If your server cannot connect to the chatGPT API server by some reason, (eg in China). You can set a environment variable `PROXY`. This will be transmitted to `node-chatgpt-api` interface.
If you'd like to help translate LibreChat into your language, we'd love your contribution! Improving our translations not only makes LibreChat more accessible to users around the world but also enhances the overall user experience. Please check out our [Translation Guide](https://www.librechat.ai/docs/translation).
**Warning:** `PROXY` is not `reverseProxyUrl` in `node-chatgpt-api`
---
<details>
<summary><strong>Set up proxy in local environment </strong></summary>
## 💖 This project exists in its current state thanks to all the people who contribute
**Change `http://127.0.0.1:7890` to your proxy server**
</details>
---
<details>
<summary><strong>Set up proxy in docker environment </strong></summary>
## 🎉 Special Thanks
set in docker-compose.yml file, under services - api - environment
We thank [Locize](https://locize.com) for their translation management tools that support multiple languages in LibreChat.
```
api:
...
environment:
...
- "PROXY=http://127.0.0.1:7890"
# add this line ↑
```
**Change `http://127.0.0.1:7890` to your proxy server**
</details>
### Updating
- As the project is still a work-in-progress, you should pull the latest and run the steps over. Reset your browser cache/clear site data.
## Use Cases ##
- One stop shop for all conversational AIs, with the added bonus of searching past conversations.
- Using the official API, you'd have to generate 7.5 million words to expense the same cost as ChatGPT Plus ($20).
- ChatGPT/Google Bard/Bing AI conversations are lost in space or
cannot be searched past a certain timeframe.
- **Customize ChatGPT**

- **API is not as limited as ChatGPT Free (at [chat.openai.com](https://chat.openai.com/chat))**

- **ChatGPT Free is down.**

## Origin ##
This project was originally created as a Minimum Viable Product (or MVP) for the [@HackReactor](https://github.com/hackreactor/) Bootcamp. It was built with OpenAI response streaming and most of the UI completed in under 20 hours. During the end of that time, I had most of the UI and basic functionality done. This was created without using any boilerplates or templates, including create-react-app and other toolchains. I didn't follow any 'un-official chatgpt' video tutorials, and simply referenced the official site for the UI. The purpose of the exercise was to learn setting up a full stack project from scratch. Please feel free to give feedback, suggestions, or fork the project for your own use.
## Caveats
### Regarding use of Official ChatGPT API
From [@waylaidwanderer](https://github.com/waylaidwanderer/node-chatgpt-api/blob/main/README.md#caveats):
Since `gpt-3.5-turbo` is ChatGPT's underlying model, I had to do my best to replicate the way the official ChatGPT website uses it.
This means my implementation or the underlying model may not behave exactly the same in some ways:
- Conversations are not tied to any user IDs, so if that's important to you, you should implement your own user ID system.
- ChatGPT's model parameters (temperature, frequency penalty, etc.) are unknown, so I set some defaults that I thought would be reasonable.
- Conversations are limited to roughly the last 3000 tokens, so earlier messages may be forgotten during longer conversations.
- This works in a similar way to ChatGPT, except I'm pretty sure they have some additional way of retrieving context from earlier messages when needed (which can probably be achieved with embeddings, but I consider that out-of-scope for now).
## Contributing
If you'd like to contribute, please create a pull request with a detailed description of your changes.
-Ifauseraskstheassistantto"draw an SVG"or"make a website,"theassistantdoesnotneedtoexplainthatitdoesn't have these capabilities. Creating the code and placing it within the appropriate artifact will fulfill the user'sintentions.
2.Assignanidentifiertothe\`identifier\` attribute. For updates, reuse the prior identifier. For new artifacts, the identifier should be descriptive and relevant to the content, using kebab-case (e.g., "example-code-snippet"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.
3.Includea\`title\` attribute to provide a brief title or description of the content.
4.Adda\`type\` attribute to specify the type of content the artifact represents. Assign one of the following values to the \`type\` attribute:
-Usethisfordisplayingeither:Reactelements,e.g.\`<strong>Hello World!</strong>\`, React pure functional components, e.g. \`() => <strong>Hello World!</strong>\`, React functional components with Hooks, or React component classes
-Theassistantcanuseprebuiltcomponentsfromthe\`shadcn/ui\` library after it is imported: \`import { Alert, AlertDescription, AlertTitle, AlertDialog, AlertDialogAction } from '/components/ui/alert';\`. If using components from the shadcn/ui library, the assistant mentions this to the user and offers to help them install the components if necessary.
-ComponentsMUSTbeimportedfrom\`/components/ui/name\` and NOT from \`/components/name\` or \`@/components/ui/name\`.
-Ifauseraskstheassistantto"draw an SVG"or"make a website,"theassistantdoesnotneedtoexplainthatitdoesn't have these capabilities. Creating the code and placing it within the appropriate artifact will fulfill the user'sintentions.
2.Assignanidentifiertothe\`identifier\` attribute. For updates, reuse the prior identifier. For new artifacts, the identifier should be descriptive and relevant to the content, using kebab-case (e.g., "example-code-snippet"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.
3.Includea\`title\` attribute to provide a brief title or description of the content.
4.Adda\`type\` attribute to specify the type of content the artifact represents. Assign one of the following values to the \`type\` attribute:
-Usethisfordisplayingeither:Reactelements,e.g.\`<strong>Hello World!</strong>\`, React pure functional components, e.g. \`() => <strong>Hello World!</strong>\`, React functional components with Hooks, or React component classes
-Thethree.jslibraryisavailabletobeimported,e.g.\`import * as THREE from "three";\`
-Thedate-fnslibraryisavailabletobeimported,e.g.\`import { compareAsc, format } from "date-fns";\`
-Thereact-day-pickerlibraryisavailabletobeimported,e.g.\`import { DayPicker } from "react-day-picker";\`
-Theassistantcanuseprebuiltcomponentsfromthe\`shadcn/ui\` library after it is imported: \`import { Alert, AlertDescription, AlertTitle, AlertDialog, AlertDialogAction } from '/components/ui/alert';\`. If using components from the shadcn/ui library, the assistant mentions this to the user and offers to help them install the components if necessary.
-ComponentsMUSTbeimportedfrom\`/components/ui/name\` and NOT from \`/components/name\` or \`@/components/ui/name\`.
-Ifauseraskstheassistantto"draw an SVG"or"make a website,"theassistantdoesnotneedtoexplainthatitdoesn't have these capabilities. Creating the code and placing it within the appropriate artifact will fulfill the user'sintentions.
2.Assignanidentifiertothe\`identifier\` attribute. For updates, reuse the prior identifier. For new artifacts, the identifier should be descriptive and relevant to the content, using kebab-case (e.g., "example-code-snippet"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.
3.Includea\`title\` attribute to provide a brief title or description of the content.
4.Adda\`type\` attribute to specify the type of content the artifact represents. Assign one of the following values to the \`type\` attribute:
-Usethisfordisplayingeither:Reactelements,e.g.\`<strong>Hello World!</strong>\`, React pure functional components, e.g. \`() => <strong>Hello World!</strong>\`, React functional components with Hooks, or React component classes
-Thethree.jslibraryisavailabletobeimported,e.g.\`import * as THREE from "three";\`
-Thedate-fnslibraryisavailabletobeimported,e.g.\`import { compareAsc, format } from "date-fns";\`
-Thereact-day-pickerlibraryisavailabletobeimported,e.g.\`import { DayPicker } from "react-day-picker";\`
-Theassistantcanuseprebuiltcomponentsfromthe\`shadcn/ui\` library after it is imported: \`import { Alert, AlertDescription, AlertTitle, AlertDialog, AlertDialogAction } from '/components/ui/alert';\`. If using components from the shadcn/ui library, the assistant mentions this to the user and offers to help them install the components if necessary.
-ComponentsMUSTbeimportedfrom\`/components/ui/name\` and NOT from \`/components/name\` or \`@/components/ui/name\`.
"description":"Traversaal is a robust search API tailored for LLM Agents. Get an API key here: https://api.traversaal.ai",
"icon":"https://traversaal.ai/favicon.ico",
"authConfig":[
{
"authField":"TRAVERSAAL_API_KEY",
"label":"Traversaal API Key",
"description":"Get your API key here: <a href=\"https://api.traversaal.ai\" target=\"_blank\">https://api.traversaal.ai</a>"
}
]
},
{
"name":"Google",
"pluginKey":"google",
"description":"Use Google Search to find information about the weather, news, sports, and more.",
"icon":"https://i.imgur.com/SMmVkNB.png",
"authConfig":[
{
"authField":"GOOGLE_CSE_ID",
"label":"Google CSE ID",
"description":"This is your Google Custom Search Engine ID. For instructions on how to obtain this, see <a href='https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
},
{
"authField":"GOOGLE_SEARCH_API_KEY",
"label":"Google API Key",
"description":"This is your Google Custom Search API Key. For instructions on how to obtain this, see <a href='https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
}
]
},
{
"name":"YouTube",
"pluginKey":"youtube",
"toolkit":true,
"description":"Get YouTube video information, retrieve comments, analyze transcripts and search for videos.",
"description":"An AppID must be supplied in all calls to the Wolfram|Alpha API. You can get one by registering at <a href='http://products.wolframalpha.com/api/'>Wolfram|Alpha</a> and going to the <a href='https://developer.wolframalpha.com/portal/myapps/'>Developer Portal</a>."
}
]
},
{
"name":"Browser",
"pluginKey":"web-browser",
"description":"Scrape and summarize webpage data",
"icon":"assets/web-browser.svg",
"authConfig":[
{
"authField":"OPENAI_API_KEY",
"label":"OpenAI API Key",
"description":"Browser makes use of OpenAI embeddings"
}
]
},
{
"name":"DALL-E-3",
"pluginKey":"dalle",
"description":"[DALL-E-3] Create realistic images and art from a description in natural language",
"icon":"https://i.imgur.com/u2TzXzH.png",
"authConfig":[
{
"authField":"DALLE3_API_KEY||DALLE_API_KEY",
"label":"OpenAI API Key",
"description":"You can use DALL-E with your API Key from OpenAI."
}
]
},
{
"name":"Tavily Search",
"pluginKey":"tavily_search_results_json",
"description":"Tavily Search is a robust search API tailored for LLM Agents. It seamlessly integrates with diverse data sources to ensure a superior, relevant search experience.",
"icon":"https://tavily.com/favicon.ico",
"authConfig":[
{
"authField":"TAVILY_API_KEY",
"label":"Tavily API Key",
"description":"Get your API key here: https://app.tavily.com/"
}
]
},
{
"name":"Calculator",
"pluginKey":"calculator",
"description":"Perform simple and complex mathematical calculations.",
"icon":"https://i.imgur.com/RHsSG5h.png",
"authConfig":[]
},
{
"name":"Stable Diffusion",
"pluginKey":"stable-diffusion",
"description":"Generate photo-realistic images given any text input.",
"icon":"https://i.imgur.com/Yr466dp.png",
"authConfig":[
{
"authField":"SD_WEBUI_URL",
"label":"Your Stable Diffusion WebUI API URL",
"description":"You need to provide the URL of your Stable Diffusion WebUI API. For instructions on how to obtain this, see <a href='url'>Our Docs</a>."
}
]
},
{
"name":"Azure AI Search",
"pluginKey":"azure-ai-search",
"description":"Use Azure AI Search to find information",
"icon":"https://i.imgur.com/E7crPze.png",
"authConfig":[
{
"authField":"AZURE_AI_SEARCH_SERVICE_ENDPOINT",
"label":"Azure AI Search Endpoint",
"description":"You need to provide your Endpoint for Azure AI Search."
},
{
"authField":"AZURE_AI_SEARCH_INDEX_NAME",
"label":"Azure AI Search Index Name",
"description":"You need to provide your Index Name for Azure AI Search."
},
{
"authField":"AZURE_AI_SEARCH_API_KEY",
"label":"Azure AI Search API Key",
"description":"You need to provide your API Key for Azure AI Search."
}
]
},
{
"name":"OpenWeather",
"pluginKey":"open_weather",
"description":"Get weather forecasts and historical data from the OpenWeather API",
"icon":"assets/openweather.png",
"authConfig":[
{
"authField":"OPENWEATHER_API_KEY",
"label":"OpenWeather API Key",
"description":"Sign up at <a href=\"https://home.openweathermap.org/users/sign_up\" target=\"_blank\">OpenWeather</a>, then get your key at <a href=\"https://home.openweathermap.org/api_keys\" target=\"_blank\">API keys</a>."
}
]
},
{
"name":"Flux",
"pluginKey":"flux",
"description":"Generate images using text with the Flux API.",
"DALL-E displayed an image. All generated images are already plainly visible, so don't repeat the descriptions in detail. Do not list download links as they are available in the UI already. The user may download the images by clicking on them, but do not mention anything about downloading to the user.";
classDALLE3extendsTool{
constructor(fields={}){
super();
/** @type {boolean} Used to initialize the Tool without necessary variables. */
this.override=fields.override??false;
/** @type {boolean} Necessary for output to contain all image metadata. */
this.returnMetadata=fields.returnMetadata??false;
this.userId=fields.userId;
this.fileStrategy=fields.fileStrategy;
/** @type {boolean} */
this.isAgent=fields.isAgent;
if(fields.processFileURL){
/** @type {processFileURL} Necessary for output to contain all image metadata. */
`// Whenever a description of an image is given, generate prompts (following these rules), and use dalle to create the image. If the user does not ask for a specific number of images, default to creating 2 prompts to send to dalle that are written to be as diverse as possible. All prompts sent to dalle must abide by the following policies:
// 1. Prompts must be in English. Translate to English if needed.
// 2. One image per function call. Create only 1 image per request unless explicitly told to generate more than 1 image.
// 3. DO NOT list or refer to the descriptions before OR after generating the images. They should ONLY ever be written out ONCE, in the \`"prompts"\` field of the request. You do not need to ask for permission to generate, just do it!
// 4. Always mention the image type (photo, oil painting, watercolor painting, illustration, cartoon, drawing, vector, render, etc.) at the beginning of the caption. Unless the captions suggests otherwise, make one of the images a photo.
// 5. Diversify depictions of ALL images with people to always include always DESCENT and GENDER for EACH person using direct terms. Adjust only human descriptions.
// - EXPLICITLY specify these attributes, not abstractly reference them. The attributes should be specified in a minimal way and should directly describe their physical form.
// - Your choices should be grounded in reality. For example, all of a given OCCUPATION should not be the same gender or race. Additionally, focus on creating diverse, inclusive, and exploratory scenes via the properties you choose during rewrites. Make choices that may be insightful or unique sometimes.
// - Use "various" or "diverse" ONLY IF the description refers to groups of more than 3 people. Do not change the number of people requested in the original description.
// - Don't alter memes, fictional character origins, or unseen people. Maintain the original prompt's intent and prioritize quality.
// The prompt must intricately describe every part of the image in concrete, objective detail. THINK about what the end goal of the description is, and extrapolate that to what would make satisfying images.
// All descriptions sent to dalle should be a paragraph of text that is extremely descriptive and detailed. Each should be more than 3 sentences long.
// - The "vivid" style is HIGHLY preferred, but "natural" is also supported.`;
this.schema=z.object({
prompt:z
.string()
.max(4000)
.describe(
'A text description of the desired image, following the rules, up to 4000 characters.',
),
style:z
.enum(['vivid','natural'])
.describe(
'Must be one of `vivid` or `natural`. `vivid` generates hyper-real and dramatic images, `natural` produces more natural, less hyper-real looking images',
),
quality:z
.enum(['hd','standard'])
.describe('The quality of the generated image. Only `hd` and `standard` are supported.'),
size:z
.enum(['1024x1024','1792x1024','1024x1792'])
.describe(
'The size of the requested image. Use 1024x1024 (square) as the default, 1792x1024 if the user requests a wide image, and 1024x1792 for full-body portraits. Always include this parameter in the request.',
"Flux displayed an image. All generated images are already plainly visible, so don't repeat the descriptions in detail. Do not list download links as they are available in the UI already. The user may download the images by clicking on them, but do not mention anything about downloading to the user.";
'Use Flux to generate images from text descriptions. This tool can generate images and list available finetunes. Each generate call creates one image. For multiple images, make multiple consecutive calls.';
this.description_for_model=`// Transform any image description into a detailed, high-quality prompt. Never submit a prompt under 3 sentences. Follow these core rules:
// 1. ALWAYS enhance basic prompts into 5-10 detailed sentences (e.g., "a cat" becomes: "A close-up photo of a sleek Siamese cat with piercing blue eyes. The cat sits elegantly on a vintage leather armchair, its tail curled gracefully around its paws. Warm afternoon sunlight streams through a nearby window, casting gentle shadows across its face and highlighting the subtle variations in its cream and chocolate-point fur. The background is softly blurred, creating a shallow depth of field that draws attention to the cat's expressive features. The overall composition has a peaceful, contemplative mood with a professional photography style.")
// 2. Each prompt MUST be 3-6 descriptive sentences minimum, focusing on visual elements: lighting, composition, mood, and style
// Use action: 'list_finetunes' to see available custom models. When using finetunes, use endpoint: '/v1/flux-pro-finetuned' (default) or '/v1/flux-pro-1.1-ultra-finetuned' for higher quality and aspect ratio.`;
// Add base URL from environment variable with fallback
'Action to perform: "generate" for image generation, "generate_finetuned" for finetuned model generation, "list_finetunes" to get available custom models',
),
prompt:z
.string()
.optional()
.describe(
'Text prompt for image generation. Required when action is "generate". Not used for list_finetunes.',
),
width:z
.number()
.optional()
.describe(
'Width of the generated image in pixels. Must be a multiple of 32. Default is 1024.',
),
height:z
.number()
.optional()
.describe(
'Height of the generated image in pixels. Must be a multiple of 32. Default is 768.',
),
prompt_upsampling:z
.boolean()
.optional()
.default(false)
.describe('Whether to perform upsampling on the prompt.'),
steps:z
.number()
.int()
.optional()
.describe('Number of steps to run the model for, a number from 1 to 50. Default is 40.'),
seed:z.number().optional().describe('Optional seed for reproducibility.'),
safety_tolerance:z
.number()
.optional()
.default(6)
.describe(
'Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.',
),
endpoint:z
.enum([
'/v1/flux-pro-1.1',
'/v1/flux-pro',
'/v1/flux-dev',
'/v1/flux-pro-1.1-ultra',
'/v1/flux-pro-finetuned',
'/v1/flux-pro-1.1-ultra-finetuned',
])
.optional()
.default('/v1/flux-pro-1.1')
.describe('Endpoint to use for image generation.'),
raw:z
.boolean()
.optional()
.default(false)
.describe(
'Generate less processed, more natural-looking images. Only works for /v1/flux-pro-1.1-ultra.',
),
finetune_id:z.string().optional().describe('ID of the finetuned model to use'),
finetune_strength:z
.number()
.optional()
.default(1.1)
.describe('Strength of the finetuning effect (typically between 0.1 and 1.2)'),
guidance:z.number().optional().default(2.5).describe('Guidance scale for finetuned models'),
aspect_ratio:z
.string()
.optional()
.default('16:9')
.describe('Aspect ratio for ultra models (e.g., "16:9")'),
"The tool displayed an image. All generated images are already plainly visible, so don't repeat the descriptions in detail. Do not list download links as they are available in the UI already. The user may download the images by clicking on them, but do not mention anything about downloading to the user.";
"Stable Diffusion displayed an image. All generated images are already plainly visible, so don't repeat the descriptions in detail. Do not list download links as they are available in the UI already. The user may download the images by clicking on them, but do not mention anything about downloading to the user.";
classStableDiffusionAPIextendsTool{
constructor(fields){
super();
/** @type {string} User ID */
this.userId=fields.userId;
/** @type {ServerRequest | undefined} Express Request object, only provided by ToolService */
this.req=fields.req;
/** @type {boolean} Used to initialize the Tool without necessary variables. */
this.override=fields.override??false;
/** @type {boolean} Necessary for output to contain all image metadata. */
this.returnMetadata=fields.returnMetadata??false;
/** @type {boolean} */
this.isAgent=fields.isAgent;
if(fields.uploadImageBuffer){
/** @type {uploadImageBuffer} Necessary for output to contain all image metadata. */
this.description_for_model=`// Generate images and visuals using text.
// Guidelines:
// - ALWAYS use {{"prompt": "7+ detailed keywords", "negative_prompt": "7+ detailed keywords"}} structure for queries.
// - ALWAYS include the markdown url in your final response to show the user: }/images/id.png)
// - Visually describe the moods, details, structures, styles, and/or proportions of the image. Remember, the focus is on visual attributes.
// - Craft your input by "showing" and not "telling" the imagery. Think in terms of what you'd want to see in a photograph or a painting.
// - Here's an example for generating a realistic portrait photo of a man:
// "prompt":"photo of a man in black clothes, half body, high detailed skin, coastline, overcast weather, wind, waves, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3"
// "negative_prompt":"semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, out of frame, low quality, ugly, mutation, deformed"
// - Generate images only once per human query unless explicitly requested by the user`;
this.description=
"You can generate images using text with 'stable-diffusion'. This tool is exclusively for visual content.";
this.schema=z.object({
prompt:z
.string()
.describe(
'Detailed keywords to describe the subject, using at least 7 keywords to accurately describe the image, separated by comma',
),
negative_prompt:z
.string()
.describe(
'Keywords we want to exclude from the final image, using at least 7 keywords to accurately describe the image, separated by comma',
.describe('The maximum number of search results to return. Defaults to 5.'),
search_depth:z
.enum(['basic','advanced'])
.optional()
.describe(
'The depth of the search, affecting result quality and response time (`basic` or `advanced`). Default is basic for quick results and advanced for indepth high quality results but longer response time. Advanced calls equals 2 requests.',
),
include_images:z
.boolean()
.optional()
.describe(
'Whether to include a list of query-related images in the response. Default is False.',
),
include_answer:z
.boolean()
.optional()
.describe('Whether to include answers in the search results. Default is False.'),
.describe('The maximum number of search results to return. Defaults to 5.'),
search_depth:z
.enum(['basic','advanced'])
.optional()
.describe(
'The depth of the search, affecting result quality and response time (`basic` or `advanced`). Default is basic for quick results and advanced for indepth high quality results but longer response time. Advanced calls equals 2 requests.',
),
include_images:z
.boolean()
.optional()
.describe(
'Whether to include a list of query-related images in the response. Default is False.',
),
include_answer:z
.boolean()
.optional()
.describe('Whether to include answers in the search results. Default is False.'),
include_raw_content:z
.boolean()
.optional()
.describe('Whether to include raw content in the search results. Default is False.'),
include_domains:z
.array(z.string())
.optional()
.describe('A list of domains to specifically include in the search results.'),
exclude_domains:z
.array(z.string())
.optional()
.describe('A list of domains to specifically exclude from the search results.'),
topic:z
.enum(['general','news','finance'])
.optional()
.describe(
'The category of the search. Use news ONLY if query SPECIFCALLY mentions the word "news".',
'\'Please create a specific sentence for the AI to understand and use as a query to search the web based on the user\'s request. For example, "Find information about the highest mountains in the world." or "Show me the latest news articles about climate change and its impact on polar ice caps."\'';
this.schema=z.object({
query:z
.string()
.describe(
"A properly written sentence to be interpreted by an AI to search the web according to the user's request.",
this.description_for_model=`// Access dynamic computation and curated data from WolframAlpha and Wolfram Cloud.
// General guidelines:
// - Use only getWolframAlphaResults or getWolframCloudResults endpoints.
// - Prefer getWolframAlphaResults unless Wolfram Language code should be evaluated.
// - Use getWolframAlphaResults for natural-language queries in English; translate non-English queries before sending, then respond in the original language.
// - Use getWolframCloudResults for problems solvable with Wolfram Language code.
// - Suggest only Wolfram Language for external computation.
// - Inform users if information is not from Wolfram endpoints.
// - Display image URLs with Image Markdown syntax: . You must prefix the caption brackets with "!".
// - ALWAYS use this exponent notation: \`6*10^14\`, NEVER \`6e14\`.
// - ALWAYS use {{"input": query}} structure for queries to Wolfram endpoints; \`query\` must ONLY be a single-line string.
// - ALWAYS use proper Markdown formatting for all math, scientific, and chemical formulas, symbols, etc.: '$$\n[expression]\n$$' for standalone cases and '\( [expression] \)' when inline.
// - Format inline Wolfram Language code with Markdown code formatting.
// - Never mention your knowledge cutoff date; Wolfram may return more recent data. getWolframAlphaResults guidelines:
// - Understands natural language queries about entities in chemistry, physics, geography, history, art, astronomy, and more.
// - Performs mathematical calculations, date and unit conversions, formula solving, etc.
// - Convert inputs to simplified keyword queries whenever possible (e.g. convert "how many people live in France" to "France population").
// - Use ONLY single-letter variable names, with or without integer subscript (e.g., n, n1, n_1).
// - Use named physical constants (e.g., 'speed of light') without numerical substitution.
// - Include a space between compound units (e.g., "Ω m" for "ohm*meter").
// - To solve for a variable in an equation with units, consider solving a corresponding equation without units; exclude counting units (e.g., books), include genuine units (e.g., kg).
// - If data for multiple properties is needed, make separate calls for each property.
// - If a Wolfram Alpha result is not relevant to the query:
// -- If Wolfram provides multiple 'Assumptions' for a query, choose the more relevant one(s) without explaining the initial result. If you are unsure, ask the user to choose.
// -- Re-send the exact same 'input' with NO modifications, and add the 'assumption' parameter, formatted as a list, with the relevant values.
// -- ONLY simplify or rephrase the initial query if a more relevant 'Assumption' or other input suggestions are not provided.
// -- Do not explain each step unless user input is needed. Proceed directly to making a better API call based on the available assumptions.`;
this.description=`WolframAlpha offers computation, math, curated knowledge, and real-time data. It handles natural language queries and performs complex calculations.
Followtheguidelinestogetthebestresults.`;
this.schema=z.object({
input:z.string().describe('Natural language query to WolframAlpha following the guidelines'),
// Filter by access if user and agent are provided
letdbFiles;
if(req?.user?.id&&agentId){
dbFiles=awaitfilterFilesByAgentAccess({
files:allFiles,
userId:req.user.id,
role:req.user.role,
agentId,
});
}else{
dbFiles=allFiles;
}
dbFiles=dbFiles.concat(resourceFiles);
lettoolContext=`- Note: Semantic search is available through the ${Tools.file_search} tool but no files are currently loaded. Request the user to upload documents to search through.`;
constfiles=[];
for(leti=0;i<dbFiles.length;i++){
constfile=dbFiles[i];
if(!file){
continue;
}
if(i===0){
toolContext=`- Note: Use the ${Tools.file_search} tool to find relevant information within:`;
}
toolContext+=`\n\t- ${file.filename}${
agentResourceIds.has(file.file_id)?'':' (just attached by user)'
description:`Performs semantic search across attached "${Tools.file_search}" documents using natural language queries. This tool analyzes the content of uploaded files to find relevant information, quotes, and passages that best match your query. Use this to extract specific information or find relevant sections within the available documents.${
"A natural language query to search for relevant information in the files. Be specific and use keywords related to the information you're looking for. The query will be used for semantic similarity matching against the file contents.",
'Image files provided in this request (their image IDs listed in order of appearance) available for image editing:';
}
toolContext+=`\n\t- ${file.file_id}`;
if(i===imageFiles.length-1){
toolContext+=`\n\nInclude any you need in the \`image_ids\` array when calling \`${EToolResources.image_edit}_oai\`. You may also include previously referenced or generated image IDs.`;
}
}
if(toolContext){
toolContextMap.image_edit_oai=toolContext;
}
returncreateOpenAIImageTools({
...authValues,
isAgent:!!agent,
req:options.req,
imageOutputType,
fileStrategy,
imageFiles,
});
},
};
constrequestedTools={};
if(functions===true){
toolConstructors.dalle=DALLE3;
}
/** @type {ImageGenOptions} */
constimageGenOptions={
isAgent:!!agent,
req:options.req,
fileStrategy,
processFileURL:options.processFileURL,
returnMetadata:options.returnMetadata,
uploadImageBuffer:options.uploadImageBuffer,
};
consttoolOptions={
flux:imageGenOptions,
dalle:imageGenOptions,
'stable-diffusion':imageGenOptions,
};
/** @type {Record<string, string>} */
consttoolContextMap={};
constrequestedMCPTools={};
for(consttooloftools){
if(tool===Tools.execute_code){
requestedTools[tool]=async()=>{
constauthValues=awaitloadAuthValues({
userId:user,
authFields:[EnvVar.CODE_API_KEY],
});
constcodeApiKey=authValues[EnvVar.CODE_API_KEY];
const{files,toolContext}=awaitprimeCodeFiles(
{
...options,
agentId:agent?.id,
},
codeApiKey,
);
if(toolContext){
toolContextMap[tool]=toolContext;
}
constCodeExecutionTool=createCodeExecutionTool({
user_id:user,
files,
...authValues,
});
CodeExecutionTool.apiKey=codeApiKey;
returnCodeExecutionTool;
};
continue;
}elseif(tool===Tools.file_search){
requestedTools[tool]=async()=>{
const{files,toolContext}=awaitprimeSearchFiles({
...options,
agentId:agent?.id,
});
if(toolContext){
toolContextMap[tool]=toolContext;
}
/** @type {boolean | undefined} Check if user has FILE_CITATIONS permission */