Skip to content

feat(a2a): add Pydantic-based structured response parsing and integration tests#30

Draft
sriaradhyula wants to merge 1 commit intomainfrom
feat/pydantic-structured-response-parsing
Draft

feat(a2a): add Pydantic-based structured response parsing and integration tests#30
sriaradhyula wants to merge 1 commit intomainfrom
feat/pydantic-structured-response-parsing

Conversation

@sriaradhyula
Copy link
Copy Markdown
Member

Implement Pydantic models for structured response parsing to improve type safety and validation in A2A client responses.

Changes

  • Added Pydantic models: PlatformEngineerResponse, JarvisResponse, InputField, and Metadata
  • Enhanced parse_structured_response() to validate responses using Pydantic models
  • Added DataPart handling for structured JSON responses in artifacts
  • Implemented _strip_embedded_json() helper to clean mixed text/JSON
  • Improved UserInputMetaData parsing with backward compatibility
  • Added integration tests for complete result artifact handling
  • Added integration tests for improved JSON filtering with spaced field names

Benefits

  • Type-safe response handling with schema validation
  • Better support for multiple agent response formats
  • Improved error handling and debugging
  • Cleaner text output by stripping embedded JSON

…tion tests

- Add Pydantic models for structured response parsing
- Improve UserInputMetaData parsing with backward compatibility
- Add integration tests for complete result artifact handling
- Add integration tests for improved JSON filtering with spaced field names

Signed-off-by: Sri Aradhyula <sraradhy@cisco.com>
@github-actions
Copy link
Copy Markdown

Thank you for your contribution! This PR has been automatically marked as stale because it has no recent activity in the last 60 days. It will be closed in 7 days, if no further activity occurs. If this pull request is still relevant, please leave a comment to let us know, and the stale label will be automatically removed.

@github-actions github-actions bot added the stale label Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant