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

Commit 6f73c2e

Browse files
committed
refactor: enable native tool calling for all HuggingFace models by default
1 parent 474e3a9 commit 6f73c2e

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/api/providers/fetchers/huggingface.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ function parseHuggingFaceModel(model: HuggingFaceModel, provider?: HuggingFacePr
8787

8888
const pricing = provider?.pricing || model.providers.find((p) => p.pricing)?.pricing
8989

90-
// Check if any provider supports tools
91-
const supportsTools = provider?.supports_tools ?? model.providers.some((p) => p.supports_tools === true)
92-
9390
// Include provider name in description if specific provider is given.
9491
const description = provider ? `${model.id} via ${provider.provider}` : `${model.id} via HuggingFace`
9592

@@ -98,8 +95,8 @@ function parseHuggingFaceModel(model: HuggingFaceModel, provider?: HuggingFacePr
9895
contextWindow: contextLength,
9996
supportsImages: false, // HuggingFace API doesn't provide this info yet.
10097
supportsPromptCache: false,
101-
supportsNativeTools: supportsTools,
102-
defaultToolProtocol: supportsTools ? "native" : undefined,
98+
supportsNativeTools: true,
99+
defaultToolProtocol: "native",
103100
inputPrice: pricing?.input,
104101
outputPrice: pricing?.output,
105102
description,

0 commit comments

Comments
 (0)