refactor: enable native tool calling for all HuggingFace models by default

This commit is contained in:
Roo Code 2025-12-20 18:02:44 +00:00
parent 474e3a92b3
commit 6f73c2e692

View file

@ -87,9 +87,6 @@ function parseHuggingFaceModel(model: HuggingFaceModel, provider?: HuggingFacePr
const pricing = provider?.pricing || model.providers.find((p) => p.pricing)?.pricing
// Check if any provider supports tools
const supportsTools = provider?.supports_tools ?? model.providers.some((p) => p.supports_tools === true)
// Include provider name in description if specific provider is given.
const description = provider ? `${model.id} via ${provider.provider}` : `${model.id} via HuggingFace`
@ -98,8 +95,8 @@ function parseHuggingFaceModel(model: HuggingFaceModel, provider?: HuggingFacePr
contextWindow: contextLength,
supportsImages: false, // HuggingFace API doesn't provide this info yet.
supportsPromptCache: false,
supportsNativeTools: supportsTools,
defaultToolProtocol: supportsTools ? "native" : undefined,
supportsNativeTools: true,
defaultToolProtocol: "native",
inputPrice: pricing?.input,
outputPrice: pricing?.output,
description,