Skip to content

fix(proxy): google adc was not refreshed correctly

Shinya Maeda requested to merge fix-google-adc-expiry-period into main

NOTE: This is a high-priority MR for the deadline.

What does this merge request do and why?

This MR fixes the issue that proxy requests to Vertex AI call occasionally results in 401 errors. We should use the Google's official client library (google.auth.credentials) to identify the token state, instead of using the hard-coded logic in AI Gateway, which doesn't reflect the token state correctly.

Related to [Feature flag] Rollout of `use_ai_gateway_proxy` (gitlab-org/gitlab#461964 - closed)

This change is behind the feature flag, which is disabled by default, so it's safe to merge this change.

How to set up and validate locally

Checkout this branch and run poetry run ai_gateway

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Shinya Maeda

Merge request reports