Skip to content

feat(studio): configurable RAG upload extensions via RAG_UPLOAD_EXTS - #11499

Merged
danielhanchen merged 3 commits into
unslothai:mainfrom
Souravrajvi0:feat/rag-upload-exts-env-06a6
Oct 1, 2026
Merged

danielhanchen merged 3 commits into
unslothai:mainfrom
Souravrajvi0:feat/rag-upload-exts-env-06a6

Conversation

@Souravrajvi0

Copy link
Copy Markdown
Contributor

Fixes #11385

Summary

studio/backend/core/rag/config.py documented that every RAG setting is env-overridable, but UPLOAD_EXTS was hardcoded. This adds RAG_UPLOAD_EXTS as a comma-separated list (same default as today) so linked folders and project uploads can restrict indexed types—for example RAG_UPLOAD_EXTS=.md,.markdown for a mixed notes directory.

Changes

  • Parse RAG_UPLOAD_EXTS into UPLOAD_EXTS (trim + lowercase)
  • Add test_rag_config_upload_exts.py covering defaults, env parsing, and upload gating

Note on #10395

When ALL_UPLOAD_EXTS lands, maintainers may want the same env var to filter that union; this PR targets current main where ingestion and folder sync use UPLOAD_EXTS.

Testing

  • pytest studio/backend/tests/test_rag_config_upload_exts.py (not run on this VM — disk quota blocked installing studio deps)

Add RAG_UPLOAD_EXTS so linked folders and uploads can restrict indexed
file types without patching config.py. Defaults preserve the existing
document extension set.

Fixes unslothai#11385
@danielhanchen

Copy link
Copy Markdown
Member

Review record for #11499, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#298.

Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found.

Round 1: reviewed mirror 2a1f53f8ea (this PR's 7a1a15c0a)

chatgpt-codex-connector[bot] (on the mirror)

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 2a1f53f8ea

No triage reaction was recorded on the mirror

chatgpt-codex-connector[bot] (on the mirror)

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 2a1f53f8ea

View security finding report

Only the user who started this review can view the report in Codex.

No triage reaction was recorded on the mirror

Verdict

The round did not reach a clean review on the mirror before it closed.

This is the review as it stood at that commit. Anything pushed to this PR afterwards was not part of it.

@danielhanchen
danielhanchen merged commit 38ef21f into unslothai:main Oct 1, 2026
17 of 52 checks passed
danielhanchen added a commit to harshaygadekar/unsloth that referenced this pull request Oct 5, 2026
Resolve conflicts with RAG_UPLOAD_EXTS (unslothai#11499) and rework the change:
- backend: one SOURCE_TEXT_EXTS set folded into UPLOAD_EXTS, so every caller and
  the RAG_UPLOAD_EXTS narrowing keep working; parity test against the chat's
  TEXT_ATTACHMENT_EXTENSIONS instead of a second hand-kept list
- NUL rejection only for source extensions, so .txt behaviour is unchanged
- folder sync: skip venvs by pyvenv.cfg instead of the name 'env' (Terraform env/ dirs)
- frontend: reuse TEXT_ATTACHMENT_EXTENSIONS from source-drop-policy (no barrel cycle),
  knowledge base picker accepts the same types as its drop zone, drop the
  extensionless names the backend would 400 on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Make RAG UPLOAD_EXTS configurable via environment variable

2 participants