Skip to content

[RHIDP-11653] Include Lightspeed By Default#202

Open
Jdubrick wants to merge 8 commits intoredhat-developer:mainfrom
Jdubrick:lightspeed-as-default-install
Open

[RHIDP-11653] Include Lightspeed By Default#202
Jdubrick wants to merge 8 commits intoredhat-developer:mainfrom
Jdubrick:lightspeed-as-default-install

Conversation

@Jdubrick
Copy link
Copy Markdown
Contributor

@Jdubrick Jdubrick commented Apr 28, 2026

Description

  • Moves Lightspeed to the main default compose.yaml
  • Moves all Lightspeed configs/files to the root level /configs
    • Subsequently removed the /developer-lightspeed directory
  • Disables the FAB plugin as it is conflicting with the Lightspeed FAB
    • I was told this is being removed anyway, so disabled for now with a comment
  • Splits Lightspeed documentation into 2 pieces
    1. For users wanting to setup an LLM
    2. For maintainers wanting to update configs / plugin etc
  • Updates CI tests as Lightspeed enabled by default so I removed the dedicated Lightspeed compose test

Which issue(s) does this PR fix or relate to

https://redhat.atlassian.net/browse/RHIDP-11653
https://redhat.atlassian.net/browse/RHIDP-11654

PR acceptance criteria

  • Tests updated and passing
  • Documentation updated
  • Built-in TechDocs updated if needed. Note that TechDocs changes may need to be reviewed by a Product Manager and/or Architect to ensure content accuracy, clarity, and alignment with user needs.

How to test changes / Special notes to the reviewer

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
… scripts

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
…ault

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@openshift-ci openshift-ci Bot requested review from rm3l and subhashkhileri April 28, 2026 20:33
@rhdh-qodo-merge
Copy link
Copy Markdown
Contributor

rhdh-qodo-merge Bot commented Apr 28, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. rag-init shell command broken 🐞 Bug ☼ Reliability
Description
In compose.yaml, rag-init uses entrypoint ["/bin/sh","-c"] but passes a command string that
begins/ends with literal double quotes, so the shell treats the whole script as one quoted word and
fails to execute it. This causes rag-init to exit non-zero and blocks lightspeed-core (depends_on:
service_completed_successfully), leaving Lightspeed non-functional by default.
Code

compose.yaml[R83-91]

+    entrypoint: [ "/bin/sh", "-c" ]
+    command: |
+      "set -e; echo 'Copying RAG data...' && \
+      mkdir -p /data/vector_db /data/embeddings_model && \
+      cp -r /rag/vector_db/* /data/vector_db/ && \
+      cp -r /rag/embeddings_model/* /data/embeddings_model/ && \
+      chown -R 1001:0 /data/vector_db /data/embeddings_model || true && \
+      chmod -R a+rwX /data/vector_db /data/embeddings_model && \
+      echo 'Copy complete.'"
Relevance

⭐⭐⭐ High

Team historically accepts compose/runtime-breaking fixes (compose merge/healthcheck failures fixed
in PR #177; compose lint fixes PR #32).

PR-#177
PR-#32

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The command passed to /bin/sh -c starts with a literal " and ends with a literal ", which
makes the shell parse the entire script as a single token (a quoted word) instead of a sequence of
shell commands. Because lightspeed-core depends on rag-init completing successfully, this failure
prevents lightspeed-core from starting.

compose.yaml[74-127]
compose.yaml[94-107]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`rag-init` sets `entrypoint: ["/bin/sh", "-c"]` but the `command: |` content is wrapped in literal double quotes. With `sh -c`, those quotes are part of the command string and cause the shell to interpret the entire multi-command script as one quoted word, so the init container fails and `lightspeed-core` never starts.

### Issue Context
This is now in the default `compose.yaml`, so it impacts every default install.

### Fix Focus Areas
- compose.yaml[74-92]

### Suggested fix
Remove the leading/trailing `"..."` from the `command` block and keep the script as plain shell, e.g.:
```yaml
entrypoint: ["/bin/sh", "-c"]
command: |
 set -e
 echo 'Copying RAG data...'
 mkdir -p /data/vector_db /data/embeddings_model
 cp -r /rag/vector_db/* /data/vector_db/
 cp -r /rag/embeddings_model/* /data/embeddings_model/
 chown -R 1001:0 /data/vector_db /data/embeddings_model || true
 chmod -R a+rwX /data/vector_db /data/embeddings_model
 echo 'Copy complete.'
```
(Keep the existing logic; only fix how it’s passed to `sh -c`.)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Invalid Lightspeed prompts YAML🐞 Bug ≡ Correctness
Description
configs/app-config/app-config.yaml has lightspeed.prompts defined, but the list item is not
indented under prompts:, making the YAML invalid and preventing Backstage from loading the app
config. This can break RHDH startup (or at minimum fail to apply the Lightspeed configuration).
Code

configs/app-config/app-config.yaml[R256-263]

+lightspeed:
+  # OPTIONAL: Custom user prompts displayed in the Lightspeed UI
+  # These appear as suggested questions/prompts to help users get started
+  # If not provided, the plugin uses built-in default prompts
+  prompts:
+  - title: 'Getting Started with Red Hat Developer Hub'
+    message: Can you guide me through the first steps to start using Developer Hub as a developer, like exploring the Software Catalog and adding my service?
+
Relevance

⭐⭐⭐ High

Team fixes app-config changes that prevent startup (bad config/path fixes accepted in PR #83; config
precedence fixes PR #34).

PR-#83
PR-#34

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The - title: line is aligned with prompts: instead of being nested beneath it, which is invalid
YAML for a sequence value and will cause parsing errors when app-config is loaded.

configs/app-config/app-config.yaml[250-263]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The `lightspeed.prompts` YAML is malformed because the list items are not indented under the `prompts:` key. YAML parsers will reject this, and RHDH may fail to start or ignore the Lightspeed config.

### Issue Context
Current snippet:
```yaml
lightspeed:
 prompts:
 - title: ...
```

### Fix Focus Areas
- configs/app-config/app-config.yaml[256-263]

### Suggested fix
Indent the list under `prompts:`:
```yaml
lightspeed:
 prompts:
   - title: 'Getting Started with Red Hat Developer Hub'
     message: Can you guide me through ...
```

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. CSP enables unsafe-eval 🐞 Bug ⛨ Security
Description
configs/app-config/app-config.yaml adds backend.csp.script-src with 'unsafe-eval', which weakens
CSP and increases impact of any XSS by allowing execution via eval/new Function. If this is only
needed for specific dev functionality, it should be gated/limited to avoid broad exposure.
Code

configs/app-config/app-config.yaml[R152-155]

+   script-src:
+     - "'self'"
+     - "'unsafe-eval'"
+     - "https://cdn.jsdelivr.net"
Relevance

⭐⭐ Medium

Repo previously allowed 'unsafe-eval' in Lightspeed app-config example (PR #125 era); no clear
precedent to forbid it.

PR-#125

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The CSP configuration explicitly permits 'unsafe-eval' in script-src, which relaxes the
browser’s script execution restrictions.

configs/app-config/app-config.yaml[142-155]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The app-config CSP now includes `script-src: ['self', 'unsafe-eval', ...]`. Allowing `unsafe-eval` meaningfully weakens CSP defenses.

### Issue Context
This may be required for certain Backstage features, but enabling it globally should be an explicit, justified tradeoff.

### Fix Focus Areas
- configs/app-config/app-config.yaml[142-155]

### Suggested fix options
1. If not strictly required, remove `'unsafe-eval'`.
2. If required, add an explicit comment explaining why and consider scoping it (e.g., only in dev/local builds or via a separate optional local override config) so default installs can keep a stricter CSP when possible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@rhdh-qodo-merge
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Include Lightspeed by default in RHDH Local

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Moves Lightspeed to default compose.yaml, enabling it by default
• Consolidates Lightspeed configs from developer-lightspeed to root /configs
• Disables FAB plugin due to conflict with Lightspeed FAB
• Splits Lightspeed documentation into user and maintainer guides
• Updates CI tests to remove dedicated Lightspeed compose test
Diagram
flowchart LR
  A["developer-lightspeed/<br/>directory structure"] -->|"consolidate configs"| B["configs/extra-files/<br/>lightspeed files"]
  C["developer-lightspeed/<br/>compose.yaml"] -->|"merge into"| D["compose.yaml<br/>default services"]
  E["developer-lightspeed/<br/>README.md"] -->|"split into"| F["docs/lightspeed/<br/>working-with-lightspeed.md"]
  E -->|"split into"| G["docs/lightspeed/<br/>maintaining-lightspeed.md"]
  H["start/stop scripts"] -->|"remove"| I["use standard<br/>compose commands"]
  J["FAB plugin"] -->|"disable"| K["avoid conflict<br/>with Lightspeed FAB"]
Loading

Grey Divider

File Changes

1. developer-lightspeed/scripts/start-lightspeed.sh Removal +0/-92

Removed dedicated Lightspeed startup script

developer-lightspeed/scripts/start-lightspeed.sh


2. developer-lightspeed/scripts/stop-lightspeed.sh Removal +0/-132

Removed dedicated Lightspeed cleanup script

developer-lightspeed/scripts/stop-lightspeed.sh


3. wait-for-plugins-and-start.sh ✨ Enhancement +0/-6

Removed Lightspeed-specific config loading logic

wait-for-plugins-and-start.sh


View more (17)
4. configs/extra-files/rhdh-profile.py ✨ Enhancement +47/-58

Updated system prompts and question validation logic

configs/extra-files/rhdh-profile.py


5. .github/workflows/test.yml ⚙️ Configuration changes +0/-2

Removed dedicated developer-lightspeed compose test

.github/workflows/test.yml


6. README.md 📝 Documentation +2/-1

Updated Lightspeed documentation links to new locations

README.md


7. compose.yaml ✨ Enhancement +56/-0

Added Lightspeed services to default compose configuration

compose.yaml


8. configs/app-config/app-config.yaml ✨ Enhancement +31/-1

Added Lightspeed plugin config and CSP settings

configs/app-config/app-config.yaml


9. configs/dynamic-plugins/dynamic-plugins.yaml ✨ Enhancement +38/-1

Added Lightspeed plugins, disabled FAB plugin

configs/dynamic-plugins/dynamic-plugins.yaml


10. configs/extra-files/config.yaml ✨ Enhancement +38/-48

Updated Llama Stack validation provider configuration

configs/extra-files/config.yaml


11. default.env 📝 Documentation +1/-1

Updated documentation reference for Lightspeed config

default.env


12. developer-lightspeed/README.md Removal +0/-469

Removed old Lightspeed setup documentation

developer-lightspeed/README.md


13. developer-lightspeed/compose.yaml Removal +0/-66

Removed separate Lightspeed compose file

developer-lightspeed/compose.yaml


14. developer-lightspeed/configs/app-config/app-config.lightspeed.local.example.yaml Removal +0/-49

Removed Lightspeed-specific app config example

developer-lightspeed/configs/app-config/app-config.lightspeed.local.example.yaml


15. developer-lightspeed/configs/dynamic-plugins/dynamic-plugins.lightspeed.yaml Removal +0/-43

Removed separate Lightspeed dynamic plugins config

developer-lightspeed/configs/dynamic-plugins/dynamic-plugins.lightspeed.yaml


16. docs/lightspeed/maintaining-lightspeed.md 📝 Documentation +96/-0

New maintainer guide for Lightspeed configuration

docs/lightspeed/maintaining-lightspeed.md


17. docs/lightspeed/working-with-lightspeed.md 📝 Documentation +327/-0

New user guide for configuring Lightspeed providers

docs/lightspeed/working-with-lightspeed.md


18. configs/extra-files/lightspeed-stack.yaml Additional files +0/-0

...

configs/extra-files/lightspeed-stack.yaml


19. configs/extra-files/templates/placeholder.json Additional files +0/-0

...

configs/extra-files/templates/placeholder.json


20. scripts/sync-lightspeed-configs.sh Additional files +0/-0

...

scripts/sync-lightspeed-configs.sh


Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request Tests labels Apr 28, 2026
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

@Jdubrick
Copy link
Copy Markdown
Contributor Author

Comment about rag init is not the case, functioning as expected.

@maysunfaisal
Copy link
Copy Markdown
Contributor

IIRC UI team had an interest in the FAB pieces, previously we set it aside to merge the PR

Copy link
Copy Markdown
Contributor

@maysunfaisal maysunfaisal left a comment

Choose a reason for hiding this comment

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

generally lgtm

@Jdubrick
Copy link
Copy Markdown
Contributor Author

/cc @karthikjeeyar

@openshift-ci openshift-ci Bot requested a review from karthikjeeyar April 28, 2026 21:15
Copy link
Copy Markdown
Member

@karthikjeeyar karthikjeeyar left a comment

Choose a reason for hiding this comment

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

Verified locally! Changes looks good to me. I have one small request to include notebook configuration.

Image

# OPTIONAL: Custom system prompt to override the default RHDH system prompt
# The system prompt defines the assistant's behavior and knowledge scope
# Default: Built-in RHDH-focused system prompt
# systemPrompt: "You are a helpful assistant focused on Red Hat Developer Hub development."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI Notebook feature is available to try out. I think we should add that configuration here (atleast as an optional with commented code), This will help folks to try out this latest feature and it will help us to get more feedback.

Image

Working config with local ollama:

Suggested change
# systemPrompt: "You are a helpful assistant focused on Red Hat Developer Hub development."
# systemPrompt: "You are a helpful assistant focused on Red Hat Developer Hub development."
# Notebook configuration for AI Notebooks plugin
notebooks:
enabled: true
queryDefaults:
model: llama3.2:3b # Set the model to use for AI Notebooks
provider_id: vllm # Set the provider ID to use for AI Notebooks
sessionDefaults:
provider_id: notebooks # Set the provider ID to use for AI Notebooks
embedding_model: sentence-transformers/rag-content/embeddings_model # Set the embedding model to use for AI Notebooks
embedding_dimension: 768
servers:
- id: vllm
url: http://host.docker.internal:11434/v1
token: unused

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@karthikjeeyar good idea!

@JslYoon can you confirm what needs to go in the config with your new set of defaults? I think you changed it recently and it differs from this (working) suggestion?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@JslYoon I just realised lightseed backend config.d.ts isn't up-to-date, it still have aiNotebooks in the configuration -

https://github.com/redhat-developer/rhdh-plugins/blob/main/workspaces/lightspeed/plugins/lightspeed-backend/config.d.ts

we may have to fix the correct configuration in rhdh-plugins repo and also update it in the documentation there.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes sorry I have missed that. working on it right now. @karthikjeeyar

@karthikjeeyar
Copy link
Copy Markdown
Member

Even though it works, I have noticed this double slash in the embedding_model sentence-transformers//rag-content/embeddings_model, could you please fix this?

https://github.com/Jdubrick/rhdh-local/blob/bd3ac1d49709b1a0421df711d225bbb29326e13c/configs/extra-files/config.yaml#L192

@Jdubrick
Copy link
Copy Markdown
Contributor Author

Even though it works, I have noticed this double slash in the embedding_model sentence-transformers//rag-content/embeddings_model, could you please fix this?

https://github.com/Jdubrick/rhdh-local/blob/bd3ac1d49709b1a0421df711d225bbb29326e13c/configs/extra-files/config.yaml#L192

@karthikjeeyar That unfortunately has to be there, the way Llama Stack references the embedding model since its mounted locally and not remote needs that for the pathing :/

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants