Mintplex-Labs/anything-llm · error
AWS_BEDROCK_LLM_REGION is required for AWS Bedrock.
Error message
AWS_BEDROCK_LLM_REGION is required for AWS Bedrock.
What it means
Configuration guard thrown by the AWSBedrockLLM constructor: the API key check passed but AWS_BEDROCK_LLM_REGION is empty/unset, so the client cannot determine which AWS region to send Bedrock requests to.
Solutions
- Set the AWS_BEDROCK_LLM_REGION environment variable (e.g. us-east-1).
- Configure the Bedrock region in provider settings.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at provider construction when AWS_BEDROCK_LLM_REGION is missing.
Common situations: AWS Bedrock selected without a region configured.
AI-assisted analysis of Mintplex-Labs/anything-llm@20f6d3546c (2026-08-18).
Data as JSON: /api/errors/bf3b587f9da76e66.
Report an issue: GitHub.
Appendix: source
Thrown at server/utils/AiProviders/bedrock/index.js:65
noSystemPromptModels = [
"amazon.titan-text-express-v1",
"amazon.titan-text-lite-v1",
"cohere.command-text-v14",
"cohere.command-light-text-v14",
"us.deepseek.r1-v1:0",
];
noTemperatureModels = [
"anthropic.claude-opus-4-7",
"anthropic.claude-opus-4-8",
"anthropic.claude-sonnet-5",
];
constructor(embedder = null, modelPreference = null) {
if (!process.env.AWS_BEDROCK_LLM_API_KEY)
throw new Error("AWS_BEDROCK_LLM_API_KEY is required for AWS Bedrock.");
if (!process.env.AWS_BEDROCK_LLM_REGION)
throw new Error("AWS_BEDROCK_LLM_REGION is required for AWS Bedrock.");
this.className = "AWSBedrockLLM";
this.model =
modelPreference || process.env.AWS_BEDROCK_LLM_MODEL_PREFERENCE;
this.region = process.env.AWS_BEDROCK_LLM_REGION;
const contextWindowLimit = this.promptWindowLimit();
this.limits = {
history: Math.floor(contextWindowLimit * 0.15),
system: Math.floor(contextWindowLimit * 0.15),
user: Math.floor(contextWindowLimit * 0.7),
};
this.openai = new OpenAIApi({
apiKey: process.env.AWS_BEDROCK_LLM_API_KEY,
baseURL: openaiBaseURL(this.region),
});
View on GitHub (pinned to 20f6d3546c)