Can't update AzureAISearchTool on Thread Level #115
-
|
Filed as an issue at the azure-sdk-for-python repo. Describe the bug To Reproduce agent_toolset = ToolSet()
agent_toolset.add(
AzureAISearchTool(
index_name="index_name",
index_connection_id=get_env("SEARCH_ID"),
)
)
agent = agents_client.create_agent(toolset=agent_toolset, model="gpt-4.1")
# create a thread toolset with ai search
thread_toolset = ToolSet()
thread_toolset.add(
AzureAISearchTool(
index_name="index_name",
index_connection_id=get_env("SEARCH_ID"),
filter="SessionId eq '11111'", # example filter
)
)
# set thread to use the thread toolset
thread = agents_client.threads.create(tool_resources=thread_toolset.resources)
# first run: search for some file
message = agents_client.messages.create(
thread_id=thread.id,
role=MessageRole.USER,
content="Please use the ai search tool to search for 'hello world'",
)
run = agents_client.runs.create_and_process(thread_id=thread.id, agent_id=agent.id, toolset=thread_toolset)
# send a follow-up message to the thread
message = agents_client.messages.create(thread_id=thread.id, role=MessageRole.USER, content="What happened?")
run = agents_client.runs.create_and_process(thread_id=thread.id, agent_id=agent.id, toolset=thread_toolset)Expected behavior From the tool overview Screenshots |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
This is true, I am even receiving this error, when I tried to override the agent's tool with thread tool |
Beta Was this translation helpful? Give feedback.
-
|
This azure-sdk-python issues was addressed on this thread within the last few weeks - thanks @justuswolff-audit for sharing |
Beta Was this translation helpful? Give feedback.


This azure-sdk-python issues was addressed on this thread within the last few weeks - thanks @justuswolff-audit for sharing
Find teh resolution thread here: Azure/azure-sdk-for-python#42304