Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Aug 6, 2025

Description

LCORE-336: bump-up Llama Stack to 0.2.17

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

Related Tickets & Documents

  • Related Issue #LCORE-336

Summary by CodeRabbit

  • Chores
    • Updated dependencies to the latest versions of llama-stack and llama-stack-client.
    • Improved container setup by refining package installation and configuration steps.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

Walkthrough

The changes include updating the llama-stack and llama-stack-client dependency versions from 0.2.16 to 0.2.17 in pyproject.toml and test.containerfile. Additionally, import statements for these clients in src/client.py and src/utils/common.py were adjusted to import directly from the top-level llama_stack package. Minor formatting adjustments were made in the Dockerfile.

Changes

Cohort / File(s) Change Summary
Dependency Version Bump
pyproject.toml, test.containerfile
Updated llama-stack and llama-stack-client versions from 0.2.16 to 0.2.17. Modified Dockerfile to update package version, remove trailing blank line before install command, and add newline at file end.
Import Statement Updates
src/client.py, src/utils/common.py
Changed imports of AsyncLlamaStackAsLibraryClient and LlamaStackAsLibraryClient to import directly from the top-level llama_stack package instead of the submodule llama_stack.distribution.library_client.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

A hop and a skip, a version anew,
Llama-stack’s numbers have grown by a few.
With a nibble of code and a carrot in paw,
This rabbit approves what it just saw.
Just a quick tweak, no need to fret—
The stack is updated, the project is set! 🥕

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a0e417 and a90e0c5.

📒 Files selected for processing (1)
  • test.containerfile (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • test.containerfile
⏰ 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). (1)
  • GitHub Check: build-pr
✨ Finishing Touches
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca0fa35 and 78b8123.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml (1 hunks)
⏰ 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). (1)
  • GitHub Check: build-pr

Comment on lines +28 to +29
"llama-stack==0.2.17",
"llama-stack-client==0.2.17",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify 0.2.17 exists & still supports Python 3.12, and consider relaxing the hard pin

Good to see both libs kept in sync, but two quick checks would de-risk the bump:

  1. Make sure llama-stack==0.2.17 and llama-stack-client==0.2.17 are published on PyPI and list Python 3.12 in their classifiers.
  2. Hard-pinning (==) stops you from receiving future patch releases (0.2.18, 0.2.19…) that may deliver security fixes. A more typical spec is “at least this version but stay on the 0.2 line”.

Example diff:

-    "llama-stack==0.2.17",
-    "llama-stack-client==0.2.17",
+    "llama-stack>=0.2.17,<0.3",
+    "llama-stack-client>=0.2.17,<0.3",

Quick verification script:


🏁 Script executed:

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

for pkg in llama-stack llama-stack-client; do
  echo "Checking $pkg 0.2.17 on PyPI…"
  curl -s "https://pypi.org/pypi/${pkg}/json" | jq -r --arg v "0.2.17" \
    '.releases[$v] | if . == null then "NOT FOUND" else "Found" end'
done

Length of output: 580


Let’s verify that both packages declare Python 3.12 in their PyPI classifiers:


🏁 Script executed:

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

for pkg in llama-stack llama-stack-client; do
  echo "Checking Python 3.12 support for $pkg 0.2.17…"
  curl -s "https://pypi.org/pypi/${pkg}/json" \
    | jq -r '.info.classifiers[]' \
    | grep -q "Programming Language :: Python :: 3.12" \
    && echo "✔️ $pkg supports Python 3.12" \
    || echo "$pkg does NOT list Python 3.12"
done

Length of output: 802


Address Python 3.12 support in llama-stack & relax hard pins

Both packages are published at 0.2.17, but the llama-stack release doesn’t list Python 3.12 as supported, which may block installations on 3.12 environments:

• In pyproject.toml (lines 28–29):
– “llama-stack==0.2.17” exists but ❌ lacks a 3.12 classifier
– “llama-stack-client==0.2.17” ✅ supports Python 3.12

Please either ensure llama-stack 0.2.17 is updated to declare Python 3.12 support (or bump to a version that does) and consider loosening the pins so you continue to get patch releases:

-    "llama-stack==0.2.17",
-    "llama-stack-client==0.2.17",
+    "llama-stack>=0.2.17,<0.3",
+    "llama-stack-client>=0.2.17,<0.3",
📝 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
"llama-stack==0.2.17",
"llama-stack-client==0.2.17",
"llama-stack>=0.2.17,<0.3",
"llama-stack-client>=0.2.17,<0.3",
🤖 Prompt for AI Agents
In pyproject.toml around lines 28 to 29, the dependency "llama-stack==0.2.17"
lacks declared support for Python 3.12, which may cause installation issues. To
fix this, verify if a newer version of "llama-stack" exists that includes Python
3.12 support and update the version accordingly. Also, relax the version pinning
by changing from exact "==" pins to a compatible range (e.g., "~=") to allow
patch updates while ensuring compatibility.

Copy link
Contributor

@umago umago left a comment

Choose a reason for hiding this comment

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

Fetched the PR locally, did some manual checks (query/streaming_query) and it seems good. CI upstream also green so LGTM

@manstis
Copy link
Contributor

manstis commented Aug 6, 2025

Don't forget lightspeed-providers will need checking too.

@omertuc
Copy link
Contributor

omertuc commented Aug 6, 2025

/hold

Suspected llama-stack regression

@omertuc
Copy link
Contributor

omertuc commented Aug 6, 2025

/unhold

Nevermind, it's a bit complicated but tl;dr it's because in assisted-chat we did:

  - provider_id: gemini
    provider_type: remote::gemini
    config:
      api_key: ${env.GEMINI_API_KEY:+}

instead of

  - provider_id: gemini
    provider_type: remote::gemini
    config:
      api_key: ${env.GEMINI_API_KEY:=}

(we copied the llama-stack config from their repo which they since fixed)

(it worked perfectly fine because litellm picked our keys regardless, until they added an explicit error in llama-stack)

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.

5 participants