From c17626160ce956a5e7c64a59b3e65c1801fee21f Mon Sep 17 00:00:00 2001 From: rajulbhatnagar Date: Thu, 19 Mar 2026 23:25:03 -0700 Subject: [PATCH] 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 Co-authored-by: Illia Polosukhin --- src/app.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index f9e43458..729d2269 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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. \