fix(skills): update MockLLMProvider schema to resolve validation warnings in Online Research Agent #4330
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.
Description
This PR resolves the
Output validation failedwarnings that appear when running theonline_research_agentin mock mode.Previously, the
MockLLMProviderreturned a generic JSON response that lacked specific keys required by downstream nodes (e.g.,fetch-contentrequiressource_urls,write-reportrequirescitations). While the agent would complete execution, the logs were cluttered with validation errors and "Cleaning failed" messages.This change updates the
MockLLMProviderto return a comprehensive "super-schema" that satisfies the input requirements of all nodes in the agent graph.Type of Change
Related Issues
Fixes #1223
Changes Made
MockLLMProvider.completeinagent.pyto return a fully populated JSON object.research_focussource_urls&fetched_sourceskey_aspects&source_analysisranked_sourceskey_findings&themesreport_content,source_citations, &referencesfinal_reportLLMResponseobject wraps the JSON string correctly.Testing
Manual Verification: Ran the agent in mock mode:
PYTHONPATH=core:exports python3 -m online_research_agent run --topic "AI" --mockResult
Execution completed with
"success": true.Logs are clean of Output validation failed warnings.
"Haiku formatting failed" warnings may still appear (expected without API key), but schema validation now passes.
Screenshots (if applicable)