Skip to content

download_format mismatch returns 422 even when no download link is requested #582

Closed

Description

@remsky

#570 rejects a download_format that differs from response_format with a 422. The check runs on every request, including ones with return_download_link: false (the default), where download_format has no effect.

Some clients already send a mismatched pair with no download link (response_format: "pcm" with download_format: "mp3", or a hardcoded download_format: "mp3" next to a configurable response_format, etc). These work today, and would get a 422 on every request once 0.10.0 ships:

Fix: only run the check when return_download_link is true.

  • _download_matches_response in api/src/structures/schemas.py
  • a test that a mismatched pair with no download link is accepted
  • reword the [Unreleased] CHANGELOG line to match

Fix will be in before next release.

Activity

  1. self-assigned this
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions