Skip to content

Comments

LCORE-1335: Parametrized RHAIIS port and added library mode tests#1164

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
are-ces:rhaiis-fix
Feb 18, 2026
Merged

LCORE-1335: Parametrized RHAIIS port and added library mode tests#1164
tisnik merged 1 commit intolightspeed-core:mainfrom
are-ces:rhaiis-fix

Conversation

@are-ces
Copy link
Contributor

@are-ces are-ces commented Feb 17, 2026

Description

RHAIIS endpoint port changed, which made these changes needed (port was hardcoded). Also, e2e tests in library mode were added to RHAIIS e2e tests.

Please take a look at e2e test results here.

The interesting takeaways are that:

  • Some tests might need to be updated for more flexibility
  • Llama 70B is not able to follow the llama-stack instructions properly, e.g. RAG tool calling does not work properly; similar to AWS Bedrock.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

NA

Related Tickets & Documents

  • Related Issue # LCORE-1335
  • Closes # LCORE-1335

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.
    See the linked test results

Summary by CodeRabbit

  • New Features

    • Integrated Model Context Protocol (MCP) provider support for enhanced capabilities.
  • Chores

    • Enhanced end-to-end testing infrastructure with multi-mode deployment configurations and dynamic environment-specific test parameters.
    • Improved containerized service configuration with flexible environment variable management.

@are-ces are-ces requested review from radofuchs and tisnik February 17, 2026 13:04
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Walkthrough

The changes introduce matrix-based E2E testing with server/library deployment modes, dynamic configuration loading from mode-specific directories, and RHAIIS_PORT environment variable injection across Docker Compose files and CI workflows for configurable E2E deployment.

Changes

Cohort / File(s) Summary
CI/Workflow Configuration
.github/workflows/e2e_tests_rhaiis.yaml
Introduces matrix strategy for mode (server, library) and environment; dynamically loads lightspeed-stack.yaml from mode-specific directory; loads run.yaml from environment-specific config; adds conditional mode-specific deployment steps (docker compose up/docker-compose-library.yaml); implements mode-aware logging and connectivity checks with configurable RHAIIS_PORT.
Docker Compose Environment
docker-compose.yaml, docker-compose-library.yaml
Adds RHAIIS_PORT environment variable to llama-stack and lightspeed-stack services respectively for port configuration injection.
E2E Runtime Configuration
tests/e2e/configs/run-rhaiis.yaml
Replaces vllm provider url key with base_url, removes OpenAI provider block, introduces Model Context Protocol (MCP) provider support, updates shield configuration from openai/gpt-4o-mini to vllm/${env.RHAIIS_MODEL}.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • radofuchs
  • tisnik
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: parameterizing the RHAIIS port and adding library mode tests, which aligns with the actual modifications to docker-compose files, e2e workflow configuration, and test settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
docker-compose.yaml (1)

46-46: Inconsistent default handling for RHAIIS_PORT across compose files.

In this file, RHAIIS_PORT has no default (${RHAIIS_PORT}), while docker-compose-library.yaml uses ${RHAIIS_PORT:-}. This is consistent with how other RHAIIS variables are handled in each respective file, so likely intentional — but worth confirming that server-mode CI always sets RHAIIS_PORT before docker compose up, as an unset variable here will be injected as an empty string (not cause a failure).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker-compose.yaml` at line 46, The compose file uses an unset expansion for
RHAIIS_PORT ("RHAIIS_PORT=${RHAIIS_PORT}") that is inconsistent with
docker-compose-library.yaml which uses the "${RHAIIS_PORT:-}" form; update the
variable in docker-compose.yaml to use the same expansion (replace
RHAIIS_PORT=${RHAIIS_PORT} with RHAIIS_PORT=${RHAIIS_PORT:-}) so default
handling is consistent, or alternatively ensure CI/server-mode always sets
RHAIIS_PORT before invoking docker compose; target the RHAIIS_PORT entry in the
service environment block to apply the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/e2e_tests_rhaiis.yaml:
- Line 112: The curl connectivity check currently uses unquoted variable
expansion which can cause shell word-splitting when RHAIIS_URL contains special
characters; update the command to quote the URL expansion (e.g., replace curl -f
${RHAIIS_URL}:${RHAIIS_PORT}/v1/models with curl -f
"${RHAIIS_URL}:${RHAIIS_PORT}/v1/models") and keep the Authorization header
using ${RHAIIS_API_KEY} as before to ensure the full URL is passed as a single
argument.

In `@tests/e2e/configs/run-rhaiis.yaml`:
- Line 25: The YAML for the vllm provider uses the wrong field name; in the
remote::vllm provider config replace the key base_url with url so the provider
schema matches llama-stack 0.4.3 (i.e., change the base_url entry to url in the
run-rhaiis.yaml vllm config to match other configs like run-rhelai.yaml and
examples/vllm-*.yaml).

---

Nitpick comments:
In `@docker-compose.yaml`:
- Line 46: The compose file uses an unset expansion for RHAIIS_PORT
("RHAIIS_PORT=${RHAIIS_PORT}") that is inconsistent with
docker-compose-library.yaml which uses the "${RHAIIS_PORT:-}" form; update the
variable in docker-compose.yaml to use the same expansion (replace
RHAIIS_PORT=${RHAIIS_PORT} with RHAIIS_PORT=${RHAIIS_PORT:-}) so default
handling is consistent, or alternatively ensure CI/server-mode always sets
RHAIIS_PORT before invoking docker compose; target the RHAIIS_PORT entry in the
service environment block to apply the change.

- name: Test RHAIIS connectivity
run: |
curl -f ${RHAIIS_URL}:8000/v1/models -H "Authorization: Bearer ${RHAIIS_API_KEY}"
curl -f ${RHAIIS_URL}:${RHAIIS_PORT}/v1/models -H "Authorization: Bearer ${RHAIIS_API_KEY}"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Quote the URL in the connectivity check to prevent shell word-splitting.

If RHAIIS_URL includes a protocol prefix (e.g., https://host) or any special characters, the unquoted expansion could cause unexpected behavior.

Proposed fix
-          curl -f ${RHAIIS_URL}:${RHAIIS_PORT}/v1/models   -H "Authorization: Bearer ${RHAIIS_API_KEY}"  
+          curl -f "${RHAIIS_URL}:${RHAIIS_PORT}/v1/models" -H "Authorization: Bearer ${RHAIIS_API_KEY}"
📝 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.

Suggested change
curl -f ${RHAIIS_URL}:${RHAIIS_PORT}/v1/models -H "Authorization: Bearer ${RHAIIS_API_KEY}"
curl -f "${RHAIIS_URL}:${RHAIIS_PORT}/v1/models" -H "Authorization: Bearer ${RHAIIS_API_KEY}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/e2e_tests_rhaiis.yaml at line 112, The curl connectivity
check currently uses unquoted variable expansion which can cause shell
word-splitting when RHAIIS_URL contains special characters; update the command
to quote the URL expansion (e.g., replace curl -f
${RHAIIS_URL}:${RHAIIS_PORT}/v1/models with curl -f
"${RHAIIS_URL}:${RHAIIS_PORT}/v1/models") and keep the Authorization header
using ${RHAIIS_API_KEY} as before to ensure the full URL is passed as a single
argument.

provider_type: remote::vllm
config:
url: http://${env.RHAIIS_URL}:8000/v1/
base_url: http://${env.RHAIIS_URL}:${env.RHAIIS_PORT}/v1/
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check how base_url is used in remote::vllm provider configuration across the codebase
rg -n "base_url" --type yaml -C2 --glob '**/run-*.yaml'
echo "---"
# Check if other config files use 'url' or 'base_url' for vllm
rg -n "provider_type: remote::vllm" -A5 --type yaml

Repository: lightspeed-core/lightspeed-stack

Length of output: 2727


🏁 Script executed:

#!/bin/bash
# Search for vllm provider implementation or config schema
fd -type f -name "*.py" | xargs rg -l "remote::vllm" 2>/dev/null | head -10
echo "---"
# Also search for vllm config handling
rg -n "vllm" --type py -B2 -A5 | grep -E "(base_url|url|config)" | head -30

Repository: lightspeed-core/lightspeed-stack

Length of output: 497


🏁 Script executed:

#!/bin/bash
# Search for vllm config handling in Python files
rg -n "url|base_url" --type py -B3 -A3 | grep -i vllm -B5 -A5 | head -50

echo "---"
# Look for config class definitions or dataclass patterns
rg -n "class.*vllm|@dataclass" --type py -i | head -20

echo "---"
# Search for any schema or type definitions
fd -type f -name "*.py" -path "*vllm*" 2>/dev/null

echo "---"
# Check for llama-stack requirements or dependencies
cat requirements.txt 2>/dev/null | grep -i llama
cat pyproject.toml 2>/dev/null | grep -i llama

Repository: lightspeed-core/lightspeed-stack

Length of output: 719


🏁 Script executed:

#!/bin/bash
# Search for any documentation about vllm provider config in the repo
rg -n "vllm" -i docs/ --type md -B3 -A3 2>/dev/null | head -50

echo "---"
# Check for any schema or type hints in the repo
rg -n "url.*vllm|vllm.*url" -i --type py -B2 -A2 | head -40

Repository: lightspeed-core/lightspeed-stack

Length of output: 2809


🌐 Web query:

llama-stack 0.4.3 vllm provider base_url vs url configuration schema

💡 Result:

In llama-stack 0.4.3, the remote::vllm inference provider config schema uses url (not base_url).

remote::vllm config fields (schema)

  • url: str | NonevLLM serving endpoint URL
  • max_tokens: int (default 4096)
  • api_token: str | None (default "fake")
  • tls_verify: bool | str (default True)
  • refresh_models: bool (default False)  [1]

Example run.yaml

providers:
  inference:
    - provider_id: vllm0
      provider_type: remote::vllm
      config:
        url: ${env.VLLM_URL:=http://localhost:8000/v1}

The official examples also use config.url. [1], [2]

Where base_url does show up

  • Client-side (e.g., LlamaStackClient(base_url="http://localhost:8321")) for talking to the Llama Stack server, not for configuring the vLLM provider. [3]

So: if you’re seeing a base_url vs url mismatch, for provider_type: remote::vllm you should configure config.url. [1]

Sources: [1] [2] [3]


Change base_url to url — this is the wrong field name for the vllm provider schema.

llama-stack 0.4.3's remote::vllm provider config expects url, not base_url. All other vllm configurations in the repository (run-rhelai.yaml, examples/vllm-*.yaml, e2e-prow/rhoai/configs/run.yaml) consistently use url. The base_url field does not exist in the vllm provider schema and will cause configuration parsing to fail.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/e2e/configs/run-rhaiis.yaml` at line 25, The YAML for the vllm provider
uses the wrong field name; in the remote::vllm provider config replace the key
base_url with url so the provider schema matches llama-stack 0.4.3 (i.e., change
the base_url entry to url in the run-rhaiis.yaml vllm config to match other
configs like run-rhelai.yaml and examples/vllm-*.yaml).

Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@radofuchs radofuchs left a comment

Choose a reason for hiding this comment

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

LGTM

@tisnik tisnik merged commit 4594133 into lightspeed-core:main Feb 18, 2026
18 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants