-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🪨 feat: AWS Bedrock Default Credentials Chain #4038
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
danny-avila
changed the title
🪨 feat: AWS Bedrock Additional Credential Handling
🪨 feat: AWS Bedrock Default Credentials Chain
Sep 13, 2024
This was referenced Sep 13, 2024
illgitthat
pushed a commit
to illgitthat/LibreChat
that referenced
this pull request
Oct 19, 2024
* 🪨 feat: AWS Bedrock support (danny-avila#3935) * 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 f8067e9. * Revert "refactor: dynamic form elements using react-hook-form Controllers" This reverts commit 2150c48. * 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 * 🔒 feat: RBAC for Multi-Convo Feature (danny-avila#3964) * 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 * 🔒 refactor: Apply interface settings to all Roles (danny-avila#3967) * 🛠️ fix: Completion Edge Cases & Improve Error Handling UX (danny-avila#3968) * fix: edge cases concerning completion response as an array * refactor: improve invalid request error UX * 🪨 fix: Minor AWS Bedrock/Misc. Improvements (danny-avila#3974) * 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 * ⌨️ a11y(Settings): Improved Keyboard Navigation & Consistent Styling (danny-avila#3975) * 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 <[email protected]> * ✨ v0.7.5-rc2 (danny-avila#3976) * ✨ 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 * 🔐 style: update auth and loading screen (danny-avila#3875) * style: improve auth UI * style(SocialButton): fix hover style * remove testing files * fix: package-lock * feat: loading screen color based on theme * fix: handle `system` style on loading screen * fix(ThemeSelector): Correct icon and text color handling for `system` theme * remove test file * ⚙️ fix: Ensure Azure AI Search TOP is a number (danny-avila#3891) allows configuration through AZURE_AI_SEARCH_SEARCH_OPTION_TOP enviroment variable * 🚀 feat: Banner (danny-avila#3952) * 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 * 🔐 fix: token not using webcrypto (danny-avila#4005) * fix: token * style: auth pages updated `|` color * 🪨 fix: Formatting Edge Case Handling for Bedrock Messages (danny-avila#4016) * refactor: Remove console.log statement in SelectDropDown component * fix(bedrock): edge case - message.content as string creating message formatting issue * 🚀 feat: o1 (danny-avila#4019) * 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: AWS Bedrock Default Credentials Chain (danny-avila#4038) * 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 * 💡 style: switched to Ariakit's tooltip (danny-avila#3748) * 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 * 🍪 fix: input validation for `lang` cookie (danny-avila#4024) Co-authored-by: DanielAlt <[email protected]> * 🪙 fix: usage check for reasoning_tokens * 🔐 feat: Enhance Bedrock Credential Handling (danny-avila#4051) * 📁 feat: Add C# Support for Native File Search (danny-avila#4058) * 🛠️ fix: Chrome App Crash on Endpoint Selection in Edit Preset Dialog (danny-avila#4096) * 📊 refactor: use Parameters from Side Panel for OpenAI, Anthropic, and Custom endpoints (danny-avila#4092) * feat: openai parameters * refactor: anthropic/bedrock params, add preset params for openai, and add azure params * refactor: use 'compact' schemas for anthropic/openai * refactor: ensure custom endpoints are properly recognized as valid param endpoints * refactor: update paramEndpoints check in BaseClient.js * chore: optimize logging by omitting modelsConfig * refactor: update label casing in baseDefinitions combobox items * fix: remove 'stop' model options when using o1 series models * refactor(AnthropicClient): remove default `stop` value * refactor: reset params on parameters change * refactor: remove unused default parameter value map introduced in prior commit * fix: 'min' typo for 'max' value * refactor: preset settings * refactor: replace dropdown for image detail with slider; remove `preventDelayedUpdate` condition from DynamicSlider * fix: localizations for freq./pres. penalty * Refactor maxOutputTokens to use coerceNumber in tConversationSchema * refactor(AnthropicClient): use `getModelMaxOutputTokens` * 🔧 fix: OpenAIClient Response Handling for Legacy `/v1/completions` (danny-avila#4128) * 🛠️ fix: `getStreamUsage` Method in OpenAIClient (danny-avila#4133) * 🤖 ci: Configure Dependabot for Security Updates (danny-avila#4134) * 🤖 ci: Configure Dependabot for Security Updates (danny-avila#4134) * 🤖 ci: Dependabot for Security Updates (danny-avila#4134) * 🤖 ci: Dependabot for Security Updates (danny-avila#4134) * 🛡️ chore: address several npm vulnerabilities (danny-avila#4151) * chore: bump express to 4.21.0 to address CVE-2024-45590 and CVE-2024-43796 * chore: npm audit fix * chore: uninstall unused `ws` dependency * chore: bump nodemailer to 6.9.15 * chore: bump mongoose to v7.3.3 * chore: bump lint-staged for micromatch upgrade * chore: bump axios to 1.7.7 * chore: npm audit fix for mongodb/mongoose vulns * 👐 a11y: New Chat button - focus, mobile label, collapsed sidebar label (danny-avila#4069) * 🎨 fix: Terms and Conditions Modal Styling (danny-avila#4169) * fix: modal styling issue, where buttons in light mode are not accessible/visible * refactor: use MarkdownLite instead * chore: make inner content accessible * 🖋️ feat: Add option to render User Messages as Markdown (danny-avila#4170) * 🔖 fix: URI Encoding for Bookmarks (danny-avila#4172) * fix: never defined AcceptTermsMutationOptions * fix: lack of URI encoding in tag mutations * 🗂️ fix: Optimize Conversation Grouping and Sorting (danny-avila#4173) * 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(analytics): prevent multiple GTM initializations (danny-avila#4174) * 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 * 📧 feat: LDAP Authentication Enhancement for Email Handling (danny-avila#4177) * 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 <[email protected]> * 📅 fix: Conversation grouping and labeling for prior years (danny-avila#4180) * 👐 style: Improve a11y/theming for Settings Dialog, Dropdown Menus; fix: SearchBar focus issues (danny-avila#4091) * fix: cursor pointer not applying correct in the root component * fix: add cursor-not-allowed to disabled state in SendButton component * feat: update Dropdown to ariakit and changed LLM error's style * feat: switched to ariakit's Dropdown and style improvements * feat: archive updates * refactor: delete conversations in archive * refactor: settings * add cool settings animation * a11y: settings update * style: update settings * style: settings account settings menu; a11y(AccountSettings): switched to AriaKit * a11y: account settings update * style: update my files dialog * fix: tests * chore: remove console.log() --------- Co-authored-by: Danny Avila <[email protected]> * 🧹 fix: Resolve Unarchive Conversation Bug, Archive Pagination (danny-avila#4189) * feat: add cleanup service for 'bugged' conversations (empty/nullish conversationIds) * fix(ArchivedChatsTable): typing and minor styling issues * fix: properly archive conversations * fix: archive convo application crash * chore: remove unused `useEffect` * fix: add basic navigation * chore: typing * 📎 feat: Attachment Handling for `v1/completions` (danny-avila#4205) * refactor: add handling of attachments in v1/completions method * ci: update OpenAIClient.test.js * 🔄 refactor: Apply Config Preset for Model Spec Enforcement (danny-avila#4214) * 🏷️ fix: Ensure modelLabel Field Usage for ModelSpecs/GPTPlugins (danny-avila#4224) * 🏷️ fix: Ensure modelLabel Field Usage for ModelSpecs pt. 2 (danny-avila#4225) * fix: ensure modelSpec presets have endpointType defined, add `modelLabel` to openAISchema * chore: bump rollup due to CVE-2024-47068 * 🧹 chore: bump `vite-plugin-pwa` to `^0.20.5`, and use `overrides` to address CVE-2024-47068 (danny-avila#4226) * chore: bump vite-plugin-pwa to `^0.20.5`, and use `overrides` to address CVE-2024-47068 * chore: bump data-provider version * 🏷️ fix: Ensure `modelLabel` Field Usage for ModelSpecs (custom/openAI endpoints) pt. 3 (danny-avila#4228) * 🚧 chore: merge latest dev build (danny-avila#4288) * 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 * 👷 refactor(removeNullishValues): allow empty strings configured in parameters (danny-avila#4291) * ⚙️ fix: minor issues related to agents (danny-avila#4297) * chore: deprecate `web-browser` tool * fix: edit agent permission * 🔖 fix: bookmark error using CosmosDB - Added `index` to position field in schema (danny-avila#4296) * 🛠️ fix: Remove `expiresAt` field when setting expiry to "never" (danny-avila#4294) * 🪖 refactor: Helm chart release workflow (danny-avila#4311) * 🖼️ fix: Prevent Empty Avatar Source (danny-avila#4321) * 🪨 feat: RAG API Support for AWS Bedrock (danny-avila#4322) * feat: bedrock/agents legacy rag api file processing * refactor: use agent instructions for build message options * 💬 fix: adjust regex in ModelService to recognize o1 models API query for OpenAI returns list of models. Their names are filtered using a regex. The regex did not yet account for model names starting with o1- * 🔨 fix(ToolCall): Check output string type before performing `.toLowerCase()` (danny-avila#4324) * 🧠 feat: Implement O1 Model Support for Max Tokens Handling (danny-avila#4376) * 🔨 fix(AzureOpenAI): o1 model, `stream` parameter check (danny-avila#4381) * 🤖 feat: Enhance Assistant Model Handling for Model Specs (danny-avila#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 * 🪙 feat: Update token value for gpt-4o (danny-avila#4387) * ✨ feat: Add `GOOGLE_LOC` environment variable (danny-avila#4395) * 🕒 feat: Add 5-second timeout for Fetching Model Lists (danny-avila#4423) * refactor: add 5 second timeout for fetching AI provider model lists * ci: fix test due to recent changes * 📦 chore: npm package audit (danny-avila#4424) * chore: bump cookie dependencies * chore: bump express, express-session, express-rate-limit, and all vulnerable `cookie` dependencies * ⬆️ feat: Cancel chat file uploads; fix: Assistant uploads (danny-avila#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 * 🤖 fix: Minor Assistants Issues (danny-avila#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 * 🐋 chore: remove Docker version syntax as its no longer (danny-avila#4375) * 🔃 refactor: rename all server endpoints to use same file names (danny-avila#4364) * 🎨 refactor: UI stlye (danny-avila#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 * 🖼️ feat: Add dat.gui to Artifacts UI libs (danny-avila#4344) * 🧪 chore: raise max temperature to 2 for OpenAI/Custom Endpoints --------- Co-authored-by: Danny Avila <[email protected]> Co-authored-by: Marco Beretta <[email protected]> Co-authored-by: Sebastian Diez <[email protected]> Co-authored-by: Yuichi Oneda <[email protected]> Co-authored-by: Daniel <[email protected]> Co-authored-by: DanielAlt <[email protected]> Co-authored-by: Vesna Tan <[email protected]> Co-authored-by: Riya Amemiya <[email protected]> Co-authored-by: Maxim Bonnaerens <[email protected]> Co-authored-by: bijucyborg <[email protected]> Co-authored-by: normunds-wipo <[email protected]> Co-authored-by: Pranshu Mahajan <[email protected]> Co-authored-by: Jürgen Walter <[email protected]> Co-authored-by: Hanna Daoud <[email protected]> Co-authored-by: Abhijith E A <[email protected]> Co-authored-by: Hongkai Ye <[email protected]> Co-authored-by: Yuki Matsukura <[email protected]> Co-authored-by: adrianfagerland <[email protected]> Co-authored-by: Alex Wegener <[email protected]>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Relevant docs PR: LibreChat-AI/librechat.ai#123
getOptions
function in the Bedrock options file to set credentials to undefined when both access key and secret access key are empty or undefined for non-user provided credentials. This change enables the use of AWS's default credential provider chain.Other changes
getStreamUsage
method of the OpenAIClient by adding an additional check for the existence of theusage
object before accessing its properties. This prevents potential errors when the usage data is not available.Testing
To test these changes:
BEDROCK_AWS_ACCESS_KEY_ID
andBEDROCK_AWS_SECRET_ACCESS_KEY
to ensure the default credential provider chain is used.Test Configuration:
Change Type
Checklist