Skip to content

Commit 292e540

Browse files
authored
Update anthropic_claude_intro.ipynb (#4501)
add opus 4.7 multi region endpoint support b/491171457
1 parent 6c6a703 commit 292e540

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

notebooks/official/generative_ai/anthropic_claude_intro.ipynb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
"if MODEL == \"claude-opus-4-7\":\n",
214214
" available_regions = [\n",
215215
" \"global\",\n",
216+
" \"us\",\n",
217+
" \"eu\",\n",
216218
" ]\n",
217219
"elif MODEL == \"claude-sonnet-4-6\":\n",
218220
" available_regions = [\n",
@@ -319,9 +321,12 @@
319321
"outputs": [],
320322
"source": [
321323
"PROJECT_ID = \"[your-project-id]\" # @param {type:\"string\"}\n",
324+
"MULTI_REGION_LIST = [\"us\", \"eu\"]\n",
322325
"\n",
323326
"if LOCATION == \"global\":\n",
324327
" ENDPOINT = \"https://aiplatform.googleapis.com\"\n",
328+
"elif LOCATION in MULTI_REGION_LIST:\n",
329+
" ENDPOINT = f\"https://aiplatform.{LOCATION}.rep.googleapis.com\"\n",
325330
"else:\n",
326331
" ENDPOINT = f\"https://{LOCATION}-aiplatform.googleapis.com\"\n",
327332
"\n",
@@ -678,6 +683,8 @@
678683
"if MODEL == \"claude-opus-4-7\":\n",
679684
" available_regions = [\n",
680685
" \"global\",\n",
686+
" \"us\",\n",
687+
" \"eu\",\n",
681688
" ]\n",
682689
"elif MODEL == \"claude-sonnet-4-6\":\n",
683690
" available_regions = [\n",

0 commit comments

Comments
 (0)