fix: tool name in agent (#15344)

This commit is contained in:
zxhlyh 2025-03-10 11:21:46 +08:00 committed by GitHub
commit a3d18d43ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View file

@ -69,10 +69,13 @@ export const correctModelProvider = (provider: string) => {
return `langgenius/${provider}/${provider}`
}
export const correctToolProvider = (provider: string) => {
export const correctToolProvider = (provider: string, toolInCollectionList?: boolean) => {
if (!provider)
return ''
if (toolInCollectionList)
return provider
if (provider.includes('/'))
return provider