Skip to content

LCORE-2922: Updated dependencies - #2418

Merged
tisnik merged 2 commits into
lightspeed-core:mainfrom
tisnik:lcore-2922-updated-dependencies-8
Aug 12, 2026
Merged

LCORE-2922: Updated dependencies#2418
tisnik merged 2 commits into
lightspeed-core:mainfrom
tisnik:lcore-2922-updated-dependencies-8

Conversation

@tisnik

@tisnik tisnik commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

LCORE-2922: Updated dependencies

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library [pyproject.toml + uv.lock]
  • Bump-up dependent library [requirements.*.txt for Konflux]
  • 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

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-2922

Summary by CodeRabbit

  • Chores
    • Updated the required pydantic-ai version to 2.27.1 for more consistent application behavior.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The pydantic-ai dependency requirement changes from a minimum version of 2.23.0 to an exact pin at 2.27.1.

Changes

Dependency Version Pinning

Layer / File(s) Summary
Pin pydantic-ai version
pyproject.toml
The dependency requirement changes from >=2.23.0 to ==2.27.1.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: jrobertboos, asimurka, anik120

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the dependency update, although it does not specify that pydantic-ai was pinned.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Performance And Algorithmic Complexity ✅ Passed The diff only pins pydantic-ai and updates uv.lock from 2.28.0 to 2.27.1; it adds no handlers, loops, API calls, list operations, caches, or pagination changes.
Security And Secret Handling ✅ Passed The commit changes only the pydantic-ai declaration and lock entries. No secrets, endpoints, injection code, sensitive logging, or Kubernetes Secret manifests were added.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified 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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pyproject.toml`:
- Line 83: Regenerate the Konflux dependency artifacts using make
konflux-requirements so .konflux/requirements.hashes.wheel.pypi.txt matches the
Pydantic AI 2.27.1 selection in pyproject.toml and uv.lock.
🪄 Autofix

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 Plus

Run ID: 41f8799d-9114-474a-953a-8cff001f2a1b

📥 Commits

Reviewing files that changed from the base of the PR and between 16fef74 and dcd9abc.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml
📜 Review details
⏰ Context from checks skipped due to timeout. (10)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: build-pr
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-8-on-pull-request
⚠️ CI failures not shown inline (3)

GitHub Actions: E2E Tests for Lightspeed Evaluation / E2E Tests for Lightspeed Evaluation job: LCORE-2922: Updated dependencies

Conclusion: failure

View job details

 lightspeed-stack  | ERROR      Application startup failed. Exiting.  category=server
 Still waiting...
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 curl: (7) Failed to connect to localhost port 8080 after 0 ms: Couldn't connect to server
 lightspeed-stack  |            File "/app-root/.venv/lib64/python3.12/site-packages/fastapi/routing.py", line 240, in merged_lifespan
 lightspeed-stack  |              async with original_context(app) as maybe_original_state:
 lightspeed-stack  |                         ^^^^^^^^^^^^^^^^^^^^^
 lightspeed-stack  |            File "/usr/lib64/python3.12/contextlib.py", line 210, in __aenter__
 lightspeed-stack  |              return await anext(self.gen)
 lightspeed-stack  |                     ^^^^^^^^^^^^^^^^^^^^^
 lightspeed-stack  |            File "/app-root/src/app/main.py", line 87, in lifespan
 lightspeed-stack  |              await AsyncOgxClientHolder().load(llama_stack_config)
 lightspeed-stack  |            File "/app-root/src/client.py", line 49, in load
 lightspeed-stack  |              await self._load_library_client(llama_stack_config)
 lightspeed-stack  |            File "/app-root/src/client.py", line 82, in _load_library_client
 lightspeed-stack  |              await client.initialize()
 lightspeed-stack  |            File "/app-root/.venv/lib64/python3.12/site-packages/ogx/core/library_client.py", line 413, in initialize
 lightspeed-stack  |              await self.stack.initialize()  # type: ignore
 lightspeed-stack  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 lightspeed-stack  |            File "/app-root/.venv/lib64/python3.12/site-packages/ogx/core/stack.py", line 753, in initialize
 lightspeed-stack  |              impls = await reso...

GitHub Actions: E2E Tests for Lightspeed Evaluation / E2E Tests for Lightspeed Evaluation job: LCORE-2922: Updated dependencies

Conclusion: failure

View job details

##[group]Run echo "=== Test failure logs ==="
 �[36;1mecho "=== Test failure logs ==="�[0m
 �[36;1mecho "=== lightspeed-stack (library mode) logs ==="�[0m
 �[36;1mdocker compose -f docker-compose-library.yaml logs lightspeed-stack�[0m
 shell: /usr/bin/bash -e {0}
 env:
   OPENAI_***REDACTED_SECRET_ASSIGNMENT***
   E2E_OPENAI_MODEL: gpt-4o-mini
   FAISS_VECTOR_STORE_ID: vs_8c94967b-81cc-4028-a294-9cfac6fd9ae2
 ##[endgroup]
 === Test failure logs ===
 === lightspeed-stack (library mode) logs ===
 lightspeed-stack  | .111 INFO:     Lightspeed Core Stack startup  [lightspeed_stack.__main__:160]
 lightspeed-stack  | .114 INFO:     Configuration: name='Lightspeed Core Service (LCS)' config_format_version=None service=ServiceConfiguration(host='0.0.0.0', port=8080, base_url=None, auth_enabled=False, workers=1, color_log=True, access_log=True, tls_config=TLSConfiguration(tls_certificate_path=None, tls_key_path=None, tls_key_***REDACTED_SECRET_ASSIGNMENT*** root_path='', cors=CORSConfiguration(allow_origins=['*'], allow_credentials=False, allow_methods=['*'], allow_headers=['*'])) llama_stack=LlamaStackConfiguration(url=AnyHttpUrl('http://localhost:8321/'), ***REDACTED_SECRET_ASSIGNMENT*** use_as_library_client=True, library_client_config_path='/app-root/run.yaml', timeout=180, max_retries=5, retry_delay=2, allow_degraded_mode=False, config=None) user_data_collection=UserDataCollection(feedback_enabled=True, feedback_storage='/tmp/data/feedback', transcripts_enabled=True, transcripts_storage='/tmp/data/transcripts') database=DatabaseConfiguration(sqlite=SQLiteDatabaseConfiguration(db_path='/tmp/lightspeed-stack.db'), postgres=None) mcp_servers=[] authentication=AuthenticationConfiguration(module='noop', skip_tls_verification=False, skip_for_health_probes=False, skip_for_metrics=False, k8s_cluster_api=None, k8s_ca_cert_path=None, jwk_config=None, api_key_config=None, rh_identity_config=None, trusted_proxy_config=None) authorization=None customization=None inference=Inferen...

GitHub Actions: E2E Tests for Lightspeed Evaluation / 0_E2E Tests for Lightspeed Evaluation job.txt: LCORE-2922: Updated dependencies

Conclusion: failure

View job details

 lightspeed-stack  | ERROR      Application startup failed. Exiting.  category=server
 Still waiting...
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 curl: (7) Failed to connect to localhost port 8080 after 0 ms: Couldn't connect to server
 lightspeed-stack  |            File "/app-root/.venv/lib64/python3.12/site-packages/fastapi/routing.py", line 240, in merged_lifespan
 lightspeed-stack  |              async with original_context(app) as maybe_original_state:
 lightspeed-stack  |                         ^^^^^^^^^^^^^^^^^^^^^
 lightspeed-stack  |            File "/usr/lib64/python3.12/contextlib.py", line 210, in __aenter__
 lightspeed-stack  |              return await anext(self.gen)
 lightspeed-stack  |                     ^^^^^^^^^^^^^^^^^^^^^
 lightspeed-stack  |            File "/app-root/src/app/main.py", line 87, in lifespan
 lightspeed-stack  |              await AsyncOgxClientHolder().load(llama_stack_config)
 lightspeed-stack  |            File "/app-root/src/client.py", line 49, in load
 lightspeed-stack  |              await self._load_library_client(llama_stack_config)
 lightspeed-stack  |            File "/app-root/src/client.py", line 82, in _load_library_client
 lightspeed-stack  |              await client.initialize()
 lightspeed-stack  |            File "/app-root/.venv/lib64/python3.12/site-packages/ogx/core/library_client.py", line 413, in initialize
 lightspeed-stack  |              await self.stack.initialize()  # type: ignore
 lightspeed-stack  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 lightspeed-stack  |            File "/app-root/.venv/lib64/python3.12/site-packages/ogx/core/stack.py", line 753, in initialize
 lightspeed-stack  |              impls = await reso...
🧰 Additional context used
📓 Path-based instructions (2)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • pyproject.toml
pyproject.toml

📄 CodeRabbit inference engine (AGENTS.md)

Check pyproject.toml for supported Python versions, existing dependencies, and current library versions before adding dependencies or assuming versions.

Files:

  • pyproject.toml
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-08-07T07:02:21.046Z
Learning: Applies to pyproject.toml : Check `pyproject.toml` for supported Python versions, existing dependencies, and current library versions before adding dependencies or assuming versions.

Comment thread pyproject.toml
"tiktoken>=0.8.0",
# Used for Pydantic AI
"pydantic-ai>=2.23.0",
"pydantic-ai==2.27.1",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n 'pydantic-ai|pydantic-ai-slim' pyproject.toml uv.lock .konflux/requirements.hashes.wheel.pypi.txt

if rg -n 'pydantic-ai==2\.26\.0|pydantic-ai-slim==2\.26\.0' .konflux/requirements.hashes.wheel.pypi.txt; then
  echo "Stale pydantic-ai 2.26.0 entries remain." >&2
  exit 1
fi

Repository: lightspeed-core/lightspeed-stack

Length of output: 1300


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- pyproject dependency context ---'
sed -n '65,95p' pyproject.toml

printf '%s\n' '--- Konflux artifact ---'
cat -n .konflux/requirements.hashes.wheel.pypi.txt

printf '%s\n' '--- References to the Konflux requirements artifact ---'
rg -n -C 3 'requirements\.hashes\.wheel\.pypi|requirements\.hashes|pydantic-ai-slim|RHOAI is too old' .konflux .github Makefile* README.md 2>/dev/null || true

printf '%s\n' '--- Relevant lockfile package records ---'
sed -n '3160,3210p' uv.lock

Repository: lightspeed-core/lightspeed-stack

Length of output: 7655


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- All references to the exact artifact ---'
rg -n -C 4 'requirements\.hashes\.wheel\.pypi\.txt' . ':!uv.lock' || true

printf '%s\n' '--- Konflux files ---'
git ls-files '.konflux/*' '.tekton/*' | sed -n '1,160p'

printf '%s\n' '--- Dependency generation documentation and scripts ---'
rg -n -C 6 'requirements\.hashes|generate.*requirement|Konflux|PyPI packages|source index' README.md scripts .github .konflux .tekton 2>/dev/null || true

Repository: lightspeed-core/lightspeed-stack

Length of output: 32222


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- Resolver inputs and pydantic overrides ---'
cat -n .konflux/requirements.overrides.txt
cat -n .konflux/pypi_wheel_only.txt
rg -n -C 8 'requirements\.overrides|pypi_wheel_only|wheel_only|pydantic-ai|pydantic-ai-slim|pydantic-evals|pydantic-graph' scripts/konflux_resolve.py scripts/konflux_requirements.sh

printf '%s\n' '--- All generated dependency pins ---'
for file in .konflux/requirements*.txt; do
  printf '\n[%s]\n' "$file"
  rg -n '^(pydantic-ai|pydantic-ai-slim|pydantic-evals|pydantic-graph)([<=>!~]|$)' "$file" || true
done

printf '%s\n' '--- Containerfile install path ---'
sed -n '55,82p' deploy/lightspeed-stack/Containerfile

Repository: lightspeed-core/lightspeed-stack

Length of output: 12529


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
import re
import tomllib
from pathlib import Path

def pins(path):
    text = Path(path).read_text()
    return {
        name.lower().replace("_", "-"): version
        for name, version in re.findall(
            r"(?m)^(?:\s*['\"])?([A-Za-z0-9][A-Za-z0-9_.-]*)==([0-9][^ '\"]*)",
            text,
        )
    }

project = tomllib.loads(Path("pyproject.toml").read_text())
project_pins = {
    item.split("==", 1)[0].lower(): item.split("==", 1)[1]
    for item in project["project"]["dependencies"]
    if "==" in item
}
artifact = pins(".konflux/requirements.hashes.wheel.pypi.txt")
lock_text = Path("uv.lock").read_text()
lock_pins = {
    name: version
    for name, version in re.findall(
        r'(?ms)^\[\[package\]\]\s+name = "([^"]+)"\s+version = "([^"]+)"',
        lock_text,
    )
}

for name in ("pydantic-ai", "pydantic-ai-slim", "pydantic-evals", "pydantic-graph"):
    print(
        f"{name}: "
        f"pyproject={project_pins.get(name)!r}, "
        f"uv.lock={lock_pins.get(name)!r}, "
        f"konflux={artifact.get(name)!r}"
    )
PY

Repository: lightspeed-core/lightspeed-stack

Length of output: 290


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
import re
from pathlib import Path

def normalize(name):
    return name.lower().replace("_", "-")

def pins(path):
    text = Path(path).read_text()
    return {
        normalize(name): version
        for name, version in re.findall(
            r"(?m)^\s*['\"]?([A-Za-z0-9][A-Za-z0-9_.-]*)==([0-9][^ '\"]*)",
            text,
        )
    }

project_text = Path("pyproject.toml").read_text()
project_pins = {
    normalize(name): version
    for name, version in re.findall(
        r'"([A-Za-z0-9][A-Za-z0-9_.-]*)==([^"]+)"',
        project_text,
    )
}

artifact = pins(".konflux/requirements.hashes.wheel.pypi.txt")
lock_text = Path("uv.lock").read_text()
lock_pins = {
    normalize(name): version
    for name, version in re.findall(
        r'(?ms)^\[\[package\]\]\s+name = "([^"]+)"\s+version = "([^"]+)"',
        lock_text,
    )
}

for name in ("pydantic-ai", "pydantic-ai-slim", "pydantic-evals", "pydantic-graph"):
    print(
        f"{name}: "
        f"pyproject={project_pins.get(name)!r}, "
        f"uv.lock={lock_pins.get(name)!r}, "
        f"konflux={artifact.get(name)!r}"
    )
PY

Repository: lightspeed-core/lightspeed-stack

Length of output: 441


Regenerate the Konflux dependency artifact.

The hermetic install consumes .konflux/requirements.hashes.wheel.pypi.txt, which pins the Pydantic AI packages to 2.26.0. pyproject.toml and uv.lock select 2.27.1. Regenerate the Konflux requirements and hashes with make konflux-requirements.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 83, Regenerate the Konflux dependency artifacts using
make konflux-requirements so .konflux/requirements.hashes.wheel.pypi.txt matches
the Pydantic AI 2.27.1 selection in pyproject.toml and uv.lock.

Source: Coding guidelines

@tisnik
tisnik merged commit d32aeed into lightspeed-core:main Aug 12, 2026
64 of 76 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.

1 participant