According to https://github.com/christianhelle/apiclientcodegen/blob/master/src/Core/ApiClientCodeGen.Core/Installer/DependencyInstaller.cs
you are always starting kiota installation and detect whether it's installed by presence in error output SINGLE QUOTED tool ID
('microsoft.openapi.kiota') while dotnet is outputing it DOUBLE QUOTED. (Most probably it's a dotnet localization issue)
I guess the best way to detect whether kiota is installed by checking its version running
kiota --version
if kiota is installed it will succeed and return version
if case of failure you can initiate installation.
According to https://github.com/christianhelle/apiclientcodegen/blob/master/src/Core/ApiClientCodeGen.Core/Installer/DependencyInstaller.cs you are always starting kiota installation and detect whether it's installed by presence in error output SINGLE QUOTED tool ID ('microsoft.openapi.kiota') while dotnet is outputing it DOUBLE QUOTED. (Most probably it's a dotnet localization issue) I guess the best way to detect whether kiota is installed by checking its version running kiota --version if kiota is installed it will succeed and return version if case of failure you can initiate installation.