Skip to content

OLS-2604 add google vertex provider#1504

Open
raptorsun wants to merge 2 commits intoopenshift:mainfrom
raptorsun:vertex-ai
Open

OLS-2604 add google vertex provider#1504
raptorsun wants to merge 2 commits intoopenshift:mainfrom
raptorsun:vertex-ai

Conversation

@raptorsun
Copy link
Copy Markdown
Contributor

@raptorsun raptorsun commented Apr 9, 2026

Description

This PR adds Google Vertex AI as a provider.
It has 2 types google_vertex and google_vertex_anthropic, for generic model and Claude models respectively.
This only works in combination of the service PR openshift/lightspeed-service#2877

I typical config for google vertex provider can be:

apiVersion: ols.openshift.io/v1alpha1
kind: OLSConfig
metadata:
  name: cluster
spec:
  llm:
    providers:
      - type: google_vertex
        googleVertexConfig:
          projectID: project-220c95dd-dc02-4f3f-a9a
          location: us-east5
        credentialsSecretRef:
          name: google-vertex-secret
        credentialKey: apitoken
        models:
          - name: gemini-2.5-flash
        name: google_vertex
        url: "https://us-east5-aiplatform.googleapis.com"

  ols:
    introspectionEnabled: false
    byokRAGOnly: false
    defaultModel: gemini-2.5-flash
    defaultProvider: google_vertex
    logLevel: INFO

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@openshift-ci openshift-ci Bot requested review from bparees and xrajesh April 9, 2026 20:48
Signed-off-by: Haoyu Sun <hasun@redhat.com>
@raptorsun
Copy link
Copy Markdown
Contributor Author

/test bundle-e2e-4-21

Comment thread internal/controller/lcore/deployment.go Outdated
DefaultMode: volumeDefaultMode,
},
},
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong. Vertex does not have to be first. Should be

or i, provider := range cr.Spec.LLMConfig.Providers {
if provider.Type == utils.GoogleVertexType || provider.Type == utils.GoogleVertexAnthropicType {
volumeName := fmt.Sprintf("google-vertex-credential-%d", i)
*volumes = append(*volumes, corev1.Volume{
Name: volumeName,
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: provider.CredentialsSecretRef.Name,
DefaultMode: volumeDefaultMode,
},
},
})
// ... corresponding mount
}
}

},
},
},
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not check not 1st vertex provider

Signed-off-by: Haoyu Sun <hasun@redhat.com>
@raptorsun
Copy link
Copy Markdown
Contributor Author

Hello @blublinsky , I updated the code for better managing the vertex providers for llama stack backend.
There is a limitation that when using a credential file, we have to choose one file for the backend authentication using the env var GOOGLE_APPLICATION_CREDENTIALS. elsewise we should use the simple api token that lives very shortly obtained by oauth.
Maybe we can submit a issue for llama stack and we use one of the credential files of vertex provider for the llama stack backend. when llama stack support credential file parameter for vertex ai provider, we can update our operator code accordingly.

@blublinsky
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 21, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: blublinsky

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2026
@raptorsun
Copy link
Copy Markdown
Contributor Author

/test bundle-e2e-4-21

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 21, 2026

@raptorsun: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/bundle-e2e-4-21 25241be link unknown /test bundle-e2e-4-21

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 861f8e6 and 2 for PR HEAD 25241be in total

@raptorsun
Copy link
Copy Markdown
Contributor Author

/retest-required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants