File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1616
1717from __future__ import annotations
1818
19+ import logging
1920import subprocess
2021from typing import Any
2122from typing import Dict
3031from google .cloud import resourcemanager_v3
3132import requests
3233
33- _VERTEX_AI_ENDPOINT = "https://{location}-aiplatform.googleapis.com/v1beta1"
34+ logger = logging .getLogger ("google_adk." + __name__ )
35+
36+ _VERTEX_AI_ENDPOINT = (
37+ "https://{location}-staging-aiplatform.sandbox.googleapis.com/v1beta1"
38+ )
3439
3540
3641def check_adc () -> bool :
@@ -89,6 +94,7 @@ def _call_vertex_express_api(
8994 raise ValueError (f"Unsupported method: { method } " )
9095
9196 response .raise_for_status ()
97+ logging .info ("API Response: %s" , response .text )
9298 return response .json ()
9399
94100
@@ -126,7 +132,7 @@ def check_express_eligibility(
126132 result = _call_vertex_express_api (
127133 "GET" , "/Eligibility:check" , location = location
128134 )
129- return result .get ("eligibility" ) == "IN_SCOPE"
135+ return result .get ("eligibility" ) in [ "IN_SCOPE" , "ELIGIBLE" ]
130136 except (requests .exceptions .HTTPError , KeyError ) as e :
131137 return False
132138
You can’t perform that action at this time.
0 commit comments