Uh oh!
There was an error while loading. Please reload this page.
fix: Gemini 3.1 Flash Lite JSON robustness and structured output coercion - #139
Closed
82deutschmark wants to merge 18 commits into
Closed
fix: Gemini 3.1 Flash Lite JSON robustness and structured output coercion#13982deutschmark wants to merge 18 commits into
82deutschmark wants to merge 18 commits into
Conversation
- CreateScheduleTask: handle both 'server_iso_utc' (web) and 'timestamp' (CLI) keys in start_time.json with clear error if neither present - EnrichLeversTask: fix lever.id -> lever.lever_id in error handler (same class of bug as PR PlanExeOrg#130) - Add CLI pipeline guide (docs/cli_pipeline_guide.md) - Add Gemini 3.1 Flash Lite Preview config for OpenRouter
82deutschmark
commented
Mar 6, 2026
CollaboratorAuthor
Closing per Simon's review. Splitting into focused PRs: PR #142 (options validator) and a separate json_repair PR (coming next). Addresses all feedback: no hardcoded models, no LLMExecutor state mutation, proper deps, with tests. |
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 freeto 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.
Summary
Fix structural issues with Gemini 3.1 Flash Lite JSON output that cause task failures in PlanExe pipeline. Implements centralized JSON repair utilities, Pydantic field validators for type coercion, and robust error recovery paths.
Bugs Fixed
EnrichLeversTask — Gemini 3.1 returns JSON with trailing commas and incorrect top-level keys. Added schema validation and centralized JSON repair utility.
GovernancePhase2BodiesTask — Scalar fields (decision_rights, meeting_cadence) returned as lists instead of strings. Fixed with Pydantic field_validator coercion.
PreProjectAssessmentTask — Expert feedback items missing or malformed. Fixed via validator patches and structured output guards.
IdentifyDocumentsTask — LLM interaction failures with no fallback path. Added JSON repair wrapper, fallback lane support, and artifact logging for diagnostics.
Changes
Testing
Full pipeline acceptance run (Gemini 3.1 Flash Lite) completes with 63 tasks, 0 failures. All repair paths exercised and validated.