Repository navigation
fix(local-models): refuse gated repo installs - #2063
Conversation
|
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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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 typecheckpnpm lintpnpm translations:verifyuv run ruff check surfsense_local/backenduv run ruff format --check modules/llm/catalog/local/engines/llamacpp/search/repo_row.py tests/unit/llm/catalog/local/engines/llamacpp/test_search.pypython3 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
surfsense_local/backend/modules/llm/catalog/local/engines/llamacpp/search/repo_row.pysurfsense_local/backend/tests/unit/llm/catalog/local/engines/llamacpp/test_search.pysurfsense_local/frontend/src/features/models/local/chat/model-search.tsxsurfsense_local/frontend/src/features/models/local/chat/download-chat-models.test.tsxsurfsense_local/frontend/translations/en.jsonsurfsense_local/frontend/translations/de.jsonsurfsense_local/frontend/translations/es.jsonsurfsense_local/frontend/translations/fr.jsonsurfsense_local/frontend/translations/hi.jsonsurfsense_local/frontend/translations/ja.jsonsurfsense_local/frontend/translations/ko.jsonsurfsense_local/frontend/translations/pt-BR.jsonsurfsense_local/frontend/translations/ru.jsonsurfsense_local/frontend/translations/zh-CN.jsondocs/architecture/local-models/catalog.md