mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
refactor: enable native tool calling for all HuggingFace models by default
This commit is contained in:
parent
474e3a92b3
commit
6f73c2e692
1 changed files with 2 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue