adk-samples
adk-samples copied to clipboard
fix issue #672: auto-select native audio model name based on API platform
Fixed model name selection for native audio models to work with both Gemini Live API and Vertex AI Live API.
Changes:
- Added automatic model name detection based on GOOGLE_GENAI_USE_VERTEXAI environment variable
- Uses gemini-2.5-flash-native-audio-preview-09-2025 for Gemini Live API
- Uses gemini-live-2.5-flash-preview-native-audio-09-2025 for Vertex AI
- Added generate_content_config parameter to Agent
This prevents "model not found" errors when using native audio models by ensuring the correct model name format is used for each API platform.