Skip to content

fix: update dictation API error message to reflect 50MB limit#7397

Closed
dianed-square wants to merge 1 commit into
mainfrom
fix-dictation-error-message-50mb
Closed

fix: update dictation API error message to reflect 50MB limit#7397
dianed-square wants to merge 1 commit into
mainfrom
fix-dictation-error-message-50mb

Conversation

@dianed-square
Copy link
Copy Markdown
Contributor

@dianed-square dianed-square commented Feb 20, 2026

Summary

Corrects the error message in the OpenAPI specification for the dictation transcribe endpoint. The message incorrectly stated 'max 25MB' while the actual enforced limit is 50MB.

Type of Change

  • Bug fix

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Code inspection - verified that:

  • The actual limit enforcement remains 50MB (MAX_AUDIO_SIZE_BYTES constant)
  • The error message now matches the enforced limit
  • No functional changes, only documentation string update

Related Issues

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

Technical Details:

  • File: crates/goose-server/src/routes/dictation.rs
  • Line 130: Updated error description from "max 25MB" to "max 50MB"
  • The actual limit is 50MB (MAX_AUDIO_SIZE_BYTES = 50 * 1024 * 1024)
  • This only affects the OpenAPI spec documentation, not the enforcement logic

The error message in the OpenAPI spec incorrectly stated 'max 25MB'
while the actual enforced limit is 50MB (MAX_AUDIO_SIZE_BYTES).

Updated the error description to match the actual limit.
Copilot AI review requested due to automatic review settings February 20, 2026 19:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the dictation transcribe endpoint’s OpenAPI response description so the documented upload limit matches the backend’s 50MB request size limit.

Changes:

  • Adjusts the /dictation/transcribe 413 response description from “max 25MB” to “max 50MB”.

(status = 401, description = "Invalid API key"),
(status = 412, description = "Provider not configured"),
(status = 413, description = "Audio file too large (max 25MB)"),
(status = 413, description = "Audio file too large (max 50MB)"),
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

This updates the server-side OpenAPI annotation, but the committed ui/desktop/openapi.json still contains the old "max 25MB" description, so the desktop app (and the OpenAPI up-to-date CI check) will remain out of sync. Regenerate the OpenAPI artifacts (e.g., via the repo’s just generate-openapi / just check-openapi-schema) and commit the updated ui/desktop/openapi.json (and any regenerated client output) so consumers see the 50MB limit.

Suggested change
(status = 413, description = "Audio file too large (max 50MB)"),
(status = 413, description = "Audio file too large (max 25MB)"),

Copilot uses AI. Check for mistakes.
@dianed-square
Copy link
Copy Markdown
Contributor Author

This fix requires regenerating OpenAPI artifacts (just generate-openapi), which needs cmake and other build dependencies I don't have locally. The one-line fix is in crates/goose-server/src/routes/dictation.rs line 130: change 'max 25MB' to 'max 50MB'. Someone with the proper build setup can apply this fix + regenerate the OpenAPI files.

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.

2 participants