fix: skip credential validation for Bedrock backend (#1011)

Bedrock uses IAM credentials (instance roles, env vars, SSO) resolved
by the AWS SDK at call time, so `provider` is never set during startup.
Exclude it from the post-init validation that checks for missing API keys.

Closes #1009

Co-authored-by: brajul <[email protected]>
Co-authored-by: Illia Polosukhin <[email protected]>
This commit is contained in:
rajulbhatnagar
2026-03-19 23:25:03 -07:00
committed by GitHub
co-authored by brajul Illia Polosukhin
parent e82f4bd2e5
commit c17626160c
+4 -1
View File
@@ -694,7 +694,10 @@ impl AppBuilder {
// Post-init validation: if a non-nearai backend was selected but
// credentials were never resolved (deferred resolution found no keys),
// fail early with a clear error instead of a confusing runtime failure.
if self.config.llm.backend != "nearai" && self.config.llm.provider.is_none() {
if self.config.llm.backend != "nearai"
&& self.config.llm.backend != "bedrock"
&& self.config.llm.provider.is_none()
{
let backend = &self.config.llm.backend;
anyhow::bail!(
"LLM_BACKEND={backend} is configured but no credentials were found. \