Skip to content

LCORE-1285: Update Llama Stack to 0.5.2#1293

Merged
tisnik merged 3 commits intolightspeed-core:mainfrom
jrobertboos:lcore-1285
Mar 10, 2026
Merged

LCORE-1285: Update Llama Stack to 0.5.2#1293
tisnik merged 3 commits intolightspeed-core:mainfrom
jrobertboos:lcore-1285

Conversation

@jrobertboos
Copy link
Contributor

@jrobertboos jrobertboos commented Mar 9, 2026

Description

Updated Llama Stack to 0.5.X in order to enable the network configuration on providers so that TLS and Proxy support can be added.

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

Identify any AI code assistants used in this PR (for transparency and review context)

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

Related Tickets & Documents

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.

Summary by CodeRabbit

  • Chores

    • Updated llama-stack packages to v0.5.2 and bumped maximum supported Llama Stack version.
    • Updated build/requirements pins and hashes, and added/adjusted several build-related dependency entries.
  • Bug Fixes

    • Improved robustness of content-response handling to avoid attribute access errors.
  • Tests

    • Updated end-to-end test expectations to reflect the new llama-stack version.

…ent, and llama-stack-api; add new package 'circuitbreaker' version 2.1.3 and 'oci' version 2.168.0; adjust supported Llama Stack version in constants; fix response handling in utils.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d0bc77c-f111-45fa-a402-605764bd9752

📥 Commits

Reviewing files that changed from the base of the PR and between ef914b0 and 280741f.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • pyproject.toml
  • requirements-build.txt
  • requirements.hashes.source.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • pyproject.toml

Walkthrough

Updates llama-stack packages and related version constant to 0.5.2, adds/updates multiple build and requirements entries (including hashes), and makes defensive attribute access changes in response parsing; test expectation updated to match the new llama-stack version.

Changes

Cohort / File(s) Summary
Dependency & Build Pins
pyproject.toml, requirements-build.txt, requirements.hashes.source.txt
Bumped llama-stack packages to 0.5.2 and updated many dependency pins and SHA256 hashes; added/adjusted build-related entries (e.g., cython, maturin) and commented optional deps.
Version Constant & Tests
src/constants.py, tests/e2e/features/info.feature
Updated MAXIMAL_SUPPORTED_LLAMA_STACK_VERSION constant and test assertion to reflect llama-stack 0.5.2.
Response Parsing Robustness
src/utils/responses.py
Replaced direct part.type access with getattr(part, "type", None) in multiple locations to avoid AttributeError for parts missing a type attribute; behavior otherwise unchanged.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 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 and specifically summarizes the main change: updating Llama Stack dependencies to version 0.5.2, which aligns with all file modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

🧹 Nitpick comments (1)
src/utils/responses.py (1)

1142-1151: Log skipped content parts on the fallback path.

This avoids the crash, but it also makes unsupported parts disappear silently. A small debug log here would make empty extracted text much easier to diagnose.

💡 Suggested change
     for part in content:
         part_type = getattr(part, "type", None)
         if part_type == "input_text":
             input_text_part = cast(InputTextPart, part)
             if input_text_part.text:
                 text_fragments.append(input_text_part.text.strip())
         elif part_type == "output_text":
             output_text_part = cast(OutputTextPart, part)
             if output_text_part.text:
                 text_fragments.append(output_text_part.text.strip())
         elif part_type == "refusal":
             refusal_part = cast(ContentPartRefusal, part)
             if refusal_part.refusal:
                 text_fragments.append(refusal_part.refusal.strip())
+        else:
+            logger.debug("Skipping unsupported response content part: %r", part)

As per coding guidelines, "Use logger.debug() for detailed diagnostic information".

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

In `@src/utils/responses.py` around lines 1142 - 1151, The fallback path that
skips unsupported content parts currently silently drops them; update the logic
around the part_type checks (look for the variables part_type, part, and the
text_fragments list in the function handling response parts) to call
logger.debug() when encountering non-text/unsupported part types (e.g., in the
final elif/else branch where "refusal" or other types are handled) so the debug
log includes the part_type and a small representation of the part (or its id) to
aid diagnosis; ensure you use the module's existing logger (or import one if
missing) and keep the message concise and diagnostic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/utils/responses.py`:
- Around line 1142-1151: The fallback path that skips unsupported content parts
currently silently drops them; update the logic around the part_type checks
(look for the variables part_type, part, and the text_fragments list in the
function handling response parts) to call logger.debug() when encountering
non-text/unsupported part types (e.g., in the final elif/else branch where
"refusal" or other types are handled) so the debug log includes the part_type
and a small representation of the part (or its id) to aid diagnosis; ensure you
use the module's existing logger (or import one if missing) and keep the message
concise and diagnostic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d703aad5-1415-4222-9323-04cdd2ee2b0c

📥 Commits

Reviewing files that changed from the base of the PR and between e73778a and ef914b0.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • pyproject.toml
  • src/constants.py
  • src/utils/responses.py
  • tests/e2e/features/info.feature

Copy link
Contributor

@asimurka asimurka 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

@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.

Please try to update Konfux references as well. This way we'll see if/how it builds in Konflux

@jrobertboos
Copy link
Contributor Author

jrobertboos commented Mar 10, 2026

Please try to update Konfux references as well. This way we'll see if/how it builds in Konflux

@tisnik By this do you mean running make konflux-requirements or is there something else that I would need to do?

@jrobertboos jrobertboos requested a review from tisnik March 10, 2026 14:18
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

@tisnik tisnik merged commit 967d89f into lightspeed-core:main Mar 10, 2026
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