File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -628,15 +628,15 @@ def __init__(
628628 )
629629 self .api_key = None
630630
631- if not self .location and not self .api_key :
632- self .location = 'global'
633-
634631 self .custom_base_url = (
635632 validated_http_options .base_url
636633 if validated_http_options .base_url
637634 else None
638635 )
639636
637+ if not self .location and not self .api_key and not self .custom_base_url :
638+ self .location = 'global'
639+
640640 # Skip fetching project from ADC if base url is provided in http options.
641641 if (
642642 not self .project
Original file line number Diff line number Diff line change @@ -372,7 +372,8 @@ def mock_auth_default(scopes=None):
372372 monkeypatch .setattr (google .auth , "default" , mock_auth_default )
373373 # Including a base_url override skips the check for having proj/location or
374374 # api_key set.
375- Client (vertexai = True , http_options = {"base_url" : "https://override.com/" })
375+ client = Client (vertexai = True , http_options = {"base_url" : "https://override.com/" })
376+ assert client .models ._api_client .location is None
376377
377378
378379def test_invalid_mldev_constructor_empty (monkeypatch ):
You can’t perform that action at this time.
0 commit comments