fix: update dictation API error message to reflect 50MB limit#7397
fix: update dictation API error message to reflect 50MB limit#7397dianed-square wants to merge 1 commit into
Conversation
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.
There was a problem hiding this comment.
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/transcribe413 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)"), |
There was a problem hiding this comment.
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.
| (status = 413, description = "Audio file too large (max 50MB)"), | |
| (status = 413, description = "Audio file too large (max 25MB)"), |
|
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. |
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
AI Assistance
Testing
Code inspection - verified that:
Related Issues
Discovered during documentation review for voice dictation features (PRs #6877, #6950)
Technical Details:
crates/goose-server/src/routes/dictation.rsMAX_AUDIO_SIZE_BYTES = 50 * 1024 * 1024)