Chore/claude sonnet 4.5 (#5271)

* claude sonnet 4.5

* add anthropic built in tools

* add comments to remove tool calls with no id
This commit is contained in:
Henry Heng
2025-09-30 12:31:23 +01:00
committed by GitHub
parent 6890ced939
commit b501932491
5 changed files with 250 additions and 66 deletions
@@ -25,7 +25,8 @@ import {
IconCode,
IconWorldWww,
IconPhoto,
IconBrandGoogle
IconBrandGoogle,
IconBrowserCheck
} from '@tabler/icons-react'
import StopCircleIcon from '@mui/icons-material/StopCircle'
import CancelIcon from '@mui/icons-material/Cancel'
@@ -154,6 +155,17 @@ const AgentFlowNode = ({ data }) => {
}
}
const getBuiltInAnthropicToolIcon = (toolName) => {
switch (toolName) {
case 'web_search_20250305':
return <IconWorldWww size={14} color={'white'} />
case 'web_fetch_20250910':
return <IconBrowserCheck size={14} color={'white'} />
default:
return null
}
}
useEffect(() => {
if (ref.current) {
setTimeout(() => {
@@ -455,6 +467,16 @@ const AgentFlowNode = ({ data }) => {
: [],
toolProperty: 'builtInTool',
isBuiltInGemini: true
},
{
tools: data.inputs?.agentToolsBuiltInAnthropic
? (typeof data.inputs.agentToolsBuiltInAnthropic === 'string'
? JSON.parse(data.inputs.agentToolsBuiltInAnthropic)
: data.inputs.agentToolsBuiltInAnthropic
).map((tool) => ({ builtInTool: tool }))
: [],
toolProperty: 'builtInTool',
isBuiltInAnthropic: true
}
]
@@ -541,6 +563,32 @@ const AgentFlowNode = ({ data }) => {
]
}
// Handle built-in Anthropic tools with icons
if (config.isBuiltInAnthropic) {
const icon = getBuiltInAnthropicToolIcon(toolName)
if (!icon) return []
return [
<Box
key={`tool-${configIndex}-${toolIndex}`}
sx={{
width: 20,
height: 20,
borderRadius: '50%',
backgroundColor: customization.isDarkMode
? darken(data.color, 0.5)
: darken(data.color, 0.2),
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
padding: 0.2
}}
>
{icon}
</Box>
]
}
return [
<Box
key={`tool-${configIndex}-${toolIndex}`}