Skip to content

feat(huggingface): Add Hugging Face AI provider#139

Merged
mattbrailsford merged 2 commits into
devfrom
feature/hugging-face
May 5, 2026
Merged

feat(huggingface): Add Hugging Face AI provider#139
mattbrailsford merged 2 commits into
devfrom
feature/hugging-face

Conversation

@filipbech
Copy link
Copy Markdown
Contributor

Summary

  • New Umbraco.AI.HuggingFace provider package — chat-only, talks to the Hugging Face Inference Providers router (https://router.huggingface.co/v1).
  • Reuses Microsoft.Extensions.AI.OpenAI (no new SDK dependency, no dependency on Umbraco.AI.OpenAI — both packages just consume the same NuGet).
  • Validates credentials against the Hub's whoami-v2 endpoint because the router's /v1/models is fully public and would otherwise mask invalid tokens in Test Connection.
  • Registers the package in Umbraco.AI.slnx, both install scripts (sh + ps1), the package-test-site scripts, and the level1Products matrix in azure-pipelines.yml.

Out of scope (future)

  • Embeddings — the router's OpenAI-compatible endpoint is chat-only. Adding embeddings would require either the native HF Inference API or the community tryAGI/HuggingFace SDK. Noted in the package's CLAUDE.md.
  • Image gen, speech, classification — no AI*CapabilityBase exists for these in Core.

Test plan

  • dotnet build Umbraco.AI.HuggingFace/Umbraco.AI.HuggingFace.slnx — green, lock file generated, packages.lock.json confirms no Umbraco.AI.OpenAI dependency
  • Demo site smoke test — provider appears in the Connections dropdown, model list populates from GET /v1/models, chat round-trip works with a real hf_... token
  • Test Connection — fails with invalid/missing token (whoami-v2 probe), passes with valid token
  • Reviewer to verify the install scripts on Windows (only sh tested locally)

🤖 Generated with Claude Code

@filipbech
Copy link
Copy Markdown
Contributor Author

chat only

@mattbrailsford mattbrailsford force-pushed the feature/hugging-face branch from b04660d to d804110 Compare May 5, 2026 08:00
@mattbrailsford mattbrailsford changed the base branch from feature/add-provider-skill to dev May 5, 2026 08:00
filipbech and others added 2 commits May 5, 2026 09:31
Adds chat-only provider targeting the Hugging Face Inference Providers
router (https://router.huggingface.co/v1) via Microsoft.Extensions.AI.OpenAI.
Validates credentials against the Hub's whoami-v2 endpoint since the
router's /v1/models is fully public.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…I pipeline

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mattbrailsford mattbrailsford force-pushed the feature/hugging-face branch from d804110 to 578eba4 Compare May 5, 2026 08:33
@mattbrailsford mattbrailsford merged commit 25dae7c into dev May 5, 2026
1 check failed
@mattbrailsford mattbrailsford deleted the feature/hugging-face branch May 5, 2026 08:40
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