引言
如果大家在AI编程过程中遇到以下问题,可参考本文的解决方案。

大家好,我是逍遥小欢。昨天在我的老的win10电脑上,安装搭建AI编程vscode和roocode环境时,运行提示词遇到一个错误。
报错提示:API流式传输失败 Command failed with exit code 1: powershell (Get-Ciminstance -ClassName Win32_OperatingSystem).caption
解决方案
powershell升级到最新版本。
1.下载安装powershell 7.1.5 安装包见文末。
2.vscode配置新版powershell。点击vscode参数,然后点击Command palette

- 配置终端默认的程序文件

- 选择刚装成功的Powershell程序

「20250530 powershell7.5.1」 夸克网盘链接:https://pan.quark.cn/s/20bad5624909