Commit 0113e8a
fix(onboard): honour process.env BRAVE_API_KEY in createSandbox (#3626)
The other messaging providers fall back to process.env when the
credential store hasn't been written yet, but the Brave token was
resolved only via getCredential(). For direct createSandbox() callers
(tests, custom wrappers) that pass webSearchConfig without first
running configureWebSearch() to persist the key, that dropped a valid
BRAVE_API_KEY env var and then tripped the later "not available in
this process" abort.
Resolve the token with the same env-or-store fallback used elsewhere
and reuse it in the pre-create guard so both call sites stay in sync.
Signed-off-by: Yimo Jiang <yimoj@nvidia.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 723c5dc commit 0113e8a
1 file changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3103 | 3103 | | |
3104 | 3104 | | |
3105 | 3105 | | |
| 3106 | + | |
| 3107 | + | |
3106 | 3108 | | |
3107 | | - | |
3108 | | - | |
3109 | | - | |
3110 | | - | |
3111 | | - | |
3112 | | - | |
3113 | | - | |
| 3109 | + | |
3114 | 3110 | | |
3115 | 3111 | | |
3116 | 3112 | | |
| |||
3539 | 3535 | | |
3540 | 3536 | | |
3541 | 3537 | | |
3542 | | - | |
| 3538 | + | |
3543 | 3539 | | |
3544 | 3540 | | |
3545 | 3541 | | |
| |||
0 commit comments