Skip to content

fix(research): bound nested model synthesis - #167

Merged
iamjr15 merged 1 commit into
mainfrom
fix/research-provider-timeouts
Aug 5, 2026
Merged

fix(research): bound nested model synthesis#167
iamjr15 merged 1 commit into
mainfrom
fix/research-provider-timeouts

Conversation

@iamjr15

@iamjr15 iamjr15 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

Production deep-research runs repeatedly failed in the per-query synthesis step after Anthropic returned HTTP 524. Each pass sent a large evidence pack with the default 4,096-token output budget, and the synthesis stage allowed 8,192 tokens.

What changed

  • Bound Exa and Firecrawl evidence included in each model pass.
  • Use stage-appropriate 2,048-token pass and 4,096-token final synthesis budgets.
  • Bound every nested research generation to 75 seconds.
  • Retry one transient timeout, rate-limit, or 5xx failure in memory while preserving parent cancellation.
  • Emit a structured warning when that retry is used.
  • Document the request-scoped retry and non-persistence boundary.

Architecture and data

No schema, migration, environment, vendor, or deployment-topology changes. BYOK credentials remain request-scoped and no Mastra workflow snapshot contains secret-bearing state.

Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm turbo build --force
  • pnpm deadcode
  • pnpm architecture:check
  • pnpm turbo skills:build
  • Production Worker trace reproduced the original HTTP 524 twice before the fix.

The repository pins Node 24.18.0; local verification ran on Node 26.4.0 and emitted only the existing engine warning.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
cheatcode Skipped Skipped Aug 5, 2026 5:50am

@iamjr15
iamjr15 merged commit ac4cde7 into main Aug 5, 2026
6 checks passed
@iamjr15
iamjr15 deleted the fix/research-provider-timeouts branch August 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant