mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 22:13:47 +08:00
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.
This commit is contained in:
@@ -59,13 +59,6 @@ export async function handle(
|
||||
|
||||
try {
|
||||
const config = getServerSideConfig();
|
||||
if (!config.isBedrock) {
|
||||
// This check might be redundant due to getAwsCredentials, but good practice
|
||||
return NextResponse.json(
|
||||
{ error: true, msg: "AWS Bedrock is not configured properly" },
|
||||
{ status: 500 },
|
||||
);
|
||||
}
|
||||
|
||||
const bedrockRegion = config.bedrockRegion as string;
|
||||
const bedrockEndpoint = config.bedrockEndpoint;
|
||||
|
||||
Reference in New Issue
Block a user