Skip to content

fix: handle legacy Lyria output accessors#2561

Open
he-yufeng wants to merge 1 commit into
googleapis:mainfrom
he-yufeng:fix/legacy-lyria-output-accessors
Open

fix: handle legacy Lyria output accessors#2561
he-yufeng wants to merge 1 commit into
googleapis:mainfrom
he-yufeng:fix/legacy-lyria-output-accessors

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • detect legacy Lyria responses when Vertex returns a full model resource path
  • rewrite legacy outputs into modern steps for that path
  • make output_image, output_audio, and output_video tolerate missing steps, matching the existing output_text behavior

Fixes #2534.

Verification

$env:PYTHONPATH='.'; python -m pytest google\genai\tests\interactions\test_legacy_lyria.py -q
python -m py_compile google\genai\_interactions\_legacy_lyria.py google\genai\_interactions\types\interaction.py google\genai\tests\interactions\test_legacy_lyria.py
python -m ruff check --select E9,F63,F7,F82 google\genai\_interactions\_legacy_lyria.py google\genai\_interactions\types\interaction.py google\genai\tests\interactions\test_legacy_lyria.py
python -m ruff format --diff google\genai\tests\interactions\test_legacy_lyria.py
git diff --check

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

output_audio crashes with TypeError when Vertex AI returns legacy Lyria response (steps=None); output_text has the fix but output_audio doesn't

1 participant