This repository was archived by the owner on May 15, 2026. It is now read-only.
Commit aac844d
feat: migrate HuggingFace provider to use AI SDK @ai-sdk/huggingface package
- Add @ai-sdk/huggingface ^1.0.28 dependency
- Rewrite HuggingFaceHandler to extend BaseProvider with AI SDK
- Use streamText/generateText from ai package for streaming and completions
- Use shared utilities: convertToAiSdkMessages, convertToolsForAiSdk, processAiSdkStreamPart, mapToolChoice, handleAiSdkError
- Add processUsageMetrics for cache token handling from providerMetadata
- Add comprehensive test suite following Fireworks test patterns
- Default temperature: 0.5
- Base URL: https://router.huggingface.co/v1 (HuggingFace Responses API)
This follows the exact pattern from PR #11118 (Fireworks migration).1 parent b020f6b commit aac844d
4 files changed
Lines changed: 782 additions & 95 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments