Skip to content

Raise inline transcription media limit to 50MB and centralize limit constants - #1

Draft
ATECCA with Copilot wants to merge 1 commit into
mainfrom
copilot/update-inline-media-upload-limit
Draft

ATECCA with Copilot wants to merge 1 commit into
mainfrom
copilot/update-inline-media-upload-limit

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown

The transcription flow was enforcing a hardcoded 20MB inline media cap and surfacing that value in user-facing errors. This updates the local guardrail to 50MB and makes the limit configurable via named constants.

  • Inline media limit refactor

    • Introduced MAX_INLINE_MEDIA_MB and derived MAX_INLINE_MEDIA_BYTES in services/aiService.ts.
    • Replaced hardcoded size checks with the shared byte constant.
  • User-facing messaging alignment

    • Updated the size-limit error text to reference the constant-backed MB value, removing stale 20MB text.
  • Codepath cleanup in touched area

    • Removed duplicated inline size-check logic in the same file and kept enforcement in transcribeAudio().
const MAX_INLINE_MEDIA_MB = 50;
const MAX_INLINE_MEDIA_BYTES = MAX_INLINE_MEDIA_MB * 1024 * 1024;

if (file.size > MAX_INLINE_MEDIA_BYTES) {
  throw new Error(
    `File size exceeds ${MAX_INLINE_MEDIA_MB}MB limit for inline media. Please use a smaller file or split the audio.`
  );
}

Copilot AI changed the title [WIP] Increase inline media upload limit to 50MB Raise inline transcription media limit to 50MB and centralize limit constants Aug 4, 2026
Copilot AI requested a review from ATECCA August 4, 2026 11:08
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