feat(python-sdk): add OpenRouter audio output and music generation (#465)#478
Merged
santoshkumarradha merged 1 commit intodev/add-videofrom Apr 18, 2026
Merged
Conversation
Contributor
Performance
✓ No regressions detected |
Contributor
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
Contributor
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
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
OpenRouterProvider.generate_audio()with SSE streaming: parseschoices[0].delta.audio.database64 chunks and transcript text from OpenRouter chat completions APIgenerate_music()toMediaProviderABC (raisesNotImplementedErrorby default) and implement inOpenRouterProviderusing same SSE pattern with music-capable models (e.g.google/lyria-3-pro)ai_generate_music()convenience method toAgentAImixin andAgentclassOpenRouterProvider.supported_modalitiesto["image", "audio", "music"]Test plan
test_openrouter_audio.pycovering SSE parsing, chunk concatenation, transcript extraction, model prefix stripping, format/voice validation, error handling, ABC default behavior, modality checks, and AgentAI delegationtest_openrouter_audio_is_not_supportedtotest_openrouter_audio_requires_api_keyruff checkandruff formatclean