File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3535 InputEntries ,
3636 MessageInputEntry ,
3737 ResponseFormat ,
38+ UnknownAgentTool ,
39+ UpdateAgentRequestTool ,
3840)
3941from mistralai .client .types .basemodel import BaseModel , OptionalNullable , UNSET
4042
@@ -187,8 +189,11 @@ async def prepare_agent_request(self, beta_client: "Beta") -> AgentRequestKwargs
187189 )
188190 agent = await beta_client .agents .get_async (agent_id = self .agent_id )
189191 agent_tools = agent .tools or []
190- updated_tools : list [AgentTool ] = []
192+ updated_tools : list [UpdateAgentRequestTool ] = []
191193 for tool in agent_tools :
194+ if isinstance (tool , UnknownAgentTool ):
195+ # Skip unknown tools - can't include them in update request
196+ continue
192197 if not isinstance (tool , FunctionTool ):
193198 updated_tools .append (tool )
194199 elif tool .function .name in self ._callable_tools :
You can’t perform that action at this time.
0 commit comments