Google Vertex AI integration for OutSystems Developer Cloud (ODC).
Exposes calls as Server Actions you can drag into any ODC app or library.
# Create the service account
gcloud iam service-accounts create odc-vertex-ai \
--display-name="ODC Vertex AI"
# Grant Vertex AI User role
gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
--member="serviceAccount:odc-vertex-ai@YOUR_PROJECT_ID.iam.gserviceaccount.com" \
--role="roles/aiplatform.user"
# Download the JSON key
gcloud iam service-accounts keys create sa-key.json \
--iam-account=odc-vertex-ai@YOUR_PROJECT_ID.iam.gserviceaccount.comStore the full contents of sa-key.json in an ODC Secret or Settings value.
Never hard-code it in your app.
gcloud services enable aiplatform.googleapis.comCall GetSupportedRegions to list valid values. Besides single regions (e.g. europe-west4),
the library supports the multi-regions eu and us, and the global endpoint:
| Region | Host | Request path |
|---|---|---|
europe-west4 |
europe-west4-aiplatform.googleapis.com |
projects/<PROJECT_ID>/locations/europe-west4/... |
eu |
aiplatform.eu.rep.googleapis.com |
projects/<PROJECT_ID>/locations/eu/... |
us |
aiplatform.us.rep.googleapis.com |
projects/<PROJECT_ID>/locations/us/... |
global |
aiplatform.googleapis.com |
projects/<PROJECT_ID>/locations/global/... |
Use eu when EU data residency is mandatory. global does not guarantee data
residency (requests may be served from any region), so don't use it when residency is required.
Every generation action takes a Publisher parameter (call GetSupportedPublishers for valid values):
| Publisher | Models (examples) | Transport |
|---|---|---|
google |
gemini-2.0-flash-001 |
gRPC GenerateContent |
anthropic |
claude-sonnet-4@20250514 |
rawPredict (Anthropic Messages format) |
Model availability varies by publisher and region; Claude models must be enabled in the Vertex AI Model Garden for your project, and are not offered in every region.
GenerateContent and GenerateContentWithSystemPrompt return the token usage of the call as extra outputs, for cost allocation:
| Output | Google (usageMetadata) |
Anthropic (usage) |
|---|---|---|
InputTokens |
promptTokenCount |
input_tokens |
OutputTokens |
candidatesTokenCount |
output_tokens |
CachedInputTokens |
0 (not exposed by the SDK) | cache_read_input_tokens |
CacheCreationInputTokens |
0 | cache_creation_input_tokens |
ThinkingTokens |
totalTokenCount − promptTokenCount − candidatesTokenCount |
0 (included in OutputTokens) |
TotalTokens |
totalTokenCount |
sum of all of the above input/output counts |
# Restore packages
dotnet restore
# Publish (self-contained, no runtime needed in ODC)
dotnet publish -c Release -o ./publish
# Zip the publish output — this is what you upload to ODC Portal
cd publish
zip -r ../VertexAILibrary.zip .- Open ODC Portal → Integrate → External Libraries
- Click Upload
- Select
VertexAILibrary.zip - Wait for validation and publishing to complete