Fix Duo Agent Platform probe's token generation and duplicate gRPC calls
What does this MR do and why?
Fix Duo Agent Platform probe's token generation and duplicate gRPC calls
The probe fetched its own Cloud Connector token via
CloudConnector::Tokens.get, but
Ai::DuoWorkflow::DuoWorkflowService::Client never read the token:
kwarg always derived its own bearer token through
Gitlab::AiGateway.headers.
Drop the unused fetch and pass feature_setting through to the client
instead, so the token/headers used for the real gRPC call are
self-hosted aware.
Bonus: Also stop invoking list_tools twice when the probe fails.
References
Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/603347 as an pre-requisite MR. Also related to https://gitlab.com/gitlab-org/gitlab/-/work_items/616057+
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.