Skip to content

feat(types): surface structured response parse failures#2315

Open
MukundaKatta wants to merge 4 commits intogoogleapis:mainfrom
MukundaKatta:codex/python-genai-parsed-error
Open

feat(types): surface structured response parse failures#2315
MukundaKatta wants to merge 4 commits intogoogleapis:mainfrom
MukundaKatta:codex/python-genai-parsed-error

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

  • preserve structured-output parse failures on GenerateContentResponse via a new parsed_error field instead of silently dropping them
  • include the underlying validation/json error details and raw response text for easier debugging
  • add direct unit coverage for invalid JSON and schema validation failures

Testing

  • PYTHONPYCACHEPREFIX=/tmp/python-genai-pyc python3 -m py_compile /tmp/python-genai-user/google/genai/types.py /tmp/python-genai-user/google/genai/tests/types/test_types.py
  • python3 -m pytest /tmp/python-genai-user/google/genai/tests/types/test_types.py -k "surfaces_json_parse_error or surfaces_validation_error"

@Venkaiahbabuneelam Venkaiahbabuneelam self-assigned this Apr 22, 2026
@Venkaiahbabuneelam Venkaiahbabuneelam added the size:XL Code changes > 100 lines label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL Code changes > 100 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants