Skip to content

Commit 19b9baf

Browse files
committed
Cleanup LLMEndpointType
1 parent 11eb97a commit 19b9baf

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

api/v1beta1/openstacklightspeed_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ type OpenStackLightspeedCore struct {
155155
LLMEndpoint string `json:"llmEndpoint"`
156156

157157
// +kubebuilder:validation:Required
158-
// +kubebuilder:validation:Enum=azure_openai;bam;openai;watsonx;rhoai_vllm;rhelai_vllm;fake_provider;gemini
158+
// +kubebuilder:validation:Enum=azure_openai;openai;watsonx;rhoai_vllm;rhelai_vllm;gemini
159159
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Provider Type"
160160
// Type of the provider serving the LLM
161161
LLMEndpointType string `json:"llmEndpointType"`

bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,10 @@ spec:
103103
description: Type of the provider serving the LLM
104104
enum:
105105
- azure_openai
106-
- bam
107106
- openai
108107
- watsonx
109108
- rhoai_vllm
110109
- rhelai_vllm
111-
- fake_provider
112110
- gemini
113111
type: string
114112
llmProjectID:

config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,10 @@ spec:
103103
description: Type of the provider serving the LLM
104104
enum:
105105
- azure_openai
106-
- bam
107106
- openai
108107
- watsonx
109108
- rhoai_vllm
110109
- rhelai_vllm
111-
- fake_provider
112110
- gemini
113111
type: string
114112
llmProjectID:

internal/controller/llama_stack_config.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,17 @@ func buildLlamaStackInferenceProviders(_ *common_helper.Helper, _ context.Contex
174174
}
175175
providerConfig["config"] = config
176176

177-
case "watsonx", "bam":
177+
case "watsonx":
178+
providerConfig["provider_type"] = "remote::watsonx"
179+
180+
config := map[string]interface{}{}
181+
config["base_url"] = provider.URL
182+
config["project_id"] = provider.WatsonProjectID
183+
config["api_key"] = fmt.Sprintf("${env.%s_API_KEY:=}", envVarName)
184+
185+
providerConfig["config"] = config
186+
187+
case "bam":
178188
// These providers are not supported by Llama Stack
179189
// They are handled directly by lightspeed-stack (LCS), not Llama Stack
180190
return nil, fmt.Errorf("provider type '%s' (provider '%s') is not currently supported by Llama Stack. Supported types: openai, gemini, azure_openai, rhoai_vllm, rhelai_vllm", provider.Type, provider.Name)

0 commit comments

Comments
 (0)