Commit graph

2438 commits

Author SHA1 Message Date
Danny Avila
81f29360e8
🫧 fix: Tool Auth Form Button to Prevent Form Bubbling (#4666) 2024-11-07 11:26:06 -05:00
Danny Avila
49ee88b6e8
⚙️ fix: File Config Handling (#4664)
* 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
2024-11-07 11:11:20 -05:00
Danny Avila
d60a0af878
🦙 refactor: Normalize Ollama Config Names (#4657) 2024-11-07 08:26:35 -05:00
Adam Boeglin
c27b26cc31
🪨 fix: add AWS STS session token support to Bedrock client (#4655) 2024-11-07 08:06:42 -05:00
Danny Avila
766643ea1c
🎯 feat: Enhance Title Parameter Parsing with new Anthropic Format 2024-11-06 13:40:49 -05:00
Danny Avila
0c2a583df8
🔧 refactor: Optimize Agent Tool Loading and Fix Bedrock Tool Handling (#4641)
* 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
2024-11-05 11:24:26 -05:00
Danny Avila
3428c3c647
feat: Known Endpoint, xAI (#4632)
* 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
2024-11-04 16:27:54 -05:00
Danny Avila
fc41032923
🤖 feat: Claude 3.5 Haiku (#4629) 2024-11-04 15:10:24 -05:00
Danny Avila
2e519f9b57
🤖 feat: Custom Endpoint Agents (experimental) (#4627)
* wip: first pass, custom endpoint agents

* chore: imports

* chore: consolidate exports

* fix: imports

* feat: convert message.content array to strings for legacy format handling (deepseek/groq)

* refactor: normalize ollama endpoint name

* refactor: update mocking in isDomainAllowed.spec.js

* refactor: update deepseekModels in tokens.js and tokens.spec.js
2024-11-04 12:59:04 -05:00
Danny Avila
9437e95315
📑 fix: Access Control for Bookmarks (UI) (#4612) 2024-11-01 18:54:17 -04:00
Danny Avila
95011ce349
🚧 WIP: Merge Dev Build (#4611)
* refactor: Agent CodeFiles, abortUpload WIP

* feat: code environment file upload

* refactor: useLazyEffect

* refactor:
- Add `watch` from `useFormContext` to check if code execution is enabled
- Disable file upload button if `agent_id` is not selected or code execution is disabled

* WIP: primeCodeFiles; refactor: rename sessionId to session_id for uniformity

* Refactor: Rename session_id to sessionId for uniformity in AuthService.js

* chore: bump @librechat/agents to version 1.7.1

* WIP: prime code files

* refactor: Update code env file upload method to use read stream

* feat: reupload code env file if no longer active

* refactor: isAssistantTool -> isEntityTool + address type issues

* feat: execute code tool hook

* refactor: Rename isPluginAuthenticated to checkPluginAuth in PluginController.js

* refactor: Update PluginController.js to use AuthType constant for comparison

* feat: verify tool authentication (execute_code)

* feat: enter librechat_code_api_key

* refactor: Remove unused imports in BookmarkForm.tsx

* feat: authenticate code tool

* refactor: Update Action.tsx to conditionally render the key and revoke key buttons

* refactor(Code/Action): prevent uncheck-able 'Run Code' capability when key is revoked

* refactor(Code/Action): Update Action.tsx to conditionally render the key and revoke key buttons

* fix: agent file upload edge cases

* chore: bump @librechat/agents

* fix: custom endpoint providerValue icon

* feat: ollama meta modal token values + context

* feat: ollama agents

* refactor: Update token models for Ollama models

* chore: Comment out CodeForm

* refactor: Update token models for Ollama and Meta models
2024-11-01 18:36:39 -04:00
Tim Manik
1909efd6ba
📝 docs: Added RAG_USE_FULL_CONTEXT to .env.example (#4494) 2024-10-31 09:57:33 -04:00
Danny Avila
8cfacca8af
🔒 chore: bump elliptic to address CVE-2024-48948 (#4575) 2024-10-29 11:27:32 -04:00
Danny Avila
5861ebe081
🔒 fix: Override mdast-util-gfm-autolink-literal Package Version (#4574)
* fix: `mdast-util-gfm-autolink-literal` overriden to  due to https://github.com/syntax-tree/mdast-util-gfm-autolink-literal/issues/10

* chore: non-change to force workflow

* Revert "chore: non-change to force workflow"

This reverts commit ba7c15d5a0.

* chore: non-change to force workflow pt. 2

* chore: revert commit
2024-10-29 11:16:43 -04:00
Sebastian Diez
f270455be6
🔧 fix: Allow Azure Assistants Chats to be Deleted (#3893) 2024-10-29 08:09:35 -04:00
Marco Beretta
2b0654bb2c
docs: 0.7.5 (#4569) 2024-10-28 16:50:44 -04:00
Danny Avila
e0222d42c6
🖌️ fix: ordered lists markers (#4568)
* fix ordered lists markers styling

* cleanup

* refactor: additional padding for 3-digit markers

* Refactor CSS to remove extra spacing in lists

---------

Co-authored-by: Thingersoft <thingersoft@gmail.com>
2024-10-28 15:56:03 -04:00
Adam Boeglin
a21591d25d
🪨 feat: Include Sonnet 3.5 v2 in Default Bedrock Models List (#4552) 2024-10-28 14:05:26 -04:00
Danny Avila
1526b429c9
🧵 feat: Implement Request Executor Pattern for Actions (#4566)
* 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
2024-10-28 13:42:38 -04:00
J'aimemin
262176fec4
🔼 a11y: Proper attributes for the side panel toggle button (#4559)
- 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
2024-10-28 11:03:38 -04:00
Danny Avila
b939e24f67
🔄 feat: Add Configurable Cache Headers for Index.html (#4565)
* 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
2024-10-28 11:01:31 -04:00
Danny Avila
a1647d76e0
🔐 feat: Enhance OpenID User Info Handling (#4561)
* 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>
2024-10-27 11:41:48 -04:00
Danny Avila
600d21780b
v0.7.5 (#4541) 2024-10-24 17:32:55 -04:00
Danny Avila
3f3b5929e9
🛡️ fix: Minor Vulnerabilities (#4543)
* 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
2024-10-24 15:50:48 -04:00
Danny Avila
094a40dbb0
🌏 i18n: Added Missing Localizations (Ar, De, Es, Fr, It, Jp, Ko, Ru, Zh) (#4540)
* 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
2024-10-24 10:48:57 -04:00
Danny Avila
840851cb0f
🍎 fix: Update "Enter to send" behavior for Mac users (#4539)
* fix: Update useTextarea to handle Ctrl+Enter on Mac

* fix: Update language files for message sending behavior
2024-10-24 09:49:10 -04:00
J'aimemin
c346596131
🌏 i18n: modify username min length in Ko.ts (3→2) (#4532) 2024-10-24 09:45:38 -04:00
Danny Avila
e0e393b8a4
🎚️ fix: Google top_k Slider Step to Integers (#4537) 2024-10-24 09:24:38 -04:00
Danny Avila
2996058fa2
🔘 a11y: Switch Contrast and File Input Key Events to WCAG (#4536)
* 🔘 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
2024-10-24 09:12:49 -04:00
Danny Avila
655f63714b
👓 fix: Assistants Vision Prompt Error Handling (legacy) (#4529)
* fix: vision prompt error handling

* fix: Update model reference in chatV1 controller

* remove model reference
2024-10-23 15:21:22 -04:00
Danny Avila
4da35b9cf5
🤖 feat: Add support for claude-3-5-sonnet-20241022 (#4510) 2024-10-22 16:45:26 -04:00
Danny Avila
ebe3e7f796
🖼️ fix: Avatar Handling for Agents and Assistants (#4507)
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.
2024-10-22 14:53:45 -04:00
Danny Avila
ec922986a9
🤖 fix: Address Minor Agent Issues (#4483)
* 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
2024-10-21 09:41:04 -04:00
Danny Avila
a6fbe7591a
chore: bump librechat-data-provider 2024-10-21 09:38:40 -04:00
Danny Avila
f121439960
🔐 refactor: Unverified User Verification Logic (#4482) 2024-10-21 07:51:45 -04:00
Marco Beretta
4d4a6b53f1
🎨 style: UI Style Enhancements and Refactor for Improved Consistency and Layout (#4471)
* 🎨 style: adjust padding and class names in UI components

* 🎨 style: update ExportModal export button, update Export button hover style, refactor ChatForm style and fixed isRTL styles, update AttachFile position

* 🎨 style: remove redundant border classes in SettingsTabs components for cleaner UI

* 🎨 style: refactor Account component, extract DisplayUsernameMessages, and remove redundant border classes for cleaner layout

* 🎨 style: conditionally render Dropdown in ForkSettings component for improved UI responsiveness

* 🎨 style: replace DropdownNoState with Dropdown in voice selection components for consistency

* 🎨 style: update Settings component layout for better responsivenes on large screens

* 🎨 style: remove redundant margin-top classes for cleaner layout in various components
2024-10-20 11:29:47 -04:00
Danny Avila
ecf5699513
🧪 chore: raise max temperature to 2 for OpenAI/Custom Endpoints 2024-10-19 08:39:15 -04:00
Alex Wegener
e25c16cd4f
🖼️ feat: Add dat.gui to Artifacts UI libs (#4344) 2024-10-19 08:34:57 -04:00
Marco Beretta
8f3de7d11f
🎨 refactor: UI stlye (#4438)
* 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
2024-10-19 08:30:52 -04:00
adrianfagerland
20fb7f05ae
🔃 refactor: rename all server endpoints to use same file names (#4364) 2024-10-19 08:24:07 -04:00
Yuki Matsukura
f3e2bd0a12
🐋 chore: remove Docker version syntax as its no longer (#4375) 2024-10-19 08:22:26 -04:00
Danny Avila
b85c6206ab
🤖 fix: Minor Assistants Issues (#4436)
* 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
2024-10-16 15:04:10 -04:00
Danny Avila
65888c274a
⬆️ feat: Cancel chat file uploads; fix: Assistant uploads (#4433)
* 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
2024-10-16 11:24:40 -04:00
Danny Avila
0870acd086
📦 chore: npm package audit (#4424)
* chore: bump cookie dependencies

* chore: bump express, express-session, express-rate-limit, and all vulnerable `cookie` dependencies
2024-10-15 20:05:22 -04:00
Danny Avila
c54a57019e
🕒 feat: Add 5-second timeout for Fetching Model Lists (#4423)
* refactor: add 5 second timeout for fetching AI provider model lists

* ci: fix test due to recent changes
2024-10-15 19:37:41 -04:00
Marco Beretta
ef118009f6
feat: Add GOOGLE_LOC environment variable (#4395) 2024-10-15 18:10:48 -04:00
Hongkai Ye
bf5b87e0b2
🪙 feat: Update token value for gpt-4o (#4387) 2024-10-11 08:27:29 -04:00
Danny Avila
bab0152c58
🤖 feat: Enhance Assistant Model Handling for Model Specs (#4390)
* 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
2024-10-11 08:20:32 -04:00
Abhijith E A
2846779603
🔨 fix(AzureOpenAI): o1 model, stream parameter check (#4381) 2024-10-10 11:10:15 -04:00
Danny Avila
873e0473ec
🧠 feat: Implement O1 Model Support for Max Tokens Handling (#4376) 2024-10-10 02:36:36 -04:00