Skip to content

Fail closed on a missing provider key instead of sending an unauthenticated request - #2566

Merged
steve8708 merged 1 commit into
mainfrom
changes-544
Aug 1, 2026
Merged

Fail closed on a missing provider key instead of sending an unauthenticated request#2566
steve8708 merged 1 commit into
mainfrom
changes-544

Fail closed on a missing provider key instead of sending an unauthent…

95506a3
Select commit
Loading
Failed to load commit list.
Builder.io Integration / Review Agent completed Aug 1, 2026 in 7m 13s

All clear

Code Review Summary

PR #2566 addresses two reliability failures in the core agent runtime. First, AISDKEngine now fails closed with missing_credentials before constructing a provider or sending a request when a required provider key is absent, while preserving keyless custom baseUrl gateways and providers such as Ollama. Second, stale-run recovery distinguishes in-process background automations from HTTP-redispatchable runs: payload-less runs receive the wider background stale window and are reported as not_redispatchable rather than implying payload loss.

This is a high-risk change because it affects credential handling and background-run recovery, but the implementation is consistent with the existing engine error contract and run-store recovery flow. The regression tests cover missing keys, explicit keys, custom gateways, and both stale-window variants. Independent reviews found no confirmed bugs or compatibility issues.

✅ Good patterns: fail-closed behavior avoids unauthenticated provider requests; the baseUrl exemption is explicit; stale recovery semantics are documented and tested; diagnostic naming now reflects the actual condition.

🧪 Browser testing: Skipped — PR only modifies backend/config/docs/tests, no UI impact