Skip to content

fix(local-models): refuse gated repo installs - #2063

Merged
MODSetter merged 1 commit into
MODSetter:devfrom
fukalous:fix/gated-repo-install-refusal
Sep 30, 2026
Merged

MODSetter merged 1 commit into
MODSetter:devfrom
fukalous:fix/gated-repo-install-refusal

Conversation

@fukalous

@fukalous fukalous commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Prevent searched builds from gated Hugging Face repositories from receiving install tickets, while keeping their build metadata visible. The model screen now explains that SurfSense does not yet support Hugging Face authentication, and the message is translated across all supported locales. The local model catalog documentation now records the behavior and removes the resolved known gap.

This PR was implemented with an AI coding assistant. A human reviewed and approved the local diff before submission.

Why

SurfSense does not send Hugging Face credentials. Previously, gated repositories still received opaque install IDs, so Download was enabled and inevitably failed later with a generic retry message. Refusing ticket creation at catalog time keeps the backend authoritative and gives users the actual reason before they attempt a download.

Fixes #1977

How to test

  • pnpm test (314 passed)
  • uv run pytest tests/unit/llm/catalog/local -q (233 passed)
  • uv run pytest tests/integration/llm -q (113 passed)
  • pnpm typecheck
  • pnpm lint
  • pnpm translations:verify
  • uv run ruff check surfsense_local/backend
  • uv run ruff format --check modules/llm/catalog/local/engines/llamacpp/search/repo_row.py tests/unit/llm/catalog/local/engines/llamacpp/test_search.py
  • python3 scripts/check_docs.py docs/architecture/local-models/catalog.md (1 file, 0 problems)

High-level PR Summary

This PR prevents users from attempting to download models from gated Hugging Face repositories by refusing to issue install tickets for them at catalog time. While builds from gated repos remain visible in the search results, the UI now displays a clear message explaining that SurfSense does not yet support Hugging Face authentication, and the Download button is disabled. The fix includes backend logic changes to detect gated repositories, frontend UI updates to show the explanation, translations across all supported locales, documentation updates, and comprehensive test coverage.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_local/backend/modules/llm/catalog/local/engines/llamacpp/search/repo_row.py
2 surfsense_local/backend/tests/unit/llm/catalog/local/engines/llamacpp/test_search.py
3 surfsense_local/frontend/src/features/models/local/chat/model-search.tsx
4 surfsense_local/frontend/src/features/models/local/chat/download-chat-models.test.tsx
5 surfsense_local/frontend/translations/en.json
6 surfsense_local/frontend/translations/de.json
7 surfsense_local/frontend/translations/es.json
8 surfsense_local/frontend/translations/fr.json
9 surfsense_local/frontend/translations/hi.json
10 surfsense_local/frontend/translations/ja.json
11 surfsense_local/frontend/translations/ko.json
12 surfsense_local/frontend/translations/pt-BR.json
13 surfsense_local/frontend/translations/ru.json
14 surfsense_local/frontend/translations/zh-CN.json
15 docs/architecture/local-models/catalog.md

Need help? Join our Discord

@vercel

vercel Bot commented Sep 30, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f94d9743-a17e-4dca-b572-fb712ae4a434

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MODSetter
MODSetter merged commit f70f0c1 into MODSetter:dev Sep 30, 2026
17 of 19 checks passed
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