LCORE-1472: use single config set#1467
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 8 minutes and 43 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughIntroduce environment-driven LLaMA hostname/port for E2E, remove Prow-specific Lightspeed YAMLs in favor of shared server-mode templates, and consolidate test config resolution and pipeline scripts to use repository-root–anchored config locations and new path helpers. Changes
Sequence Diagram(s)sequenceDiagram
participant CI as CI Workflow
participant Compose as Docker Compose / Container
participant Tests as E2E Tests (Behave)
participant Llama as LLaMA Stack
CI->>Compose: set E2E_LLAMA_HOSTNAME / E2E_LLAMA_PORT env
CI->>Tests: start E2E pipeline (uses repo-root config paths)
Compose->>Llama: container runtime exposes hostname/port (env)
Tests->>Llama: read ${env.E2E_LLAMA_HOSTNAME} -> connect to http://${env.E2E_LLAMA_HOSTNAME}:8321
Llama-->>Tests: respond to test requests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docker-compose.yaml`:
- Around line 101-103: The docker-compose env E2E_LLAMA_PORT is being set but
the mounted lightspeed-stack*.yaml still hardcodes llama_stack.url to use port
8321; update the lightspeed-stack*.yaml templates to interpolate the port (e.g.
use ${env.E2E_LLAMA_PORT} when constructing llama_stack.url) so the app's
upstream endpoint and the helper clients use the same port, or remove
E2E_LLAMA_PORT from docker-compose until you add that substitution; look for the
llama_stack.url key in the lightspeed-stack.yaml files and replace the literal
:8321 with an environment variable reference matching E2E_LLAMA_PORT.
In `@tests/e2e-prow/rhoai/pipeline.sh`:
- Around line 198-201: Replace the two raw oc create configmap invocations for
llama-stack-config and lightspeed-stack-config with the same apply pattern used
elsewhere: generate the ConfigMap YAML with --from-file and --dry-run=client -o
yaml and pipe to oc apply -f - so reruns won't fail with AlreadyExists; update
the commands that reference "$REPO_ROOT/tests/e2e-prow/rhoai/configs/run.yaml"
and "$REPO_ROOT/tests/e2e/configuration/server-mode/lightspeed-stack.yaml"
accordingly.
In `@tests/e2e/configuration/server-mode/lightspeed-stack-auth-rh-identity.yaml`:
- Line 11: The URL in the configuration hardcodes port 8321 while the hostname
already uses ${env.E2E_LLAMA_HOSTNAME}; update that URL to also use the
environment variable ${env.E2E_LLAMA_PORT} (i.e., change the url value that
currently uses :8321 to use :${env.E2E_LLAMA_PORT}) so the Llama Stack port is
parameterized consistently with the hostname.
In `@tests/e2e/configuration/server-mode/lightspeed-stack.yaml`:
- Line 12: The url line currently depends on E2E_LLAMA_HOSTNAME with no
fallback; change the env substitution to use the same defaulting pattern used
elsewhere so it won't break when the variable is missing (replace the value for
the url key that uses E2E_LLAMA_HOSTNAME with a default, e.g. use
${env.E2E_LLAMA_HOSTNAME:-localhost} so the url becomes
http://${env.E2E_LLAMA_HOSTNAME:-localhost}:8321).
In `@tests/e2e/features/environment.py`:
- Around line 60-62: _get_config_path currently returns repo-relative paths
which fail in Prow; change it to return absolute paths. Update the function
_get_config_path to resolve the stored _CONFIG_PATHS entry against the
repository root (use Path(__file__).resolve().parents[...] or equivalent) and
return an absolute path (Path(...).resolve().as_posix() or
str(Path(...).resolve())). Ensure callers like before_feature, before_scenario
and switch_config receive the absolute path so Prow/Konflux can locate the
YAMLs; keep the existing formatting with mode_dir when building the path.
In `@tests/e2e/features/steps/common.py`:
- Around line 36-49: The tests leak context.lightspeed_stack_config_directory
across features causing state bleed; update the Behave after_feature(context,
feature) hook to remove this attribute if present (use hasattr(context,
"lightspeed_stack_config_directory") then delattr(context,
"lightspeed_stack_config_directory")) so each feature starts clean; ensure the
existing before_feature/after_feature hooks remain but add this cleanup
alongside them and reference the step function
set_lightspeed_stack_config_directory which sets the attribute.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: d0012aa4-3807-40bd-9540-4ef6d6f55717
📒 Files selected for processing (37)
.github/workflows/e2e_tests.yamldocker-compose.yamldocs/e2e_testing.mdtests/e2e-prow/rhoai/configs/lightspeed-stack-auth-noop-token.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-auth-rh-identity.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-inline-rag.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-invalid-feedback-storage.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-invalid-mcp-file-auth.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-client-auth.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-file-auth.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-kubernetes-auth.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-oauth-auth.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-mcp.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-no-cache.yamltests/e2e-prow/rhoai/configs/lightspeed-stack-rbac.yamltests/e2e-prow/rhoai/configs/lightspeed-stack.yamltests/e2e-prow/rhoai/pipeline-konflux.shtests/e2e-prow/rhoai/pipeline.shtests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yamltests/e2e/configuration/server-mode/lightspeed-stack-auth-rh-identity.yamltests/e2e/configuration/server-mode/lightspeed-stack-inline-rag.yamltests/e2e/configuration/server-mode/lightspeed-stack-invalid-feedback-storage.yamltests/e2e/configuration/server-mode/lightspeed-stack-invalid-mcp-file-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-client-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-kubernetes-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-oauth-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp.yamltests/e2e/configuration/server-mode/lightspeed-stack-no-cache.yamltests/e2e/configuration/server-mode/lightspeed-stack-no-mcp.yamltests/e2e/configuration/server-mode/lightspeed-stack-rbac.yamltests/e2e/configuration/server-mode/lightspeed-stack.yamltests/e2e/features/environment.pytests/e2e/features/inline_rag.featuretests/e2e/features/steps/common.pytests/e2e/utils/utils.py
💤 Files with no reviewable changes (13)
- tests/e2e-prow/rhoai/configs/lightspeed-stack-auth-noop-token.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-invalid-feedback-storage.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-no-cache.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-client-auth.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-oauth-auth.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-invalid-mcp-file-auth.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-kubernetes-auth.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-mcp.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-auth-rh-identity.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-inline-rag.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-rbac.yaml
- tests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-file-auth.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: build-pr
- GitHub Check: E2E: library mode / ci
- GitHub Check: E2E Tests for Lightspeed Evaluation job
- GitHub Check: E2E: server mode / ci
🧰 Additional context used
📓 Path-based instructions (2)
tests/e2e/features/**/*.feature
📄 CodeRabbit inference engine (AGENTS.md)
Use behave (BDD) framework with Gherkin feature files for end-to-end tests
Files:
tests/e2e/features/inline_rag.feature
tests/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
tests/**/*.py: Use pytest for all unit and integration tests; do not use unittest
Usepytest.mark.asynciomarker for async unit tests
Files:
tests/e2e/features/environment.pytests/e2e/utils/utils.pytests/e2e/features/steps/common.py
🧠 Learnings (10)
📚 Learning: 2025-09-02T11:09:40.404Z
Learnt from: radofuchs
Repo: lightspeed-core/lightspeed-stack PR: 485
File: tests/e2e/features/environment.py:87-95
Timestamp: 2025-09-02T11:09:40.404Z
Learning: In the lightspeed-stack e2e tests, noop authentication tests use the default lightspeed-stack.yaml configuration, while noop-with-token tests use the Authorized tag to trigger a config swap to the specialized noop-with-token configuration file.
Applied to files:
tests/e2e/configuration/server-mode/lightspeed-stack-auth-rh-identity.yamltests/e2e/features/inline_rag.featuretests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-oauth-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-invalid-mcp-file-auth.yaml
📚 Learning: 2025-12-18T10:21:09.038Z
Learnt from: are-ces
Repo: lightspeed-core/lightspeed-stack PR: 935
File: run.yaml:114-115
Timestamp: 2025-12-18T10:21:09.038Z
Learning: In Llama Stack version 0.3.x, telemetry provider configuration is not supported under the `providers` section in run.yaml configuration files. Telemetry can be enabled with just `telemetry.enabled: true` without requiring an explicit provider block.
Applied to files:
tests/e2e/configuration/server-mode/lightspeed-stack-auth-rh-identity.yamltests/e2e/configuration/server-mode/lightspeed-stack-inline-rag.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-oauth-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-no-cache.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp.yamltests/e2e/configuration/server-mode/lightspeed-stack-no-mcp.yamltests/e2e/configuration/server-mode/lightspeed-stack-rbac.yamltests/e2e/configuration/server-mode/lightspeed-stack.yamltests/e2e/configuration/server-mode/lightspeed-stack-invalid-feedback-storage.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-kubernetes-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-client-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-invalid-mcp-file-auth.yaml
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Place E2E step definitions in `tests/e2e/features/steps/`
Applied to files:
tests/e2e/features/inline_rag.featuretests/e2e/features/steps/common.py
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Applies to tests/e2e/features/**/*.feature : Use behave (BDD) framework with Gherkin feature files for end-to-end tests
Applied to files:
tests/e2e/features/inline_rag.feature
📚 Learning: 2025-09-02T11:15:02.411Z
Learnt from: radofuchs
Repo: lightspeed-core/lightspeed-stack PR: 485
File: tests/e2e/test_list.txt:2-3
Timestamp: 2025-09-02T11:15:02.411Z
Learning: In the lightspeed-stack e2e tests, the Authorized tag is intentionally omitted from noop authentication tests because they are designed to test against the default lightspeed-stack.yaml configuration rather than the specialized noop-with-token configuration.
Applied to files:
tests/e2e/features/inline_rag.featuretests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yaml
📚 Learning: 2025-09-02T11:09:23.107Z
Learnt from: radofuchs
Repo: lightspeed-core/lightspeed-stack PR: 485
File: tests/e2e/features/authorized_noop.feature:11-11
Timestamp: 2025-09-02T11:09:23.107Z
Learning: The authorized endpoint in the lightspeed-stack project does not use the /v1 API prefix and should be accessed directly as "authorized" rather than "/v1/authorized".
Applied to files:
tests/e2e/features/inline_rag.featuretests/e2e/configuration/server-mode/lightspeed-stack-mcp-auth.yaml
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Applies to src/**/*.py : Use `from llama_stack_client import AsyncLlamaStackClient` for Llama Stack imports
Applied to files:
tests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-oauth-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-no-cache.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp.yamltests/e2e/configuration/server-mode/lightspeed-stack-no-mcp.yamltests/e2e/configuration/server-mode/lightspeed-stack-rbac.yamltests/e2e/configuration/server-mode/lightspeed-stack.yamltests/e2e/configuration/server-mode/lightspeed-stack-invalid-feedback-storage.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-kubernetes-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-mcp-client-auth.yamltests/e2e/configuration/server-mode/lightspeed-stack-invalid-mcp-file-auth.yaml
📚 Learning: 2026-02-19T10:06:58.708Z
Learnt from: radofuchs
Repo: lightspeed-core/lightspeed-stack PR: 1181
File: tests/e2e-prow/rhoai/manifests/lightspeed/mock-jwks.yaml:32-34
Timestamp: 2026-02-19T10:06:58.708Z
Learning: In tests/e2e-prow/rhoai/, ConfigMaps like mock-jwks-script and mcp-mock-server-script are created dynamically by the pipeline.sh deployment script using `oc create configmap` commands, rather than being defined as static ConfigMap resources in the manifest YAML files.
Applied to files:
tests/e2e-prow/rhoai/pipeline-konflux.shtests/e2e-prow/rhoai/pipeline.shdocs/e2e_testing.md
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Maintain E2E test list in `tests/e2e/test_list.txt`
Applied to files:
docs/e2e_testing.md
📚 Learning: 2025-08-25T09:11:38.701Z
Learnt from: radofuchs
Repo: lightspeed-core/lightspeed-stack PR: 445
File: tests/e2e/features/environment.py:0-0
Timestamp: 2025-08-25T09:11:38.701Z
Learning: In the Behave Python testing framework, the Context object is created once for the entire test run and reused across all features and scenarios. Custom attributes added to the context persist until explicitly cleared, so per-scenario state should be reset in hooks to maintain test isolation.
Applied to files:
tests/e2e/features/steps/common.py
🔇 Additional comments (15)
tests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yaml (1)
12-12: Same environment variable pattern as other server-mode configs.This file uses the same
${env.E2E_LLAMA_HOSTNAME}pattern. The concerns about environment variable fallback behavior and port parameterization raised forlightspeed-stack-auth-rh-identity.yamlapply here as well.tests/e2e/configuration/server-mode/lightspeed-stack-mcp-oauth-auth.yaml (1)
12-12: Same environment variable pattern as other server-mode configs.This file follows the same
${env.E2E_LLAMA_HOSTNAME}pattern. See the review comment onlightspeed-stack-auth-rh-identity.yamlfor detailed concerns about environment variable handling and port parameterization.tests/e2e/configuration/server-mode/lightspeed-stack-mcp.yaml (1)
12-12: Same environment variable pattern as other server-mode configs.This file follows the same
${env.E2E_LLAMA_HOSTNAME}pattern. Refer to the review comment onlightspeed-stack-auth-rh-identity.yamlfor the analysis of environment variable handling and port parameterization concerns.tests/e2e/configuration/server-mode/lightspeed-stack-mcp-auth.yaml (1)
12-12: Same environment variable pattern as other server-mode configs.This file uses the same
${env.E2E_LLAMA_HOSTNAME}pattern. The environment variable handling and port parameterization concerns discussed inlightspeed-stack-auth-rh-identity.yamlapply equally here.tests/e2e/configuration/server-mode/lightspeed-stack-rbac.yaml (1)
12-12: Same environment variable pattern as other server-mode configs.This file follows the same
${env.E2E_LLAMA_HOSTNAME}pattern. The concerns about environment variable fallback and port parameterization raised forlightspeed-stack-auth-rh-identity.yamlapply to this file as well.docs/e2e_testing.md (1)
78-78: Documentation update correctly reflects the consolidated config approach.The updated comment accurately describes the new structure where
tests/e2e-prow/configs/contains only the vLLM Llama Stackrun.yamlused by the Prow pipeline, aligning with the PR's objective to consolidate Prow-specific configurations.tests/e2e/features/inline_rag.feature (1)
8-8: 🧹 Nitpick | 🔵 TrivialRemove the redundant configuration directory step.
The explicit step on line 8 sets the configuration directory to
tests/e2e/configuration, which is already the default used by theconfigure_servicestep when this directive is omitted. Other feature files (e.g.,tls.feature) rely on this default without explicitly setting it. This line adds unnecessary verbosity without changing behavior.⛔ Skipped due to learnings
Learnt from: CR Repo: lightspeed-core/lightspeed-stack PR: 0 File: AGENTS.md:0-0 Timestamp: 2026-04-05T12:19:36.009Z Learning: Place E2E step definitions in `tests/e2e/features/steps/`Learnt from: CR Repo: lightspeed-core/lightspeed-stack PR: 0 File: AGENTS.md:0-0 Timestamp: 2026-04-05T12:19:36.009Z Learning: Applies to tests/e2e/features/**/*.feature : Use behave (BDD) framework with Gherkin feature files for end-to-end testsLearnt from: radofuchs Repo: lightspeed-core/lightspeed-stack PR: 485 File: tests/e2e/features/environment.py:87-95 Timestamp: 2025-09-02T11:09:40.404Z Learning: In the lightspeed-stack e2e tests, noop authentication tests use the default lightspeed-stack.yaml configuration, while noop-with-token tests use the Authorized tag to trigger a config swap to the specialized noop-with-token configuration file.Learnt from: radofuchs Repo: lightspeed-core/lightspeed-stack PR: 485 File: tests/e2e/test_list.txt:2-3 Timestamp: 2025-09-02T11:15:02.411Z Learning: In the lightspeed-stack e2e tests, the Authorized tag is intentionally omitted from noop authentication tests because they are designed to test against the default lightspeed-stack.yaml configuration rather than the specialized noop-with-token configuration.Learnt from: CR Repo: lightspeed-core/lightspeed-stack PR: 0 File: AGENTS.md:0-0 Timestamp: 2026-04-05T12:19:36.009Z Learning: Maintain E2E test list in `tests/e2e/test_list.txt`Learnt from: onmete Repo: lightspeed-core/lightspeed-stack PR: 417 File: src/lightspeed_stack.py:60-63 Timestamp: 2025-08-19T08:57:27.714Z Learning: In the lightspeed-stack project, file permission hardening (chmod 0o600) for stored configuration JSON files is not required as it's not considered a security concern in their deployment environment.tests/e2e/configuration/server-mode/lightspeed-stack-invalid-mcp-file-auth.yaml (1)
12-12: Same fallback gap as the base server-mode config.Line 12 has the same missing default for
E2E_LLAMA_HOSTNAME; please apply the same fix used fortests/e2e/configuration/server-mode/lightspeed-stack.yaml(Line 12).tests/e2e/configuration/server-mode/lightspeed-stack-mcp-kubernetes-auth.yaml (1)
12-12: Duplicate of the hostname fallback concern.Line 12 should mirror the same defaulted env pattern to avoid runner-specific failures.
tests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yaml (1)
16-16: Looks good.Line 16 correctly switches to environment-driven hostname resolution while keeping the existing port and auth flow unchanged.
tests/e2e/configuration/server-mode/lightspeed-stack-no-cache.yaml (1)
16-16: LGTM for this config update.Line 16 is consistent with the single-config-set approach for host resolution in E2E.
tests/e2e/configuration/server-mode/lightspeed-stack-no-mcp.yaml (1)
12-12: Looks correct.Line 12 applies the same env-based hostname strategy consistently for the no-MCP variant.
tests/e2e/configuration/server-mode/lightspeed-stack-inline-rag.yaml (1)
11-11: Good consistency update.Line 11 aligns inline-RAG server-mode config with the same env-driven llama host pattern.
tests/e2e-prow/rhoai/pipeline-konflux.sh (1)
148-150: E2E_LLAMA_HOSTNAME is properly injected in Konflux deployments.The environment variable is explicitly exported in
pipeline-services-konflux.shat line 28 before the lightspeed-stack pod is deployed, setting it tollama-stack-service-svc.${NAMESPACE}.svc.cluster.local. The manifest declares the env var in the pod, and the mounted config files use the${env.E2E_LLAMA_HOSTNAME}syntax which Lightspeed resolves at runtime. No action needed.tests/e2e-prow/rhoai/pipeline.sh (1)
197-201: Environment variable injection is properly configured.The
lightspeed-stackpod correctly receivesE2E_LLAMA_HOSTNAMEthrough the manifest: the pod spec intests/e2e-prow/rhoai/manifests/lightspeed/lightspeed-stack.yaml(lines 20–24) defines the env var sourced from thellama-stack-ip-secretsecret, which is populated bypipeline-services.sh(line 23) after the service endpoint is created. The sharedlightspeed-stack.yamlconfig file (mounted at line 59) can safely resolve${env.E2E_LLAMA_HOSTNAME}at runtime.
| # Substituted in mounted lightspeed-stack.yaml (llama_stack.url); GitHub Actions sets via vars | ||
| - E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack} | ||
| - E2E_LLAMA_PORT=${E2E_LLAMA_PORT:-8321} |
There was a problem hiding this comment.
E2E_LLAMA_PORT is not wired through the mounted YAML yet.
The shared lightspeed-stack*.yaml files still build llama_stack.url as http://${env.E2E_LLAMA_HOSTNAME}:8321, so overriding E2E_LLAMA_PORT here only changes the helper clients, not the app's upstream endpoint. Either substitute ${env.E2E_LLAMA_PORT} in those YAMLs as well or drop this env until the override is supported end-to-end.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docker-compose.yaml` around lines 101 - 103, The docker-compose env
E2E_LLAMA_PORT is being set but the mounted lightspeed-stack*.yaml still
hardcodes llama_stack.url to use port 8321; update the lightspeed-stack*.yaml
templates to interpolate the port (e.g. use ${env.E2E_LLAMA_PORT} when
constructing llama_stack.url) so the app's upstream endpoint and the helper
clients use the same port, or remove E2E_LLAMA_PORT from docker-compose until
you add that substitution; look for the llama_stack.url key in the
lightspeed-stack.yaml files and replace the literal :8321 with an environment
variable reference matching E2E_LLAMA_PORT.
| oc create configmap llama-stack-config -n "$NAMESPACE" \ | ||
| --from-file="$REPO_ROOT/tests/e2e-prow/rhoai/configs/run.yaml" | ||
| oc create configmap lightspeed-stack-config -n "$NAMESPACE" \ | ||
| --from-file="$REPO_ROOT/tests/e2e/configuration/server-mode/lightspeed-stack.yaml" |
There was a problem hiding this comment.
Use oc apply for these ConfigMaps.
The namespace is reused at Line 44, so raw oc create configmap makes reruns fail with AlreadyExists before the services come up. The rest of this script already uses --dry-run=client -o yaml | oc apply -f -, and these two ConfigMaps need the same treatment.
♻️ Suggested fix
-oc create configmap llama-stack-config -n "$NAMESPACE" \
- --from-file="$REPO_ROOT/tests/e2e-prow/rhoai/configs/run.yaml"
-oc create configmap lightspeed-stack-config -n "$NAMESPACE" \
- --from-file="$REPO_ROOT/tests/e2e/configuration/server-mode/lightspeed-stack.yaml"
+oc create configmap llama-stack-config -n "$NAMESPACE" \
+ --from-file=run.yaml="$REPO_ROOT/tests/e2e-prow/rhoai/configs/run.yaml" \
+ --dry-run=client -o yaml | oc apply -f -
+oc create configmap lightspeed-stack-config -n "$NAMESPACE" \
+ --from-file=lightspeed-stack.yaml="$REPO_ROOT/tests/e2e/configuration/server-mode/lightspeed-stack.yaml" \
+ --dry-run=client -o yaml | oc apply -f -📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| oc create configmap llama-stack-config -n "$NAMESPACE" \ | |
| --from-file="$REPO_ROOT/tests/e2e-prow/rhoai/configs/run.yaml" | |
| oc create configmap lightspeed-stack-config -n "$NAMESPACE" \ | |
| --from-file="$REPO_ROOT/tests/e2e/configuration/server-mode/lightspeed-stack.yaml" | |
| oc create configmap llama-stack-config -n "$NAMESPACE" \ | |
| --from-file=run.yaml="$REPO_ROOT/tests/e2e-prow/rhoai/configs/run.yaml" \ | |
| --dry-run=client -o yaml | oc apply -f - | |
| oc create configmap lightspeed-stack-config -n "$NAMESPACE" \ | |
| --from-file=lightspeed-stack.yaml="$REPO_ROOT/tests/e2e/configuration/server-mode/lightspeed-stack.yaml" \ | |
| --dry-run=client -o yaml | oc apply -f - |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/e2e-prow/rhoai/pipeline.sh` around lines 198 - 201, Replace the two raw
oc create configmap invocations for llama-stack-config and
lightspeed-stack-config with the same apply pattern used elsewhere: generate the
ConfigMap YAML with --from-file and --dry-run=client -o yaml and pipe to oc
apply -f - so reruns won't fail with AlreadyExists; update the commands that
reference "$REPO_ROOT/tests/e2e-prow/rhoai/configs/run.yaml" and
"$REPO_ROOT/tests/e2e/configuration/server-mode/lightspeed-stack.yaml"
accordingly.
| llama_stack: | ||
| use_as_library_client: false | ||
| url: http://llama-stack:8321 | ||
| url: http://${env.E2E_LLAMA_HOSTNAME}:8321 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify how replace_env_vars handles missing environment variables
# and check E2E_LLAMA_PORT usage across config files
echo "=== Checking replace_env_vars implementation ==="
rg -n -A 10 "def replace_env_vars" src/
echo -e "\n=== Checking E2E_LLAMA_PORT usage in config files ==="
rg -n "E2E_LLAMA_PORT" tests/e2e/
echo -e "\n=== Checking if port 8321 is hardcoded in server-mode configs ==="
fd -e yaml . tests/e2e/configuration/server-mode/ --exec rg -n ":8321"Repository: lightspeed-core/lightspeed-stack
Length of output: 1300
🏁 Script executed:
#!/bin/bash
echo "=== Searching for env var substitution implementation ==="
rg -n "\${env\." tests/e2e/ | head -20
echo -e "\n=== Looking for how ${env.X} syntax is processed ==="
rg -n -B2 -A5 "env\." src/ tests/e2e/ | grep -E "(replace|substitute|process|template)" | head -20
echo -e "\n=== Checking documentation file ==="
find . -name "*e2e*" -type f | grep -i doc
echo -e "\n=== Checking llama_stack_utils.py for env var handling ==="
head -50 tests/e2e/utils/llama_stack_utils.py
echo -e "\n=== Checking if replace_env_vars exists in Python anywhere ==="
rg -n "replace_env_vars" .Repository: lightspeed-core/lightspeed-stack
Length of output: 2993
🏁 Script executed:
#!/bin/bash
echo "=== Searching for config file loading and env var processing ==="
rg -n "replace_env_vars" -A3 -B3 src/configuration.py src/llama_stack_configuration.py
echo -e "\n=== Looking for where YAML config files are loaded ==="
rg -n "\.yaml\|config_path\|load.*config" tests/e2e/ | head -20
echo -e "\n=== Checking the actual test that uses the file under review ==="
rg -n "lightspeed-stack-auth-rh-identity" tests/e2e/
echo -e "\n=== Checking docs/e2e_testing.md for env var documentation ==="
head -150 docs/e2e_testing.md | tail -50Repository: lightspeed-core/lightspeed-stack
Length of output: 5882
Parameterize the Llama Stack port for consistency with the hostname.
The URL uses ${env.E2E_LLAMA_HOSTNAME} for the hostname but hardcodes the port as :8321. Since E2E_LLAMA_PORT is an environment variable defined in the E2E framework (documented in docs/e2e_testing.md with a default of 8321), the port should also be parameterized as ${env.E2E_LLAMA_PORT} for consistency and flexibility.
Change:
url: http://${env.E2E_LLAMA_HOSTNAME}:${env.E2E_LLAMA_PORT}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/e2e/configuration/server-mode/lightspeed-stack-auth-rh-identity.yaml`
at line 11, The URL in the configuration hardcodes port 8321 while the hostname
already uses ${env.E2E_LLAMA_HOSTNAME}; update that URL to also use the
environment variable ${env.E2E_LLAMA_PORT} (i.e., change the url value that
currently uses :8321 to use :${env.E2E_LLAMA_PORT}) so the Llama Stack port is
parameterized consistently with the hostname.
| # Server mode - connects to separate llama-stack service | ||
| use_as_library_client: false | ||
| url: http://llama-stack:8321 | ||
| url: http://${env.E2E_LLAMA_HOSTNAME}:8321 |
There was a problem hiding this comment.
Add a default for E2E_LLAMA_HOSTNAME to prevent env-dependent breakage.
Line 12 introduces a hard dependency on E2E_LLAMA_HOSTNAME with no fallback. This can break runs where that variable is not injected. Use the same defaulting pattern already used elsewhere in this file.
🔧 Proposed fix
- url: http://${env.E2E_LLAMA_HOSTNAME}:8321
+ url: http://${env.E2E_LLAMA_HOSTNAME:=llama-stack}:8321📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| url: http://${env.E2E_LLAMA_HOSTNAME}:8321 | |
| url: http://${env.E2E_LLAMA_HOSTNAME:=llama-stack}:8321 |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/e2e/configuration/server-mode/lightspeed-stack.yaml` at line 12, The
url line currently depends on E2E_LLAMA_HOSTNAME with no fallback; change the
env substitution to use the same defaulting pattern used elsewhere so it won't
break when the variable is missing (replace the value for the url key that uses
E2E_LLAMA_HOSTNAME with a default, e.g. use ${env.E2E_LLAMA_HOSTNAME:-localhost}
so the url becomes http://${env.E2E_LLAMA_HOSTNAME:-localhost}:8321).
| def _get_config_path(config_name: str, mode_dir: str) -> str: | ||
| """Get the appropriate config path based on environment.""" | ||
| docker_path_template, prow_path = _CONFIG_PATHS[config_name] | ||
| if is_prow_environment(): | ||
| return prow_path | ||
| return docker_path_template.format(mode_dir=mode_dir) | ||
| """Resolve repo-relative path to a Lightspeed stack YAML for the current mode.""" | ||
| return _CONFIG_PATHS[config_name].format(mode_dir=mode_dir) |
There was a problem hiding this comment.
Return absolute paths from _get_config_path() in Prow.
before_feature() and before_scenario() feed this helper straight into switch_config(). In Prow that call updates the ConfigMap from the runner filesystem, so returning a repo-relative string here still depends on Behave's cwd, unlike the new absolute-path handling in tests/e2e/features/steps/common.py. Tag-driven config switches can therefore still miss their YAMLs in Prow/Konflux.
🛠️ Suggested fix
from tests.e2e.utils.utils import (
+ absolute_repo_path,
clear_llama_stack_storage,
create_config_backup,
is_prow_environment,
remove_config_backup,
restart_container,
@@
def _get_config_path(config_name: str, mode_dir: str) -> str:
"""Resolve repo-relative path to a Lightspeed stack YAML for the current mode."""
- return _CONFIG_PATHS[config_name].format(mode_dir=mode_dir)
+ path = _CONFIG_PATHS[config_name].format(mode_dir=mode_dir)
+ return absolute_repo_path(path) if is_prow_environment() else path📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| def _get_config_path(config_name: str, mode_dir: str) -> str: | |
| """Get the appropriate config path based on environment.""" | |
| docker_path_template, prow_path = _CONFIG_PATHS[config_name] | |
| if is_prow_environment(): | |
| return prow_path | |
| return docker_path_template.format(mode_dir=mode_dir) | |
| """Resolve repo-relative path to a Lightspeed stack YAML for the current mode.""" | |
| return _CONFIG_PATHS[config_name].format(mode_dir=mode_dir) | |
| def _get_config_path(config_name: str, mode_dir: str) -> str: | |
| """Resolve repo-relative path to a Lightspeed stack YAML for the current mode.""" | |
| path = _CONFIG_PATHS[config_name].format(mode_dir=mode_dir) | |
| return absolute_repo_path(path) if is_prow_environment() else path |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/e2e/features/environment.py` around lines 60 - 62, _get_config_path
currently returns repo-relative paths which fail in Prow; change it to return
absolute paths. Update the function _get_config_path to resolve the stored
_CONFIG_PATHS entry against the repository root (use
Path(__file__).resolve().parents[...] or equivalent) and return an absolute path
(Path(...).resolve().as_posix() or str(Path(...).resolve())). Ensure callers
like before_feature, before_scenario and switch_config receive the absolute path
so Prow/Konflux can locate the YAMLs; keep the existing formatting with mode_dir
when building the path.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docker-compose-library.yaml`:
- Line 79: Add the missing E2E_LLAMA_PORT environment export to
docker-compose-library.yaml to match docker-compose.yaml and prevent config
drift: locate the E2E_LLAMA_HOSTNAME line
(E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack}) and add a sibling export
for E2E_LLAMA_PORT with a sensible default (e.g.,
E2E_LLAMA_PORT=${E2E_LLAMA_PORT:-<default_port>}) so both hostname and port are
provided consistently for consumers that rely on E2E_LLAMA_HOSTNAME and
E2E_LLAMA_PORT.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: cd5b75e9-4050-43c5-95da-ab56692de70c
📒 Files selected for processing (1)
docker-compose-library.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: E2E: server mode / ci
- GitHub Check: E2E: library mode / ci
- GitHub Check: E2E Tests for Lightspeed Evaluation job
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
| - LLAMA_STACK_LOGGING=${LLAMA_STACK_LOGGING:-} | ||
| # FAISS test and inline RAG config | ||
| - FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-} | ||
| - E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack} |
There was a problem hiding this comment.
Add E2E_LLAMA_PORT here as well to avoid config drift.
At Line 79, docker-compose-library.yaml exports only hostname, while docker-compose.yaml:98-110 exports both hostname and port. This creates a split contract for shared config resolution and can break overrides when port needs to vary.
Proposed fix
environment:
@@
- FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-}
- E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack}
+ - E2E_LLAMA_PORT=${E2E_LLAMA_PORT:-8321}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack} | |
| - E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack} | |
| - E2E_LLAMA_PORT=${E2E_LLAMA_PORT:-8321} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docker-compose-library.yaml` at line 79, Add the missing E2E_LLAMA_PORT
environment export to docker-compose-library.yaml to match docker-compose.yaml
and prevent config drift: locate the E2E_LLAMA_HOSTNAME line
(E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack}) and add a sibling export
for E2E_LLAMA_PORT with a sensible default (e.g.,
E2E_LLAMA_PORT=${E2E_LLAMA_PORT:-<default_port>}) so both hostname and port are
provided consistently for consumers that rely on E2E_LLAMA_HOSTNAME and
E2E_LLAMA_PORT.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/e2e/test_list.txt`:
- Line 1: The PR mistakenly replaced the E2E feature list with only
"features/faiss.feature" in tests/e2e/test_list.txt which reduces coverage;
restore the full set of feature file paths in tests/e2e/test_list.txt (revert to
the prior list or re-add all feature filenames that were removed) so make
test-e2e runs the complete suite, or if this is a temporary debug change, gate
it behind an explicit non-mergeable flag/branch and document that in the commit
message; ensure the commit touches tests/e2e/test_list.txt and that CI (make
test-e2e) runs all previously included features rather than only
features/faiss.feature.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 668f53b4-a617-48ec-8960-cd811854f738
📒 Files selected for processing (1)
tests/e2e/test_list.txt
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build-pr
- GitHub Check: E2E Tests for Lightspeed Evaluation job
- GitHub Check: E2E: library mode / ci
- GitHub Check: E2E: server mode / ci
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Maintain E2E test list in `tests/e2e/test_list.txt`
Applied to files:
tests/e2e/test_list.txt
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Applies to tests/e2e/features/**/*.feature : Use behave (BDD) framework with Gherkin feature files for end-to-end tests
Applied to files:
tests/e2e/test_list.txt
fix missing dep potential fix konflux addressed comments chore(deps): update konflux references Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com> Fixes docstrings in conversation cache unit tests Fixed docstrings in Splunk unit tests Test docstrings in quota limiters unit tests LCORE-1596: Branching graphs feat: add shield moderation to rlsapi_v1 /infer endpoint Wire run_shield_moderation() into the rlsapi_v1 /infer endpoint so CLA requests go through the same safety checks as responses, query, and streaming_query. When a shield blocks input, the refusal message is returned as normal response text and the LLM call is skipped entirely. No-op when no shields are configured. RSPEED-2809 Signed-off-by: Major Hayden <[email protected]> refactor: extract _check_shield_moderation helper, fix integration tests Move the moderation logic out of infer_endpoint into a private helper to avoid increasing the function's cyclomatic complexity (stays at C 13). Add shield moderation mock to the integration tests so they don't hit the real run_shield_moderation path with non-async client mocks. Signed-off-by: Major Hayden <[email protected]> LCORE-1441: Updated Konflux dependencies Specific rule name when types are ignored: integration tests Specific rule name when types are ignored: sources Specific rule name when types are ignored: end to end tests LCORE-1715: Fixes in LiteLLM package LCORE-1472: use single config set (lightspeed-core#1467) * LCORE-1472: use single config set refactor: reduce infer_endpoint cyclomatic complexity from C(13) to B(7) Extract helpers from infer_endpoint to eliminate the verbose mode branching that inflated its complexity: - _call_llm: transport-only LLM call (no metrics side effects) - _is_verbose_enabled: the 3-way config+request check - _build_infer_response: verbose vs minimal response construction, keyed on response object presence rather than a boolean flag retrieve_simple_response now delegates to _call_llm internally and handles its own token usage extraction. The verbose failure path in infer_endpoint is preserved: if the LLM call succeeded but later processing fails, token usage is still recorded. No behavior changes, pure refactor. Signed-off-by: Major Hayden <[email protected]>
fix missing dep potential fix konflux addressed comments chore(deps): update konflux references Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com> Fixes docstrings in conversation cache unit tests Fixed docstrings in Splunk unit tests Test docstrings in quota limiters unit tests LCORE-1596: Branching graphs feat: add shield moderation to rlsapi_v1 /infer endpoint Wire run_shield_moderation() into the rlsapi_v1 /infer endpoint so CLA requests go through the same safety checks as responses, query, and streaming_query. When a shield blocks input, the refusal message is returned as normal response text and the LLM call is skipped entirely. No-op when no shields are configured. RSPEED-2809 Signed-off-by: Major Hayden <[email protected]> refactor: extract _check_shield_moderation helper, fix integration tests Move the moderation logic out of infer_endpoint into a private helper to avoid increasing the function's cyclomatic complexity (stays at C 13). Add shield moderation mock to the integration tests so they don't hit the real run_shield_moderation path with non-async client mocks. Signed-off-by: Major Hayden <[email protected]> LCORE-1441: Updated Konflux dependencies Specific rule name when types are ignored: integration tests Specific rule name when types are ignored: sources Specific rule name when types are ignored: end to end tests LCORE-1715: Fixes in LiteLLM package LCORE-1472: use single config set (lightspeed-core#1467) * LCORE-1472: use single config set refactor: reduce infer_endpoint cyclomatic complexity from C(13) to B(7) Extract helpers from infer_endpoint to eliminate the verbose mode branching that inflated its complexity: - _call_llm: transport-only LLM call (no metrics side effects) - _is_verbose_enabled: the 3-way config+request check - _build_infer_response: verbose vs minimal response construction, keyed on response object presence rather than a boolean flag retrieve_simple_response now delegates to _call_llm internally and handles its own token usage extraction. The verbose failure path in infer_endpoint is preserved: if the LLM call succeeded but later processing fails, token usage is still recorded. No behavior changes, pure refactor. Signed-off-by: Major Hayden <[email protected]>
* LCORE-1472: use single config set
fix missing dep potential fix konflux addressed comments chore(deps): update konflux references Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com> Fixes docstrings in conversation cache unit tests Fixed docstrings in Splunk unit tests Test docstrings in quota limiters unit tests LCORE-1596: Branching graphs feat: add shield moderation to rlsapi_v1 /infer endpoint Wire run_shield_moderation() into the rlsapi_v1 /infer endpoint so CLA requests go through the same safety checks as responses, query, and streaming_query. When a shield blocks input, the refusal message is returned as normal response text and the LLM call is skipped entirely. No-op when no shields are configured. RSPEED-2809 Signed-off-by: Major Hayden <[email protected]> refactor: extract _check_shield_moderation helper, fix integration tests Move the moderation logic out of infer_endpoint into a private helper to avoid increasing the function's cyclomatic complexity (stays at C 13). Add shield moderation mock to the integration tests so they don't hit the real run_shield_moderation path with non-async client mocks. Signed-off-by: Major Hayden <[email protected]> LCORE-1441: Updated Konflux dependencies Specific rule name when types are ignored: integration tests Specific rule name when types are ignored: sources Specific rule name when types are ignored: end to end tests LCORE-1715: Fixes in LiteLLM package LCORE-1472: use single config set (lightspeed-core#1467) * LCORE-1472: use single config set refactor: reduce infer_endpoint cyclomatic complexity from C(13) to B(7) Extract helpers from infer_endpoint to eliminate the verbose mode branching that inflated its complexity: - _call_llm: transport-only LLM call (no metrics side effects) - _is_verbose_enabled: the 3-way config+request check - _build_infer_response: verbose vs minimal response construction, keyed on response object presence rather than a boolean flag retrieve_simple_response now delegates to _call_llm internally and handles its own token usage extraction. The verbose failure path in infer_endpoint is preserved: if the LLM call succeeded but later processing fails, token usage is still recorded. No behavior changes, pure refactor. Signed-off-by: Major Hayden <[email protected]>
* LCORE-1472: use single config set
fix missing dep potential fix konflux addressed comments chore(deps): update konflux references Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com> Fixes docstrings in conversation cache unit tests Fixed docstrings in Splunk unit tests Test docstrings in quota limiters unit tests LCORE-1596: Branching graphs feat: add shield moderation to rlsapi_v1 /infer endpoint Wire run_shield_moderation() into the rlsapi_v1 /infer endpoint so CLA requests go through the same safety checks as responses, query, and streaming_query. When a shield blocks input, the refusal message is returned as normal response text and the LLM call is skipped entirely. No-op when no shields are configured. RSPEED-2809 Signed-off-by: Major Hayden <[email protected]> refactor: extract _check_shield_moderation helper, fix integration tests Move the moderation logic out of infer_endpoint into a private helper to avoid increasing the function's cyclomatic complexity (stays at C 13). Add shield moderation mock to the integration tests so they don't hit the real run_shield_moderation path with non-async client mocks. Signed-off-by: Major Hayden <[email protected]> LCORE-1441: Updated Konflux dependencies Specific rule name when types are ignored: integration tests Specific rule name when types are ignored: sources Specific rule name when types are ignored: end to end tests LCORE-1715: Fixes in LiteLLM package LCORE-1472: use single config set (lightspeed-core#1467) * LCORE-1472: use single config set refactor: reduce infer_endpoint cyclomatic complexity from C(13) to B(7) Extract helpers from infer_endpoint to eliminate the verbose mode branching that inflated its complexity: - _call_llm: transport-only LLM call (no metrics side effects) - _is_verbose_enabled: the 3-way config+request check - _build_infer_response: verbose vs minimal response construction, keyed on response object presence rather than a boolean flag retrieve_simple_response now delegates to _call_llm internally and handles its own token usage extraction. The verbose failure path in infer_endpoint is preserved: if the LLM call succeeded but later processing fails, token usage is still recorded. No behavior changes, pure refactor. Signed-off-by: Major Hayden <[email protected]>
Description
Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit