Skip to content

fix(agent): allow research structured output - #158

Merged
iamjr15 merged 1 commit into
mainfrom
fix/research-structured-output
Aug 4, 2026
Merged

fix(agent): allow research structured output#158
iamjr15 merged 1 commit into
mainfrom
fix/research-structured-output

Conversation

@iamjr15

@iamjr15 iamjr15 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Why

Production acceptance on the bounded research workflow exposed a second, distinct failure. Both Exa and Firecrawl credentials were present and the provider evidence calls completed, but concurrent Claude Sonnet 5 research passes returned {} and failed ResearchPassDraftSchema validation.

The live Worker trace showed STRUCTURED_OUTPUT_SCHEMA_VALIDATION_FAILED for missing claims and summary. toolChoice: "none" disabled not only Cheatcode's agent tools but also the Anthropic/AI SDK internal structured-output mechanism.

What changed

  • expose an empty activeTools set to each research/synthesis pass
  • stop forcing toolChoice: "none", allowing the provider's schema-output channel to operate

This remains a tool-free nested agent pass: no Cheatcode tool can be called. Only the model provider's internal structured-output transport remains available.

Architecture and migration effects

  • no database, environment, dependency, or migration changes
  • no change to provider evidence collection, citation validation, PDF packaging, or persistence

Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm turbo build --force
  • pnpm deadcode
  • pnpm architecture:check
  • pnpm turbo skills:build

Production diagnosis evidence:

  • exact deployed parent SHA: 4b2d3f311522794725681114c1aade155317aa05
  • natural-language and explicit single-call reproductions
  • both provider keys reported configured
  • no Cloudflare subrequest exhaustion or workflow retry storm
  • exact error: STRUCTURED_OUTPUT_SCHEMA_VALIDATION_FAILED, value {}

Production acceptance will be repeated against the exact merged SHA after deployment.

@vercel

vercel Bot commented Aug 4, 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 4, 2026 10:11pm

@iamjr15
iamjr15 merged commit a5f3c02 into main Aug 4, 2026
6 checks passed
@iamjr15
iamjr15 deleted the fix/research-structured-output branch August 4, 2026 22:13
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