#vertex-ai global location with BYOK integration

23 messages · Page 1 of 1 (latest)

flat crag
#

vertex-ai has a new feature of global location to reduce hitting rate limits, any plans on adding it to BYOK vertex-ai integration? Right now, users have to specify the region for the service account.

drifting onyx
#

👍

willow barn
#

works fine if you specify "region": "global" in the service account JSON. enabling vertex logging shows that OR is hitting the global region:

{
    "endpoint": "projects/ai-spike-test-2025/locations/global/publishers/google/models/gemini-2.5-flash",
    "contents": [
        {
            "role": "user",
            "parts": [
                {
                    "text": "OR chatroom test"
                }
            ]
        }
    ],
    "safetySettings": [
        {
            "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
            "threshold": "OFF"
        },
        {
            "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
            "threshold": "OFF"
        },
        {
            "category": "HARM_CATEGORY_HATE_SPEECH",
            "threshold": "OFF"
        },
        {
            "category": "HARM_CATEGORY_HARASSMENT",
            "threshold": "OFF"
        },
        {
            "category": "HARM_CATEGORY_CIVIC_INTEGRITY",
            "threshold": "OFF"
        }
    ],
    "generationConfig": {
        "temperature": 1,
        "topP": 1,
        "candidateCount": 1,
        "maxOutputTokens": 65535,
        "thinkingConfig": {
            "includeThoughts": true,
            "thinkingBudget": 24576
        }
    },
    "model": "projects/ai-spike-test-2025/locations/global/publishers/google/models/gemini-2.5-flash"
}
flat crag
#

<@&1384697330254610442>
I have been trying to add the service account but doesn't seem to be working. The test works but when I save it, the page reloads, I see in the network tab that the entire service account json is being sent through url params.

flat crag
willow barn
#

You can ignore the test and save it anyways, the test uses a free experimental model that isn't available in the global region.

#

If you're not sure you've assigned IAM roles correctly to the service account, you can temporarily set the region to us-central1 and use the test button.

flat crag
#

the IAM is set correctly as I have been using the same locally.

willow barn
#

does it say "Disabled" with the key id in the text box? If so, click the Disabled toggle.

flat crag
#

I am not sure if need to format the service account in a specific way,

these are the keys I am having.

{"type": "service_account",
"region": "global",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "",
"universe_domain": "googleapis.com"}
flat crag
flat crag
willow barn
#

I just did and it went through fine

flat crag
flat crag
willow barn
#

I just took the service account key JSON as is, and added "region": "global".

flat crag
#

I am doing the exact same, I even tested on a different browser, still the same.

#

I am lost, I am pretty sure I missing something but can't figure

#

I have tested it on my personal account , on org account, tested it with different service accounts still the same.

#

I am willing to jump on a call to debug this if anyone from openrouter are available.

mystic cairn
flat crag