diff --git a/frontend/src/components/LLMSelection/AwsBedrockLLMOptions/index.jsx b/frontend/src/components/LLMSelection/AwsBedrockLLMOptions/index.jsx index ec4a3c6f747..a8f19fb8b50 100644 --- a/frontend/src/components/LLMSelection/AwsBedrockLLMOptions/index.jsx +++ b/frontend/src/components/LLMSelection/AwsBedrockLLMOptions/index.jsx @@ -3,10 +3,11 @@ import { AWS_REGIONS } from "./regions"; import { useState } from "react"; export default function AwsBedrockLLMOptions({ settings }) { - const [useSessionToken, setUseSessionToken] = useState( - settings?.AwsBedrockLLMConnectionMethod === "sessionToken" + const [connectionMethod, setConnectionMethod] = useState( + settings?.AwsBedrockLLMConnectionMethod ?? "iam" ); + console.log("connectionMethod", connectionMethod); return (
{!settings?.credentialsOnly && ( @@ -29,11 +30,11 @@ export default function AwsBedrockLLMOptions({ settings }) {
)} -
+
-
- - IAM - - - - Session Token - -
+
-
- - -
-
- - -
- {useSessionToken && ( + {["iam", "sessionToken"].includes(connectionMethod) && ( + <> +
+ + +
+
+ + +
+ + )} + {connectionMethod === "sessionToken" && (