fix(agent): bound research output size - #160
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
iamjr15
added a commit
that referenced
this pull request
Aug 4, 2026
## Why The post-#160 production trace showed a complete, bounded six-claim research pass with a valid summary. Anthropic respected the array bounds but did not enforce JSON Schema `maxLength`; Mastra post-validation rejected one 1,020-character claim against the 800-character model-facing limit. ## What changed - Remove provider-unreliable string-length constraints from model-facing claim, summary, and report fields. - Keep the working max-items limits for claims and source fan-out. - Keep explicit prompt concision, synthesis token allowance, and strict Exa/Firecrawl provenance validation unchanged. No database, migration, dependency, environment, or deployment-topology changes. ## Verification - `pnpm lint` - `pnpm typecheck` - `pnpm turbo build --force` - `pnpm deadcode` - `pnpm architecture:check` - `pnpm turbo skills:build` Production QA will repeat the complete PDF lifecycle after deployment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The production trace after PR #159 proved that Anthropic native structured output was active, but query passes generated 11-23 exhaustive claims and exhausted the response budget before emitting required fields. Responses were valid JSON prefixes cut off mid-claim or before
summary.What changed
No database, migration, dependency, environment, or deployment-topology changes.
Verification
pnpm lintpnpm typecheckpnpm turbo build --forcepnpm deadcodepnpm architecture:checkpnpm turbo skills:buildAfter deployment, production QA will repeat natural-language and explicit-tool research flows and validate PDF generation, viewing, download, refresh persistence, and
/file recall.