Skip to content

bug: Dictation API error message shows incorrect 25MB limit (actual limit is 50MB) #7398

@dianed-square

Description

@dianed-square

Describe the bug

The OpenAPI specification for the dictation transcribe endpoint contains an incorrect error message. The error description states the audio file size limit is "max 25MB" when the actual enforced limit is 50MB.

Location:

  • File: crates/goose-server/src/routes/dictation.rs
  • Line: ~130

To Reproduce
Steps to reproduce the behavior:

  1. Review the OpenAPI annotation at line 130 in crates/goose-server/src/routes/dictation.rs
  2. Note the error description says: (status = 413, description = "Audio file too large (max 25MB)")
  3. Check the actual enforced limit at line 20: const MAX_AUDIO_SIZE_BYTES: usize = 50 * 1024 * 1024;
  4. Observe the discrepancy

Expected behavior
The error message should state "max 50MB" to match the actual enforced limit.


Screenshots
N/A - This is a code-level documentation issue.


Please provide the following information

  • OS & Arch: N/A (code issue)
  • Interface: N/A
  • Version: Current main branch
  • Extensions enabled: N/A
  • Provider & Model: N/A

Additional context

Current State:

  • Actual enforced limit: 50MB (MAX_AUDIO_SIZE_BYTES = 50 * 1024 * 1024)
  • Error message in OpenAPI annotation: Says "max 25MB"
  • User-facing documentation: Correctly states 50MB

Fix Required:

  1. Update line 130 in crates/goose-server/src/routes/dictation.rs:

    (status = 413, description = "Audio file too large (max 50MB)"),
  2. Regenerate OpenAPI artifacts:

    just generate-openapi
  3. Commit both the Rust change and the regenerated ui/desktop/openapi.json

Impact:

  • Low priority - only affects users who hit the limit and see the error message
  • Documentation is correct (50MB)
  • Code enforcement is correct (50MB)
  • Only the error message string in the API spec is incorrect

Context:
Discovered during documentation review for voice dictation features (PRs #6877, #6950).

Metadata

Metadata

Assignees

No one assigned

    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