← gitpulse
Bug Fix·Pushed May 1, 2026·S

LLM output validation relaxed to fix CI failures

Large commits were failing validation because the system was enforcing schema bounds that MiniMax never received. The fix lets the action trust LangChain's built-in structured output parsing.

Large commits to this repository were failing in CI with Zod validation errors. The action code was sending a stripped-down JSON schema to MiniMax — one without length constraints — yet then re-validating the model's response against the original schema with strict min/max limits. When the LLM generated a story over 2000 characters or a technicalDescription over 3000, those perfectly valid outputs were rejected. The fix removes the redundant re-validation layer. Instead of parsing against the full [[code ref=2]]ChangesNodeOutputSchema[[/code]] after LangChain returns [[code ref=1]]response.parsed[[/code]], the code now trusts that result directly. Schema bounds continue to function as soft hints — they appear in the field descriptions sent to the model — but they no longer act as hard constraints on the output. This unblocks the large feature commits that were failing precisely when the rich output was most valuable, while maintaining the training signal that helps the model stay within reasonable bounds.
Technical description
This commit fixes a validation mismatch in the action's LLM pipeline. The system uses a Zod schema with length constraints (e.g., [[code ref=2]]ChangesNodeOutputSchema[[/code]] with story.max(2000) and technicalDescription.max(3000)). For MiniMax specifically, these constraints are stripped by [[code ref=3]]stripJsonSchemaConstraints[[/code]] before the schema is sent to the model. The problem: the previous code re-validated LangChain's parsed output against the original bounded schema. MiniMax received a constraint-free schema, generated responses within its own limits, but those responses were then rejected if they exceeded the schema bounds — even though those bounds were never communicated to the model. The change in [[code]]action/src/llm.ts[[/code]] is straightforward: instead of calling [[code]]ChangesNodeOutputSchema.parse(response.parsed)[[/code]], the code now returns [[code ref=1]]response.parsed[[/code]] directly. LangChain's structured output feature already validated the response against the stripped schema MiniMax received. Schema bounds still serve a purpose as soft hints. They appear in the field descriptions sent to the model during training or few-shot prompting, helping the LLM understand the intended output shape. But they are no longer enforced post-hoc in a way that contradicts the actual schema the model worked with. This fixes CI failures that were blocking large commits while preserving the model's ability to generate complete, rich outputs.

Categories

  • Bug Fix (70%)Fixes Zod validation errors that caused large commits to fail CI — removes an unnecessary re-validation step that was rejecting valid LLM outputs
  • CI/CD (20%)Resolves CI failures that were blocking large feature commits while allowing smaller commits to pass
  • Maintenance (10%)Simplifies the validation flow by trusting LangChain's built-in structured output parsing