Repository navigation
Conversation
allozaur
force-pushed
the
allozaur/feat/ui-huggingface-connector
branch
from
November 25, 2026 19:05
dd2028b to
c838ac3
Compare
allozaur
force-pushed
the
allozaur/feat/ui-huggingface-connector
branch
from
November 26, 2026 14:37
c838ac3 to
f939c98
Compare
allozaur
force-pushed
the
allozaur/feat/ui-huggingface-connector
branch
from
November 26, 2026 15:24
f939c98 to
fc0f7c0
Compare
allozaur
force-pushed
the
allozaur/feat/ui-huggingface-connector
branch
from
November 26, 2026 16:08
fc0f7c0 to
cc9c93e
Compare
allozaur
force-pushed
the
allozaur/feat/ui-huggingface-connector
branch
from
November 26, 2026 16:18
cc9c93e to
01ad8a2
Compare
allozaur
force-pushed
the
allozaur/feat/ui-huggingface-connector
branch
3 times, most recently
from
November 27, 2026 09:04
31980ff to
3d2de35
Compare
POST /models accepts an optional hf_token, used for that download in place of the server's own (--hf-token): the check of the repo uses it, and the download worker gets it through its environment, never its arguments, so it is neither logged nor listed. It is not stored. A client that knows who is asking, such as Llama Chat with a Hugging Face sign-in, can so download a gated model the server's own token cannot reach. The token check also accepts the access token of an OAuth sign-in (hf_oauth_ and a JWS), which it used to drop as invalid. Assisted-by: Claude (Opus 5.5 Medium)
The Hugging Face account becomes a connector, an extension built on
@ggml-org/llama-huggingface: one sign-in ("Sign in with Hugging Face", or a
pasted access token) and what it is used for.
- Share: the Share actions, the share dialog and the account move out of
the core into the extension, and reach it through new extension points
(conversationActions, messageActions, overlays). The account's row in
Settings > General gives way to the connector's card.
- Connectors: Settings gets a Connectors section with one card per
connector (the connectors point), in the dialog and in a phone's sheet.
- Hugging Face tools: the Hugging Face MCP server is signed in with the
same account (the serverAuth point, which MCP reads in place of its own
sign-in for a covered server), and a switch on the card adds it to the
MCP servers. The sign-in asks for read-mcp too.
- Gated models: a model download passes the account's token to
llama-server (modelDownloadAuth), and a gated model in Discover Models
says what it takes (modelNotices). The sign-in asks for gated-repos too.
A build made with VITE_PUBLIC_HUGGING_FACE=false leaves the extension out.
Assisted-by: Claude (Opus 5.5 Medium)
allozaur
force-pushed
the
allozaur/feat/ui-huggingface-connector
branch
from
November 27, 2026 09:26
3d2de35 to
4aa271b
Compare
This branch has not been deployed
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.
Overview
The Hugging Face account becomes a connector: the sign-in that sharing uses also signs in the Hugging Face MCP server's tools and downloads gated models. Settings has a new Connectors section where the account shows.
Additional information
Third in the stack on this fork: on the MCP extension (#133), which sits on the sharing PR (#136). The sign-in, the
@ggml-org/llama-huggingfacepackage and the share flow come from #136; this PR moves them into an extension and adds what else the account is used for.How connectors, the sign-in flows and MCP skills are best presented is still open. This layer keeps what was built before the stack was reordered, carried onto the new base.
Known gaps:
read-mcpandgated-repos. What the connector does with such a token, and how it asks to sign in again, was not looked at.How it fits together
openid profile contribute-repostoopenid profile read-mcp gated-repos contribute-repos: the app can also read gated repos the account was given access to, and use the account's MCP settings.contribute-reposamong its scopes, so the connector's token signs it in. The MCP extension asks connectors for headers on every request to a server one of them covers, so a renewed token is always used, and it leaves its own sign-in out for that server. A switch on the card adds the server to the MCP servers. When the account changes, MCP connects its servers again, unless Enable MCP is off.What changed
One commit each:
POST /modelsaccepts an optionalhf_token. The check of the repo uses it, and the download worker gets it through its environment, never its arguments, so it is neither logged nor listed; it is not stored. The token check also accepts an OAuth access token (hf_oauth_and a JWS), which it used to drop as invalid.conversationActions,messageActions,overlays,connectors,serverAuth,modelDownloadAuthandmodelNotices. The MCP extension readsserverAuth.src/lib/extensions/huggingface/: who the app is, what a conversation is as a trace, and its contributions to the points above. What ui: share conversations to Hugging Face datasets as agent traces #136 wired into the core directly (the store, the share dialog's wrapper, the row in Settings > General,uiStore.conversationShare) is removed from the core.HfAccountDialog, and a line on its sign-in form saying where else the token goes (a model download passes it to llama-server).VITE_PUBLIC_HUGGING_FACE=trueleaves the extension out, and the package's sign-in, upload and dialogs with it (the sharing PR below explains the stand-in,-DLLAMA_UI_HUGGING_FACE=ONfor llama-server and the image build argument). The stand-in now also coversHfAccountDialogandfreshToken, which the extension reads.Testing
In
ui/apps/chat, on the tip of this branch:npm run check: no errors.npm run lint: clean.Before the reorder, on the older base: Extensions listed MCP and Hugging Face as active, Connectors showed the card, Share was contributed to conversations and messages, and made-up tokens showed that a request's token replaces the server's own in the check and in the download worker without reaching the log.
Not run: the E2E suite, Storybook, a production build and the CMake embed.
Demo script
Not recorded yet. It needs a visible browser window and a person signing in:
demo.manualwaits for that step and cuts it from the video (#130). The share is real: it creates a public dataset on the account that signs in.Requirements
Claude (Opus 5.5 Medium)