File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1489,3 +1489,14 @@ async def test_server_info(mcp_server: MCPServerStdio) -> None:
14891489 async with mcp_server :
14901490 assert mcp_server .server_info is not None
14911491 assert mcp_server .server_info .name == 'Pydantic AI MCP Server'
1492+
1493+
1494+ async def test_agent_run_stream_with_mcp_server_http (allow_model_requests : None ):
1495+ server = MCPServerStreamableHTTP (url = 'https://mcp.deepwiki.com/mcp' )
1496+ agent = Agent (model = 'openai:gpt-4o' , toolsets = [server ], instructions = 'Be concise.' )
1497+
1498+ # This should not raise an error.
1499+ # See https://github.com/pydantic/pydantic-ai/issues/2818#issuecomment-3476480829
1500+ async with agent .run_stream ('Who are the main contributors to the pydantic/pydantic-ai repo.' ) as result :
1501+ output = await result .get_output ()
1502+ assert output == snapshot ()
You can’t perform that action at this time.
0 commit comments