Skip to content

fix: add MALFORMED_RESPONSE to FinishReason - #2947

Open
rksharma-owg wants to merge 2 commits into
googleapis:mainfrom
rksharma-owg:codex/add-malformed-response-finish-reason
Open

rksharma-owg wants to merge 2 commits into
googleapis:mainfrom
rksharma-owg:codex/add-malformed-response-finish-reason

Conversation

@rksharma-owg

Copy link
Copy Markdown

Fixes #2937

Summary

  • add the API-returned MALFORMED_RESPONSE value to the public FinishReason enum
  • add a regression test covering enum access and deserialization

Validation

  • .venv/bin/pytest -q google/genai/tests/types/test_types.py -k malformed_response (1 passed)
  • python -m compileall -q google/genai
  • git diff origin/main --check

Before this change, the regression test failed with AttributeError because the public enum member was missing.

@rksharma-owg rksharma-owg changed the title Add MALFORMED_RESPONSE to FinishReason fix: add MALFORMED_RESPONSE to FinishReason Sep 8, 2026
@Venkaiahbabuneelam Venkaiahbabuneelam self-assigned this Sep 9, 2026
@Venkaiahbabuneelam Venkaiahbabuneelam added the size:M Code changes between 10-40 lines label Sep 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M Code changes between 10-40 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FinishReason enum is missing MALFORMED_RESPONSE, which the API actually returns

2 participants