Commit Graph

4 Commits

Author SHA1 Message Date
AC
3aae552167 Refactor Bedrock API Configuration Check and Improve ChatActions Logging
- Removed redundant Bedrock configuration check in the API handler for cleaner code.
- Enhanced logging in `ChatActions` to provide clearer feedback when an unknown provider ID is encountered, defaulting to OpenAI when necessary.
2025-04-06 21:50:33 +08:00
AC
a5caf98db0 Enhance Bedrock API Logging for Request Details
- Updated logging in the Bedrock API handler to include detailed information about the request model, stream status, and message count for improved debugging and monitoring.
2025-04-06 17:04:55 +08:00
AC
4093e4c500 Improve AWS Bedrock Configuration Error Handling
- Enhanced error messages in `getAwsCredentials` to provide clearer feedback when AWS Bedrock is not configured properly.
- Added checks for missing Bedrock Access Key ID and Secret Access Key, with specific error messages for each case.
2025-04-06 17:03:53 +08:00
AC
fc9688a1f7 feat(bedrock): Integrate AWS Bedrock as a new LLM provider
Adds support for using models hosted on AWS Bedrock, specifically Anthropic Claude models.

Key changes:
- Added '@aws-sdk/client-bedrock-runtime' dependency.
- Updated constants, server config, and auth logic for Bedrock.
- Implemented backend API handler () to communicate with the Bedrock API, handling streaming and non-streaming responses, and formatting output to be OpenAI compatible.
- Updated dynamic API router () to dispatch requests to the Bedrock handler.
- Created frontend client () and updated client factory ().
- Updated  with necessary Bedrock environment variables (AWS keys, region, enable flag) and an example for using  to alias Bedrock models.
2025-04-06 00:46:35 +08:00