mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
Anthropic add_code_execution_tool only add one tool
When calling Anthropic with files, and this files it's of type `container_upload`, Anthropic requires the `code_execution` tool. The tool its created correctly, but then because it only returns one tool, the `if` check won't apply that tool, resulting in a failed call to the AI
This commit is contained in:
parent
d251238bd7
commit
b008d2cc03
1 changed files with 1 additions and 1 deletions
|
|
@ -1399,7 +1399,7 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
|
|||
or []
|
||||
)
|
||||
tools = self.add_code_execution_tool(messages=anthropic_messages, tools=_tools)
|
||||
if len(tools) > 1:
|
||||
if len(tools) >= 1:
|
||||
optional_params["tools"] = tools
|
||||
|
||||
## Load Config
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue