Skip to content

fix(omni): use input_audio for --audio on OpenAI-compatible endpoint#55

Merged
XXPermanentXX merged 2 commits into
mainfrom
fix/omni-audio-always400
Jun 12, 2026
Merged

fix(omni): use input_audio for --audio on OpenAI-compatible endpoint#55
XXPermanentXX merged 2 commits into
mainfrom
fix/omni-audio-always400

Conversation

@hopelynd

@hopelynd hopelynd commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix bl omni --audio sending unsupported audio_url content parts that always returned HTTP 400 on the DashScope OpenAI-compatible /compatible-mode/v1/chat/completions endpoint.
  • Build audio inputs as input_audio with { data, format } instead, keeping the existing resolveFileUrl OSS upload path for local files (with automatic X-DashScope-OssResourceResolve when the body contains oss:// URLs).
  • Infer input_audio.format from the original --audio path/URL extension; reject unknown or missing extensions with a usage error instead of silently defaulting to wav.
  • Add packages/cli/tests/e2e/omni.e2e.test.ts covering help, missing --message, dry-run request shape, unsupported extensions, and a live local-audio transcription flow.

Fixes #54

Test plan

  • vp test packages/cli/tests/e2e/omni.e2e.test.ts
  • Manual: bl omni --audio ./clip.wav --text-only ... returns transcription instead of Invalid value: audio_url
  • Manual: verified local uploads via oss:// URLs with input_audio.format for wav/mp3/amr/aac/m4a/ogg/3gp/3gpp

@hopelynd hopelynd requested a review from XXPermanentXX June 12, 2026 09:38
Bump bailian-cli / bailian-cli-core to 1.3.2, sync skill version, and
document the omni --audio HTTP 400 fix (#54) in CHANGELOG. Also add the
.ogg extension to the --audio help text and reference doc.
@XXPermanentXX XXPermanentXX merged commit 173e5a7 into main Jun 12, 2026
2 checks passed
@XXPermanentXX XXPermanentXX deleted the fix/omni-audio-always400 branch June 15, 2026 06:47
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.

bl omni --audio always 400: sends audio_url, endpoint requires input_audio

2 participants