feat: expand supported document types for gateway file uploads#6787
Open
akhater wants to merge 6 commits into
Open
feat: expand supported document types for gateway file uploads#6787akhater wants to merge 6 commits into
akhater wants to merge 6 commits into
Conversation
akhater
pushed a commit
to akhater/hermes-agent
that referenced
this pull request
Apr 10, 2026
…ay file uploads
14 tasks
1d8df39 to
3e91c9a
Compare
Collaborator
3e91c9a to
9a6733e
Compare
9a6733e to
b802b66
Compare
Add common data formats (JSON, YAML, CSV, XML, HTML) and source code files (Python, JavaScript, TypeScript, Shell, SQL) to the gateway document upload allowlist. Users working with agents via Telegram, Discord, and other messaging platforms frequently need to share configuration files, data exports, and code snippets as file uploads. The current allowlist is limited to office documents and plain text, forcing users to rename files or paste content inline as a workaround. (cherry picked from commit 1d8df39) (cherry picked from commit 3aa7e30aef000103f19ecd2aacd4ed1694a13495)
b802b66 to
0313d35
Compare
# Conflicts: # agent/model_metadata.py # gateway/platforms/base.py # tests/conftest.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
Users sharing files via Telegram, Discord, and other messaging platforms are currently limited to office documents and plain text. Common file types like
.json,.yaml, and.csvare rejected, forcing users to rename files or paste content inline.Changes
gateway/platforms/base.py: ExpandSUPPORTED_DOCUMENT_TYPESdictionary with 10 additional MIME type mappingsTest plan
.json,.yaml,.csv,.pyfiles via Telegram — verify they are cached and accessible to the agent.pdf,.docx, etc.) continue to work.exe,.bin) are still rejected