BoundaryML/baml · error
AWS Bedrock support was not compiled into this build…
Error message
AWS Bedrock support was not compiled into this build (enable the `bedrock` feature)
What it means
BAML compiles AWS Bedrock support behind the optional `bedrock` cargo feature. When a config declares an aws-bedrock client but the runtime binary was built without that feature, dynamic client construction bails with this message. The configuration itself may be fine; the build simply lacks the provider.
Solutions
- Use a BAML build/distribution compiled with the `bedrock` feature enabled.
- Build BAML from source with `--features bedrock`.
- Switch the prompt's client provider to one available in your build (e.g. openai, anthropic, google-ai).
- Check your installed binding's feature set / docs to confirm Bedrock support before configuring it.
Example fix
// before cargo build -p baml-runtime --no-default-features // after cargo build -p baml-runtime --features bedrock
Defensive patterns
Strategy: fallback
Validate before calling
// Detect support before configuring
const supportsBedrock = /* runtime feature check or docs */ true;
if (clientProvider === 'aws-bedrock' && !supportsBedrock) throw new Error('This BAML build lacks the `bedrock` feature; use another provider or a Bedrock-enabled build.'); Try / catch
try { await b.MyPrompt(...) } catch (e) { if (String(e).includes('not compiled into this build')) { /* switch to openai/anthropic client or reinstall a bedrock-enabled build */ } else throw e; } Prevention
- Confirm your BAML distribution includes the `bedrock` feature before using aws-bedrock providers.
- Build from source with --features bedrock if needed.
- Keep a non-Bedrock fallback client in your generator config.
When it happens
Trigger: Using a BAML runtime build compiled without the `bedrock` feature (e.g. a language client distribution that excludes Bedrock) while a prompt's client block specifies provider "aws-bedrock".
Common situations: Installing a prebuilt baml language-client package that ships without Bedrock support, or building BAML from source with default features and then pointing a project at Bedrock; also happens in some Python/Node bindings built for size.
Related errors
- artifact not found: (expected at )
- AWS Bedrock does not support audio media type
- AWS Bedrock only supports text blocks for system messages…
- BAML internal error (AWSBedrock): file should have been…
- BAML internal error (AWSBedrock): Pdf file should have been…
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/ca313322e7da1c87.
Report an issue: GitHub.
Appendix: source
Thrown at engine/baml-runtime/src/internal/llm_client/primitive/mod.rs:150
OpenAIClientProviderVariant::Generic => {
OpenAIClient::dynamic_new_generic(value, ctx).map(Into::into)
}
OpenAIClientProviderVariant::Responses => {
OpenAIClient::dynamic_new_responses(value, ctx).map(Into::into)
}
OpenAIClientProviderVariant::Transcriptions => {
OpenAIClient::dynamic_new_transcriptions(value, ctx).map(Into::into)
}
OpenAIClientProviderVariant::OpenRouter => {
OpenAIClient::dynamic_new_openrouter(value, ctx).map(Into::into)
}
}
}
ClientProvider::Anthropic => AnthropicClient::dynamic_new(value, ctx).map(Into::into),
#[cfg(feature = "bedrock")]
ClientProvider::AwsBedrock => AwsClient::dynamic_new(value, ctx).map(Into::into),
#[cfg(not(feature = "bedrock"))]
ClientProvider::AwsBedrock => anyhow::bail!(
"AWS Bedrock support was not compiled into this build (enable the `bedrock` feature)"
),
ClientProvider::GoogleAi => GoogleAIClient::dynamic_new(value, ctx).map(Into::into),
ClientProvider::Vertex => VertexClient::dynamic_new(value, ctx).map(Into::into),
ClientProvider::Strategy(strategy_client_provider) => {
unimplemented!(
"Strategy client providers are not supported yet in LLMPrimitiveProvider"
)
} // "openai" => OpenAIClient::dynamic_new(value, ctx).map(Into::into),
// "openai-generic" => OpenAIClient::dynamic_new_generic(value, ctx).map(Into::into),
// "azure-openai" => OpenAIClient::dynamic_new_azure(value, ctx).map(Into::into),
// "ollama" => OpenAIClient::dynamic_new_ollama(value, ctx).map(Into::into),
// "anthropic" => AnthropicClient::dynamic_new(value, ctx).map(Into::into),
// "google-ai" => GoogleAIClient::dynamic_new(value, ctx).map(Into::into),
// "vertex-ai" => VertexClient::dynamic_new(value, ctx).map(Into::into),
// // dynamic_new is not implemented for aws::AwsClient
// other => {
// let options = [View on GitHub (pinned to bd85ce9dee)