Skip to content

Commit 658ead7

Browse files
authored
Fix MCP tests to use conversation instead of previous_response_id (#44270)
Both test_agent_mcp_basic and test_agent_mcp_with_project_connection were creating conversations but incorrectly switching to previous_response_id for follow-up calls. This fix ensures they consistently use conversation.id.
1 parent 849c056 commit 658ead7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/ai/azure-ai-projects/tests/agents/tools/test_agent_mcp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ def test_agent_mcp_basic(self, **kwargs):
128128
print("\nSending approval response to continue agent execution...")
129129

130130
response = openai_client.responses.create(
131+
conversation=conversation.id,
131132
input=input_list,
132-
previous_response_id=response.id,
133133
extra_body={"agent": {"name": agent.name, "type": "agent_reference"}},
134134
)
135135

@@ -275,8 +275,8 @@ def test_agent_mcp_with_project_connection(self, **kwargs):
275275
print("\nSending approval response to continue agent execution...")
276276

277277
response = openai_client.responses.create(
278+
conversation=conversation.id,
278279
input=input_list,
279-
previous_response_id=response.id,
280280
extra_body={"agent": {"name": agent.name, "type": "agent_reference"}},
281281
)
282282

0 commit comments

Comments
 (0)