File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323from . import _extra_utils
2424from . import _transformers as t
2525from . import types
26- from ._api_client import ApiClient , HttpOptionsDict
26+ from ._api_client import ApiClient
2727from ._common import get_value_by_path as getv
2828from ._common import set_value_by_path as setv
2929from .pagers import AsyncPager , Pager
@@ -5739,13 +5739,7 @@ async def list(
57395739 )
57405740 if self ._api_client .vertexai :
57415741 config = config .copy ()
5742- if config .query_base :
5743- http_options = (
5744- config .http_options if config .http_options else HttpOptionsDict ()
5745- )
5746- http_options ['skip_project_and_location_in_path' ] = True
5747- config .http_options = http_options
5748- else :
5742+ if not config .query_base :
57495743 # Filter for tuning jobs artifacts by labels.
57505744 filter_value = config .filter
57515745 config .filter = (
Original file line number Diff line number Diff line change @@ -124,3 +124,18 @@ async def test_async_pager(client):
124124 pass
125125 with pytest .raises (IndexError , match = 'No more pages to fetch.' ):
126126 await pager .next_page ()
127+
128+
129+ @pytest .mark .asyncio
130+ async def test_base_models_async_pager (client ):
131+ pager = await client .aio .models .list (config = {'page_size' : 10 , 'query_base' : True })
132+
133+ assert pager .name == 'models'
134+ assert pager .page_size == 10
135+ assert len (pager ) <= 10
136+
137+ # Iterate through all the pages. Then next_page() should raise an exception.
138+ async for _ in pager :
139+ pass
140+ with pytest .raises (IndexError , match = 'No more pages to fetch.' ):
141+ await pager .next_page ()
You can’t perform that action at this time.
0 commit comments