feat(media): Vertex AI (Google) speech, transcription, music & video generation - #3929
Merged
diegosouzapw merged 3 commits intoJun 15, 2026
Conversation
…deo generation The dedicated media endpoints (/v1/audio/speech, /v1/audio/transcriptions, /v1/music/generations, /v1/videos/generations) only supported third-party providers (kie/suno/minimax/openai/deepgram/...). Google/Vertex was absent, so any vertex/* media model was rejected with 'Invalid model. Use format: provider/model' even though the format was correct. Adds a 'vertex' provider to the video, music, speech and transcription registries plus a shared open-sse/executors/vertexMedia.ts client that reuses the Vertex chat auth (Service Account JSON -> OAuth bearer, or Express API key) and implements the verified Vertex contracts: Gemini TTS (generateContent + responseModalities:[AUDIO] -> PCM wrapped as WAV), Gemini transcription (generateContent with inline audio), Lyria music (predict), and Veo video (predictLongRunning + fetchPredictOperation poll). All four contracts verified live against Vertex AI. Unit tests (tests/unit/vertex-media.test.ts) cover URL building (SA vs Express), WAV wrapping, request payload shapes, and the Veo submit->poll flow.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…x-media-generation
…anches PR diegosouzapw#3929 own growth: audioSpeech.ts 952->965, videoGeneration.ts 1026->1078 (vertex/* media branches). Core logic lives in vertexMedia.ts (under cap). Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
Owner
|
Thanks, @artickc! 🙏 Solid feature — Vertex AI media across all 4 endpoints (Gemini 2.5 TTS → WAV, transcription, Lyria 2 music, Veo 3.x video via predictLongRunning poll), reusing the existing Vertex SA/Express auth. The shared |
Merged
diegosouzapw
added a commit
that referenced
this pull request
Jun 16, 2026
OmniRoute v3.8.26 — see CHANGELOG.md [3.8.26] for the full notes. Highlights: Vertex AI media generation (#3929), GLM-5.2 effort-tier routing (#3885), sticky round-robin combos (#3846), OpenRouter connection presets (#3878), compression prompt-cache fix (#3936/#3890), and a security pass (form-data/vite + workflow hardening, #3949). Co-authored-by: artickc <artickc@users.noreply.github.com> Co-authored-by: rdself <rdself@users.noreply.github.com> Co-authored-by: herjarsa <herjarsa@users.noreply.github.com> Co-authored-by: Jack Smith <16862258+YunyunZhai@users.noreply.github.com> Co-authored-by: dhaern <dhaern@users.noreply.github.com> Co-authored-by: adivekar-utexas <adivekar-utexas@users.noreply.github.com> Co-authored-by: megamen32 <megamen32@users.noreply.github.com> Co-authored-by: zhiru <zhiru@users.noreply.github.com> Co-authored-by: insoln <insoln@users.noreply.github.com> Co-authored-by: diego-anselmo <diego-anselmo@users.noreply.github.com>
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
OmniRoute v3.8.26 — see CHANGELOG.md [3.8.26] for the full notes. Highlights: Vertex AI media generation (diegosouzapw#3929), GLM-5.2 effort-tier routing (diegosouzapw#3885), sticky round-robin combos (diegosouzapw#3846), OpenRouter connection presets (diegosouzapw#3878), compression prompt-cache fix (diegosouzapw#3936/diegosouzapw#3890), and a security pass (form-data/vite + workflow hardening, diegosouzapw#3949). Co-authored-by: artickc <artickc@users.noreply.github.com> Co-authored-by: rdself <rdself@users.noreply.github.com> Co-authored-by: herjarsa <herjarsa@users.noreply.github.com> Co-authored-by: Jack Smith <16862258+YunyunZhai@users.noreply.github.com> Co-authored-by: dhaern <dhaern@users.noreply.github.com> Co-authored-by: adivekar-utexas <adivekar-utexas@users.noreply.github.com> Co-authored-by: megamen32 <megamen32@users.noreply.github.com> Co-authored-by: zhiru <zhiru@users.noreply.github.com> Co-authored-by: insoln <insoln@users.noreply.github.com> Co-authored-by: diego-anselmo <diego-anselmo@users.noreply.github.com>
Poid-ZA
pushed a commit
to Poid-ZA/OmniRoute
that referenced
this pull request
Aug 5, 2026
OmniRoute v3.8.26 — see CHANGELOG.md [3.8.26] for the full notes. Highlights: Vertex AI media generation (diegosouzapw#3929), GLM-5.2 effort-tier routing (diegosouzapw#3885), sticky round-robin combos (diegosouzapw#3846), OpenRouter connection presets (diegosouzapw#3878), compression prompt-cache fix (diegosouzapw#3936/diegosouzapw#3890), and a security pass (form-data/vite + workflow hardening, diegosouzapw#3949). Co-authored-by: artickc <artickc@users.noreply.github.com> Co-authored-by: rdself <rdself@users.noreply.github.com> Co-authored-by: herjarsa <herjarsa@users.noreply.github.com> Co-authored-by: Jack Smith <16862258+YunyunZhai@users.noreply.github.com> Co-authored-by: dhaern <dhaern@users.noreply.github.com> Co-authored-by: adivekar-utexas <adivekar-utexas@users.noreply.github.com> Co-authored-by: megamen32 <megamen32@users.noreply.github.com> Co-authored-by: zhiru <zhiru@users.noreply.github.com> Co-authored-by: insoln <insoln@users.noreply.github.com> Co-authored-by: diego-anselmo <diego-anselmo@users.noreply.github.com>
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…generation (diegosouzapw#3929) Integrated into release/v3.8.26
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
OmniRoute v3.8.26 — see CHANGELOG.md [3.8.26] for the full notes. Highlights: Vertex AI media generation (diegosouzapw#3929), GLM-5.2 effort-tier routing (diegosouzapw#3885), sticky round-robin combos (diegosouzapw#3846), OpenRouter connection presets (diegosouzapw#3878), compression prompt-cache fix (diegosouzapw#3936/diegosouzapw#3890), and a security pass (form-data/vite + workflow hardening, diegosouzapw#3949). Co-authored-by: artickc <artickc@users.noreply.github.com> Co-authored-by: rdself <rdself@users.noreply.github.com> Co-authored-by: herjarsa <herjarsa@users.noreply.github.com> Co-authored-by: Jack Smith <16862258+YunyunZhai@users.noreply.github.com> Co-authored-by: dhaern <dhaern@users.noreply.github.com> Co-authored-by: adivekar-utexas <adivekar-utexas@users.noreply.github.com> Co-authored-by: megamen32 <megamen32@users.noreply.github.com> Co-authored-by: zhiru <zhiru@users.noreply.github.com> Co-authored-by: insoln <insoln@users.noreply.github.com> Co-authored-by: diego-anselmo <diego-anselmo@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The dedicated media-generation endpoints only recognized third-party providers in their
registries:
/v1/videos/generations→ kie, haiper, leonardo, pollinations, minimax, together, replicate, comfyui, sdwebui, veoaifree-web, runwayml/v1/music/generations→ kie, suno, udio, minimax, comfyui/v1/audio/speech&/v1/audio/transcriptions→ openai, deepgram, groq, elevenlabs, …Google/Vertex was absent from all of them. So any
vertex/*media model (Veo, Lyria,Gemini TTS / native-audio) was rejected with
Invalid <kind> model: vertex/... Use format: provider/model— even though the format was already correct. The provider simply wasn'tsupported for those media types, while it is fully supported through Vertex AI.
Changes
open-sse/executors/vertexMedia.ts(new): a shared Vertex media client that reuses theVertex chat executor's auth (
parseSAFromApiKey/getAccessTokenfor Service Account JSON →OAuth bearer, or Express API key via
?key=) and implements the verified contracts:{model}:generateContentwithresponseModalities:["AUDIO"]+speechConfig,returning PCM L16 which is wrapped into a WAV container.
{model}:generateContentwith inline audio + a transcribe instruction.{model}:predict→predictions[0].bytesBase64Encoded(WAV).{model}:predictLongRunning→ poll{model}:fetchPredictOperationuntildone→response.videos[0].bytesBase64Encoded(MP4).vertexprovider tovideoRegistry(Veo 3.0/2.0),musicRegistry(Lyria 2), and
audioRegistryspeech (Gemini 2.5 TTS) + transcription (Gemini 2.5/2.0).vertex-veo,vertex-lyria,vertex-gemini-tts, andvertex-geminiformat branches to the respective handlers, returning the standard OpenAI-like shapes
(
{created, data:[{b64_json, format}]}for video/music; audio stream for speech;{text}for transcription).
Because all four reuse
getProviderCredentials("vertex"), an existing Vertex connection (SAJSON or Express key) now serves media generation with no extra configuration.
Verification
All four contracts were validated live against Vertex AI with a real Service Account:
gemini-2.5-flash-preview-tts)gemini-2.5-flash)lyria-002:predict)veo-3.0-fast-generate-001:predictLongRunning)Unit tests in
tests/unit/vertex-media.test.ts(7 tests, all pass) cover WAV wrapping, theSA-project vs Express
?key=URL building, request payload shapes for each modality, and theVeo submit→poll→result flow (fetch mocked). The existing media handler/registry suites
(
registry-utils,video-generation-handler,music-generation-handler,audio-speech-handler,new-content-providers,registry-direct-exports) still pass (104/104).Notes
?key=) — best-effort;the Service Account JSON path is fully verified.
veo-3.1-fast-generate-previewis not GA in all projects;veo-3.0-*are used as thedefault registry entries.