-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
1.8.2
-
None
-
False
-
-
False
-
-
Description of problem:
The lightspeed configuration described in the `lightspeed-stack` ConfigMap requires to use final values and you can use env variables inside `mcp_servers` section. If you use the next definition for your MCP server:
mcp_servers:
- name: mcp::backstage
provider_id: model-context-protocol
url: https://backstage-developer-hub-rhdh-gitlab.${BASEDOMAIN}/api/mcp-actions/v1
It will fail with errors in the `llama-stack` container similar to the ones attached in this case (file: backstage-developer-hub-5546f44f8-8s6qd-llama-stack.log) backstage-developer-hub-5546f44f8-8s6qd-llama-stack.log![]()
The env variable is defined in a secret added into `lightspeed-core` container using the `envFrom` section, such as:
- name: lightspeed-core # Lightspeed Core Service
image: 'quay.io/lightspeed-core/lightspeed-stack:dev-20251021-ee9f08f'
envFrom:
- secretRef:
name: rhdh-secrets
volumeMounts:
- mountPath: /app-root/lightspeed-stack.yaml
name: lightspeed-stack
subPath: lightspeed-stack.yaml
- mountPath: /tmp/data/feedback
name: shared-storage
- mountPath: /tmp/data/transcripts
name: shared-storage
- mountPath: /tmp/data/conversations
name: shared-storage
The variable is available inside the container as we can check from the terminal:
on 🎩 ❯ oc exec $(oc get pod -l rhdh.redhat.com/app=backstage-developer-hub -n rhdh-gitlab -o jsonpath='{.items[0].metadata.name}') -c lightspeed-core -n rhdh-gitlab -- printenv BASEDOMAIN
apps.cluster-mxvsb.mxvsb.sandbox3509.opentlc.com
However, any chat conversation fails in Lightspeed Developer UI. If the `url`variable is defined without env var and using the final value, the chat conversations work succesfully.
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
The following GitHub repository has an example to replicate this error.
https://github.com/rmarting/rhdh-exercises/blob/main/README-ai-ls.md
Here it is the `url` definition using the env var:
Here it is injected the secret with the env variables:
Actual results:
Any chat conversation fails with errors in the `llama-stack` container.
Expected results:
Successful chat conversations and get responses from the LLM and MCP servers.
Reproducibility (Always/Intermittent/Only Once):
Always