Fix local browser startup ECONNREFUSED in CI
Merged
MO
7mo ago+175+175+012345678901234567890123456789-10-10-01234567890123456789
Why
Local Chromium startup in CI intermittently fails with ECONNREFUSED before tests ever reach their real assertions. The failures reproduce on a clean branch off main, so this PR is focused only on hardening local browser/session startup.
What changed
- retries the full local
V3.init()launch-and-connect path for transient startup failures instead of failing immediately on the first refused connection - adds failure-only launch diagnostics so if the flake returns we capture Chrome stdout/stderr plus devtools endpoint state
- limits the retry logic to local browser startup so Browserbase-backed sessions are unaffected
Summary by cubic
Hardens CI by retrying and verifying local Chromium startup to reduce ECONNREFUSED flakes. Enables strict structured outputs across supported AI SDK providers.
-
Bug Fixes
- Retries local browser init once in CI on ECONNREFUSED/ECONNRESET and CDP-connect errors; waits and cleans up between attempts.
- Installs stable Chrome via
browser-actions/setup-chromeand runs a preflight launch check before server-v3 integration and local E2E tests, passingCHROME_PATHto the verifier.
-
New Features
- Enables strict structured outputs: sets
strict: trueinOpenAIClientjson_schemaand adds provider options foropenai,azure,google,vertex,anthropic,groq,cerebras, andmistral. - Adds unit tests for AI SDK provider options; publishes a patch to
@browserbasehq/stagehand.
- Enables strict structured outputs: sets