Add Vertex AI inference providers - #41
Conversation
PR Summary by QodoAdd Gemini (OpenAI-compatible) and Vertex AI inference providers
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
| - ../lightspeed-core-configs/rhdh-profile.py:/app-root/rhdh-profile.py:Z | ||
| - ../llama-stack-configs/config.yaml:/app-root/config.yaml:Z | ||
| - ../rag-content:/rag-content:Z | ||
| # Only used when the vertexai provider is configured. Falls back to a |
There was a problem hiding this comment.
2. Invalid gcp creds placeholder 🐞 Bug ☼ Reliability
compose/compose.yaml defaults the credentials bind-mount to an {} placeholder file, while
default-values.env points GOOGLE_APPLICATION_CREDENTIALS at that mounted path. When Vertex AI is
used, Google auth will read an invalid credentials JSON, causing authentication/configuration
failures unless GOOGLE_APPLICATION_CREDENTIALS_HOST_PATH is explicitly set to a real credentials
file.
Agent Prompt
## Issue description
The compose setup always mounts a file at `/app-root/gcp-credentials.json`, defaulting to `env/gcp-credentials-placeholder.json` which contains `{}`. At the same time, `env/default-values.env` sets `GOOGLE_APPLICATION_CREDENTIALS=/app-root/gcp-credentials.json`, forcing Google auth to read the placeholder when users haven’t configured real credentials.
## Issue Context
This creates a confusing failure mode: Vertex AI usage will fail due to an invalid credentials JSON even though the environment variable is set and a file exists.
## Fix Focus Areas
- compose/compose.yaml[21-33]
- env/default-values.env[21-31]
- env/gcp-credentials-placeholder.json[1-1]
## Suggested fix
Avoid setting `GOOGLE_APPLICATION_CREDENTIALS` by default when the host credentials path is unset. Options:
1) Remove `GOOGLE_APPLICATION_CREDENTIALS` from `env/default-values.env` (leave it empty), and set it only in `env/values.env` when using Vertex.
2) Alternatively, set it in `compose/compose.yaml` using conditional interpolation (only set when `GOOGLE_APPLICATION_CREDENTIALS_HOST_PATH` is non-empty), and keep the placeholder mount purely to prevent mount errors.
Also consider updating docs wording to reflect whichever behavior you choose.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Signed-off-by: Stephanie <yangcao@redhat.com>
These providers are now injected by generate-gitops-manifests.sh for the GitOps deployment and added via lightspeed-stack.local.yaml for local testing, so the tracked baseline stays in sync with origin/main. Co-authored-by: Cursor <cursoragent@cursor.com>
df06e85 to
e5d5512
Compare
…ocal.yaml override Extends the existing GitOps script injection pattern (already used for vllm/openai) to also add gemini (config.yaml) and vertexai (lightspeed-stack.yaml), keeping the tracked baseline files in sync with origin/main. Adds a config.local.yaml override mechanism (mirroring lightspeed-stack.local.yaml) so gemini/vertexai/openai/vllm can still be tested locally, and updates CONTRIBUTING.md/PROVIDERS.md accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Stephanie <yangcao@redhat.com>
7f0bc5e to
3a9eff4
Compare
Signed-off-by: Stephanie <yangcao@redhat.com>
Signed-off-by: Stephanie <yangcao@redhat.com>
Summary
vertexaiinference providers tolightspeed-core-configs/lightspeed-stack.yamlGOOGLE_APPLICATION_CREDENTIALS_HOST_PATHvolume mount incompose/compose.yaml(with a harmless empty placeholder fallback via the newenv/gcp-credentials-placeholder.jsonso the mount never fails when unset), and updatesenv/default-values.envaccordingly.docs/PROVIDERS.mdfor expanded Vertex AI credential setup instructions.Test plan
make local-up) againstquay.io/lightspeed-core/lightspeed-stack:dev-20260710-2c3e52e; container reachedhealthy.GET /v1/modelsreturns models for vertex new providerPOST /v1/queryreturns a valid response usingprovider: vertexai.