Skip to content

[Feature]: Make the 50 MiB file attachment size limit configurable #45578

Not planned

Description

@0xtlt

Summary

Currently, the maximum file attachment size in the composer is hardcoded to 50 MiB in packages/contracts/src/chatAttachment.ts#L17:

export const PROVIDER_SEND_TURN_MAX_FILE_BYTES = 50 * 1024 * 1024;

Problem

When working with larger files (e.g. large logs, datasets, archives, or media files), especially on remote/linked environments where inserting a local path reference isn't always sufficient or convenient, users hit the 50 MiB cap with no way to adjust it.

Proposed Solution

Make the maximum file attachment size configurable (while keeping 50 MiB as the default), for example via:

  • an environment variable (e.g. T3CODE_MAX_ATTACHMENT_BYTES / T3CODE_MAX_FILE_ATTACHMENT_MB), and/or
  • a setting in the app preferences.

Additional Context

  • Keeping 50 MiB as the default preserves current safety/memory bounds.
  • Provider-specific limits would still apply downstream if a model/provider rejects larger payloads.

Activity

  1. juliusmarminge commented on Nov 29, 2026

    @juliusmarminge
    Member

    Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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