Skip to content

feat: expand supported document types for gateway file uploads - #6787

Closed
akhater wants to merge 6 commits into
NousResearch:mainfrom
akhater:feat/expand-gateway-document-types
Closed

feat: expand supported document types for gateway file uploads#6787
akhater wants to merge 6 commits into
NousResearch:mainfrom
akhater:feat/expand-gateway-document-types

Conversation

@akhater

@akhater akhater commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add common data formats (JSON, YAML, CSV, XML, HTML) to the gateway document upload allowlist
  • Add source code file types (Python, JavaScript, TypeScript, Shell, SQL)
  • Organize entries with section comments for clarity

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 .csv are rejected, forcing users to rename files or paste content inline.

Changes

  • gateway/platforms/base.py: Expand SUPPORTED_DOCUMENT_TYPES dictionary with 10 additional MIME type mappings

Test plan

  • Upload .json, .yaml, .csv, .py files via Telegram — verify they are cached and accessible to the agent
  • Verify existing supported types (.pdf, .docx, etc.) continue to work
  • Confirm unsupported types (e.g. .exe, .bin) are still rejected

akhater pushed a commit to akhater/hermes-agent that referenced this pull request Apr 10, 2026
@akhater
akhater force-pushed the feat/expand-gateway-document-types branch from 1d8df39 to 3e91c9a Compare April 29, 2026 05:09
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery labels Apr 29, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #12468 (broader approach: accept all non-media uploads as documents) and #4105 (feature request for CSV/JSON support).

@akhater
akhater force-pushed the feat/expand-gateway-document-types branch from 3e91c9a to 9a6733e Compare May 1, 2026 19:14
@akhater
akhater force-pushed the feat/expand-gateway-document-types branch from 9a6733e to b802b66 Compare May 9, 2026 08:44
Ubuntu and others added 3 commits May 9, 2026 12:12
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)
@akhater
akhater force-pushed the feat/expand-gateway-document-types branch from b802b66 to 0313d35 Compare May 9, 2026 09:17
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution. This is now implemented on main with a broader gateway-wide solution.

  • Automated hermes-sweeper review verified 4314d451ca961cb50c3430197a3a2c7a8575fd0e (fix(gateway): accept any inbound file type across all messaging platforms), shipped in v2026.7.1.
  • gateway/platforms/base.py:1678 now caches and surfaces every authorized non-media attachment; requested known formats keep their precise MIME, while unknown formats are retained rather than rejected.
  • gateway/run.py:10536 adds agent-visible document context for every accepted file type.
  • tests/gateway/test_document_cache.py:221 covers unsupported .exe caching, which is stronger than a fixed extension allowlist.

This also realizes the broader approach referenced in the discussion (#12468), so this PR's requested behavior is redundant.

@teknium1 teknium1 closed this Jul 12, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants