feat(lighthouse): Support Amazon Bedrock Long-Term API Key (#9343)

Co-authored-by: Chandrapal Badshah <12944530+Chan9390@users.noreply.github.com>
This commit is contained in:
Chandrapal Badshah
2025-12-03 16:19:18 +01:00
committed by GitHub
co-authored by Chandrapal Badshah
parent cb84bd0f94
commit 26fd7d3adc
14 changed files with 1765 additions and 658 deletions
@@ -4,18 +4,42 @@ import { useSearchParams } from "next/navigation";
import { Suspense } from "react";
import { ConnectLLMProvider } from "@/components/lighthouse/connect-llm-provider";
import { SelectBedrockAuthMethod } from "@/components/lighthouse/select-bedrock-auth-method";
import type { LighthouseProvider } from "@/types/lighthouse";
const BEDROCK_AUTH_MODES = {
IAM: "iam",
API_KEY: "api_key",
} as const;
type BedrockAuthMode =
(typeof BEDROCK_AUTH_MODES)[keyof typeof BEDROCK_AUTH_MODES];
function ConnectContent() {
const searchParams = useSearchParams();
const provider = searchParams.get("provider") as LighthouseProvider | null;
const mode = searchParams.get("mode") || "create";
const auth = searchParams.get("auth") as BedrockAuthMode | null;
if (!provider) {
return null;
}
return <ConnectLLMProvider provider={provider} mode={mode} />;
const isBedrockCreateMode = provider === "bedrock" && mode !== "edit";
if (isBedrockCreateMode && !auth) {
return <SelectBedrockAuthMethod />;
}
const initialAuthMode = isBedrockCreateMode && auth ? auth : undefined;
return (
<ConnectLLMProvider
provider={provider}
mode={mode}
initialAuthMode={initialAuthMode}
/>
);
}
export default function ConnectLLMProviderPage() {