Skip to content

Add MiniMax music generation provider#789

Open
octo-patch wants to merge 1 commit into
Agent-Field:mainfrom
octo-patch:octo/20260717-multimodal-music-tool-recvpz1iX60Iez-v2
Open

Add MiniMax music generation provider#789
octo-patch wants to merge 1 commit into
Agent-Field:mainfrom
octo-patch:octo/20260717-multimodal-music-tool-recvpz1iX60Iez-v2

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Add MiniMax music generation to the media provider registry.

Implemented global and China endpoint routing, Bearer authentication, request controls, output formats, and response parsing for MiniMax music generation.

Checks: python3 -m py_compile sdk/python/agentfield/media_providers.py; PYTHONPATH=sdk/python pytest -q sdk/python/tests/test_media_providers.py -q

@octo-patch
octo-patch requested review from a team and AbirAbbas as code owners July 17, 2026 02:51
@CLAassistant

CLAassistant commented Jul 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution. The provider wiring is straightforward, but there’s one SDK contract break that needs fixing before this is safe to merge.

Please also add tests for the new music path, especially the output_format="url" and output_format="hex" branches. Right now the PR description mentions local checks, but there is no repo test coverage for this provider yet.

Separately, the CLA check is still pending, so that will need to be signed before we can merge.

if response.status >= 400 or data.get("base_resp", {}).get("status_code") != 0:
raise RuntimeError(f"MiniMax music generation failed ({response.status}): {data}")
audio = data.get("data", {}).get("audio")
output = AudioOutput(data=audio if audio and body["output_format"] == "hex" else None, format=body.get("audio_setting", {}).get("format", "mp3"), url=audio if body["output_format"] == "url" else None)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AudioOutput.data is base64-encoded audio bytes everywhere else in the SDK, but this branch stores MiniMax's raw hex string directly. That means helpers like AudioOutput.get_bytes() and .save() will try to base64-decode hex and produce the wrong bytes or fail.

Can we decode the hex payload to bytes here and then re-encode it as base64 before constructing AudioOutput?

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.

3 participants