Skip to content

/v1/audio/speech returns 400 (not 404) when model is omitted #34

@thinmintdev

Description

@thinmintdev

What to build

POSTing /v1/audio/speech with a body that omits the model field returns HTTP 404 "File Not Found". OpenAI's reference returns 400 with a clear "you must provide a model parameter" message. The 404 looks like the route is missing and wastes debugging time.

Map the dispatcher's "no model in body" branch to 400 with an OpenAI-shaped message.

Acceptance criteria

  • POST /v1/audio/speech without model returns 400, not 404
  • Response body is OpenAI-shaped with a clear message naming the missing field
  • The same fix is applied to any other /v1/* dispatch path that exhibits the same behaviour
  • Unit test covers the model-missing case for /v1/audio/speech and the equivalent path on /v1/audio/transcriptions

Blocked by

None - can start immediately


Sourced from tests/harness/FINDINGS.md §18 (low).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions