Skip to content

fix(py/plugins/google-genai): type the speech config, trim dead Lyria helpers - #6326

Open
hilariie wants to merge 1 commit into
feat/py-google-genai-virtual-try-onfrom
fix/py-google-genai-config-surfaces
Open

hilariie wants to merge 1 commit into
feat/py-google-genai-virtual-try-onfrom
fix/py-google-genai-config-surfaces

Conversation

@hilariie

@hilariie hilariie commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #6185

Stacked on #6353.

Summary

SpeechConfigSchema had no model_config at all, so beyond the two camelCase fields in the issue it also dropped every snake_case key, including the form py/samples/google-genai-media sends for its voice. It now types voiceConfig,
multiSpeakerVoiceConfig and languageCode, matching the SDK's SpeechConfig, and the five orphaned exclude=True fields left on it are gone. One behaviour change: an unknown key nested under speechConfig used to be dropped silently and now raises INVALID_ARGUMENT, since it reaches the SDK's extra='forbid' type.

models/lyria.py still carried its own LyriaConfig and LyriaVersion, unused and now shadowing the Interactions ones that #6241 exports. It keeps only is_lyria_model, which routing needs.

The issue's ImagenConfigSchema bullet is covered by #6305 in the base of this stack, which retires Imagen from Python outright.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the Gemini and Imagen configuration schemas by introducing detailed Pydantic schemas and JSON schema annotations. Specifically, it adds support for multi-speaker voice configurations and language codes in Gemini TTS, and explicitly defines numerous configuration fields for Imagen (such as aspect ratio, negative prompt, guidance scale, and safety settings). Additionally, the Lyria model module was refactored to only handle model detection, offloading its configuration and version definitions to the interactions module. Comprehensive unit tests were added to validate the new TTS speech configurations, Imagen configuration mapping, and the package's public API surface. I have no feedback to provide as there are no review comments.

@hilariie
hilariie force-pushed the fix/py-google-genai-config-surfaces branch from 0b12e67 to 5c542b2 Compare September 15, 2026 10:49
@hilariie
hilariie marked this pull request as draft September 18, 2026 10:26
@hilariie
hilariie force-pushed the fix/py-google-genai-config-surfaces branch from 5c542b2 to f9eca64 Compare September 18, 2026 13:03
… helpers

SpeechConfigSchema had no model_config, so extra='ignore' dropped
multiSpeakerVoiceConfig, languageCode and every snake_case key including the
one our own TTS sample sends. models/lyria.py still carried a second
LyriaConfig and LyriaVersion that nothing used now that Interactions owns them;
only is_lyria_model is left.
@hilariie
hilariie force-pushed the fix/py-google-genai-config-surfaces branch from f9eca64 to 05be4cd Compare September 18, 2026 13:22
@github-actions github-actions Bot added docs Improvements or additions to documentation config labels Sep 18, 2026
@hilariie hilariie changed the title fix(py/plugins/google-genai): type the speech and Imagen configs, trim dead Lyria helpers fix(py/plugins/google-genai): type the speech config, trim dead Lyria helpers Sep 18, 2026
@hilariie
hilariie changed the base branch from main to feat/py-google-genai-virtual-try-on September 18, 2026 13:23
@hilariie
hilariie marked this pull request as ready for review September 18, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config docs Improvements or additions to documentation fix python Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(py/plugins/google-genai): SpeechConfigSchema drops fields, ImagenConfigSchema is empty, Lyria is dead code but exported

1 participant