Skip to content

feat(provider): add Vertex AI provider#6202

Closed
DragonBot00 wants to merge 2 commits intokeephq:mainfrom
DragonBot00:feat/vertex-ai-provider
Closed

feat(provider): add Vertex AI provider#6202
DragonBot00 wants to merge 2 commits intokeephq:mainfrom
DragonBot00:feat/vertex-ai-provider

Conversation

@DragonBot00
Copy link
Copy Markdown
Contributor

What

Add a Vertex AI provider that integrates GCP Vertex AI model endpoint monitoring into Keep via Cloud Monitoring.

Why

Closes #6087 — Vertex AI is a core GCP service for serving LLMs. Users deploying Keep on GCP (like the issue requester on GKE) need native Vertex AI alerting support alongside their existing GCP infrastructure monitoring.

How

Vertex AI doesn't expose native webhooks — alerts flow through GCP Cloud Monitoring. This provider:

  1. Auth: Service account JSON with Vertex AI + Cloud Monitoring access (same pattern as the existing gcpmonitoring provider)
  2. Pull alerts: Queries Cloud Monitoring for alert policies targeting aiplatform.googleapis.com/* metrics and fetches their active incidents
  3. Webhook: Creates a GCP Monitoring webhook notification channel pointing to Keep, and optionally sets up 3 default alert policies (high error rate, high latency, endpoint down)
  4. Metrics monitored:
    • aiplatform/prediction/online/error_count — prediction errors
    • aiplatform/prediction/online/latencies — prediction latency spikes
    • aiplatform/prediction/online/prediction_count — endpoint availability

Testing

  • All existing tests pass
  • New tests added for _format_alert with all 4 mock alert scenarios
  • Tests cover severity mapping, status mapping, and edge cases (missing/zero timestamps)
  • Syntax validated locally (full test suite runs in CI)

Files Added

File Description
keep/providers/vertexai_provider/__init__.py Provider package init
keep/providers/vertexai_provider/vertexai_provider.py Provider implementation (27KB)
keep/providers/vertexai_provider/alerts_mock.py 4 mock alert scenarios
tests/test_vertexai_provider.py 22 unit tests

Dependencies Added

  • google-cloud-monitoring = "^2.18.0" in pyproject.toml

Add a Vertex AI provider that integrates GCP Vertex AI model endpoint
monitoring into Keep via Cloud Monitoring.

Features:
- Service account JSON auth (same pattern as gcpmonitoring provider)
- Pull Vertex AI alerts from GCP Cloud Monitoring
- Webhook support via GCP Monitoring notification channels
- Auto-creates 3 default alert policies (error rate, latency, endpoint down)
- Monitors prediction count, error rate, and latency metrics
- 4 mock alert scenarios for testing

Closes keephq#6087
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

@DragonBot00 is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Apr 4, 2026
@dosubot dosubot bot added Dependencies Pull requests that update a dependency file Feature A new feature Provider Providers related issues labels Apr 4, 2026
@shahargl
Copy link
Copy Markdown
Member

shahargl commented Apr 5, 2026

Closing: AI-generated spam.

@shahargl shahargl closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dependencies Pull requests that update a dependency file Feature A new feature Provider Providers related issues size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🔌 Provider]: Vertex AI

2 participants