Skip to content

[feat] Add configurable timeout for Llama Stack requests#1087

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
amito:feature/timeout-extend-feature
Feb 1, 2026
Merged

[feat] Add configurable timeout for Llama Stack requests#1087
tisnik merged 1 commit intolightspeed-core:mainfrom
amito:feature/timeout-extend-feature

Conversation

@amito
Copy link
Copy Markdown
Contributor

@amito amito commented Feb 1, 2026

Description

Introduces a timeout configuration parameter (default 180s) to accommodate long-running RAG queries and prevent premature request failures.

I did some work on POCing Lightspeed for a project in Red Hat OpenShift AI (the POC can be found in my repo).
Ran into some issues with slightly larger models where I timed out on RAG inference calls and had to increase Llama Stack timeouts. The change here implements this timeout extension. I thought it can be useful to others, hence the PR.

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

Tools used to create PR

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

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

Related Tickets & Documents

  • Related Issue #
  • Closes #

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

  • Fixed unit tests and made sure they work
  • I have built the lightspeed-core image and deployed it on my OpenShift cluster to test this change.

Summary by CodeRabbit

  • New Features

    • Added configurable request timeout setting for Llama Stack service requests, with a default of 180 seconds.
  • Tests

    • Updated test expectations to verify the new timeout configuration is properly serialized.

✏️ Tip: You can customize this high-level summary in your review settings.

@amito amito marked this pull request as draft February 1, 2026 11:13
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 1, 2026

Walkthrough

A timeout configuration field is added to the Llama Stack configuration with a default of 180 seconds, logged during client initialization, and passed to the AsyncLlamaStackClient constructor. Related test expectations are updated to reflect the new configuration field.

Changes

Cohort / File(s) Summary
Timeout Feature
src/models/config.py, src/client.py, tests/unit/models/config/test_dump_configuration.py
Adds a timeout field (PositiveInt, default 180 seconds) to LlamaStackConfiguration, logs the timeout value in client initialization, passes it to AsyncLlamaStackClient, and updates test expectations to include the new field in serialized output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 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 accurately summarizes the main change: adding a configurable timeout for Llama Stack requests. It is specific, concise, and directly reflects the primary purpose of the pull request.
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 docstrings
🧪 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.

@amito amito force-pushed the feature/timeout-extend-feature branch from d213e81 to 8ecd66d Compare February 1, 2026 11:30
Introduces a timeout configuration parameter (default 180s) to accommodate
long-running RAG queries and prevent premature request failures.

Signed-off-by: Amit Oren <amoren@redhat.com>
@amito amito force-pushed the feature/timeout-extend-feature branch from 8ecd66d to 8c0b029 Compare February 1, 2026 11:40
@amito amito marked this pull request as ready for review February 1, 2026 11:40
Copy link
Copy Markdown
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
Copy link
Copy Markdown
Contributor

tisnik commented Feb 1, 2026

/ok-to-test

@tisnik
Copy link
Copy Markdown
Contributor

tisnik commented Feb 1, 2026

/ok-to-test

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants