Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit af0a7e8

Browse files
roomotedaniel-lxs
authored andcommitted
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 4647d0f commit af0a7e8

3 files changed

Lines changed: 738 additions & 79 deletions

File tree

0 commit comments

Comments
 (0)