Skip to content

Commit 306abbc

Browse files
Update regions url and VertexAIRegion Literal (#1068)
1 parent 13ece6d commit 306abbc

File tree

2 files changed

+30
-48
lines changed

2 files changed

+30
-48
lines changed

pydantic_ai_slim/pydantic_ai/models/vertexai.py

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,13 @@ def _refresh_token(self) -> str:
224224

225225

226226
VertexAiRegion = Literal[
227-
'us-central1',
228-
'us-east1',
229-
'us-east4',
230-
'us-south1',
231-
'us-west1',
232-
'us-west2',
233-
'us-west3',
234-
'us-west4',
235-
'us-east5',
227+
'asia-east1',
228+
'asia-east2',
229+
'asia-northeast1',
230+
'asia-northeast3',
231+
'asia-south1',
232+
'asia-southeast1',
233+
'australia-southeast1',
236234
'europe-central2',
237235
'europe-north1',
238236
'europe-southwest1',
@@ -243,27 +241,20 @@ def _refresh_token(self) -> str:
243241
'europe-west6',
244242
'europe-west8',
245243
'europe-west9',
246-
'europe-west12',
247-
'africa-south1',
248-
'asia-east1',
249-
'asia-east2',
250-
'asia-northeast1',
251-
'asia-northeast2',
252-
'asia-northeast3',
253-
'asia-south1',
254-
'asia-southeast1',
255-
'asia-southeast2',
256-
'australia-southeast1',
257-
'australia-southeast2',
258244
'me-central1',
259245
'me-central2',
260246
'me-west1',
261247
'northamerica-northeast1',
262-
'northamerica-northeast2',
263248
'southamerica-east1',
264-
'southamerica-west1',
249+
'us-central1',
250+
'us-east1',
251+
'us-east4',
252+
'us-east5',
253+
'us-south1',
254+
'us-west1',
255+
'us-west4',
265256
]
266257
"""Regions available for Vertex AI.
267258
268-
More details [here](https://cloud.google.com/vertex-ai/docs/reference/rest#rest_endpoints).
259+
More details [here](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#genai-locations).
269260
"""

pydantic_ai_slim/pydantic_ai/providers/google_vertex.py

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,13 @@ async def _creds_from_file(service_account_file: str | Path) -> ServiceAccountCr
155155

156156

157157
VertexAiRegion = Literal[
158-
'us-central1',
159-
'us-east1',
160-
'us-east4',
161-
'us-south1',
162-
'us-west1',
163-
'us-west2',
164-
'us-west3',
165-
'us-west4',
166-
'us-east5',
158+
'asia-east1',
159+
'asia-east2',
160+
'asia-northeast1',
161+
'asia-northeast3',
162+
'asia-south1',
163+
'asia-southeast1',
164+
'australia-southeast1',
167165
'europe-central2',
168166
'europe-north1',
169167
'europe-southwest1',
@@ -174,27 +172,20 @@ async def _creds_from_file(service_account_file: str | Path) -> ServiceAccountCr
174172
'europe-west6',
175173
'europe-west8',
176174
'europe-west9',
177-
'europe-west12',
178-
'africa-south1',
179-
'asia-east1',
180-
'asia-east2',
181-
'asia-northeast1',
182-
'asia-northeast2',
183-
'asia-northeast3',
184-
'asia-south1',
185-
'asia-southeast1',
186-
'asia-southeast2',
187-
'australia-southeast1',
188-
'australia-southeast2',
189175
'me-central1',
190176
'me-central2',
191177
'me-west1',
192178
'northamerica-northeast1',
193-
'northamerica-northeast2',
194179
'southamerica-east1',
195-
'southamerica-west1',
180+
'us-central1',
181+
'us-east1',
182+
'us-east4',
183+
'us-east5',
184+
'us-south1',
185+
'us-west1',
186+
'us-west4',
196187
]
197188
"""Regions available for Vertex AI.
198189
199-
More details [here](https://cloud.google.com/vertex-ai/docs/reference/rest#rest_endpoints).
190+
More details [here](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#genai-locations).
200191
"""

0 commit comments

Comments
 (0)