Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Nov 10, 2025

Description

LCORE-951: example configuration files

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-951

Summary by CodeRabbit

  • Documentation
    • Added six new example configuration files for Lightspeed Stack deployments: RAG setup with FAISS vector databases, conversation caching with PostgreSQL and SQLite backends, MCP server integration, and quota limiting with configurable per-user and cluster-level rate limits. These examples provide practical templates for common deployment scenarios.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

This PR introduces six new YAML configuration example files for the Lightspeed Core Service, demonstrating various feature configurations including RAG-backed retrieval, conversation caching with PostgreSQL and SQLite backends, MCP server integration, and quota limiting with both database backends.

Changes

Cohort / File(s) Summary
RAG Configuration
examples/lightspeed-stack-byok-rag.yaml
Adds example configuration for Lightspeed Core Service with BYOK RAG setup, defining service settings, authentication, quota handlers, and inline FAISS-based RAG configurations for OCP docs and knowledge base retrieval.
Conversation Cache Configurations
examples/lightspeed-stack-conversation-cache-pg.yaml, examples/lightspeed-stack-conversation-cache-sqlite.yaml
Adds two example configurations demonstrating conversation caching with PostgreSQL and SQLite backends, including service metadata, user data collection settings, and database-specific connection parameters.
MCP Server Configuration
examples/lightspeed-stack-mcp-servers.yaml
Adds example configuration for Model Context Protocol (MCP) servers integration, defining service settings, authentication, user data collection, and a list of three MCP server definitions.
Quota Limiter Configurations
examples/lightspeed-stack-quota-limiter-pg.yaml, examples/lightspeed-stack-quota-limiter-sqlite.yaml
Adds two example configurations for quota handling with PostgreSQL and SQLite backends, each defining service settings, quota handlers with user and cluster-level rate limiters, and scheduler configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • Verify YAML syntax and structure validity across all six configuration files
  • Check consistency of field names and values with documented Lightspeed Core Service schema
  • Ensure database connection parameters and paths are realistic and follow conventions
  • Validate quota limiter and rate limit values are sensible defaults

Possibly related PRs

Suggested reviewers

  • umago
  • ldjebran
  • matysek

Poem

🐰 Six configurations hop into place,
RAG and cache with elegant grace,
MCP servers and quotas unite,
YAML examples shine ever so bright,
The Lightspeed Stack is ready to race! ✨

Pre-merge checks and finishing touches

✅ 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: adding example configuration files, with a direct reference to the related issue LCORE-951.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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: 5

🧹 Nitpick comments (3)
examples/lightspeed-stack-conversation-cache-pg.yaml (1)

19-27: Add documentation and address hardcoded credentials in examples.

Example configurations expose hardcoded credentials (password: 123qwe, api_key: xyzzy). While acceptable in the examples/ directory for non-production use, adding inline comments would help users understand:

  1. When/how to replace these test values
  2. What each PostgreSQL connection parameter means
  3. Why ssl_mode and gss_encmode are set to disable

Consider adding a comment block at the top or inline explaining the example nature and credential replacement.

  conversation_cache:
    type: "postgres"
    postgres:
+      # Test/example credentials—replace with secure values in production
      host: 127.0.0.1
      db: test
      user: tester
      password: 123qwe
+      # SSL/GSS disabled for local development; enable in production
      ssl_mode: disable
      gss_encmode: disable
examples/lightspeed-stack-mcp-servers.yaml (1)

9-12: Add documentation for api_key.

The api_key at line 12 contains a placeholder test value (xyzzy). Consider adding an inline comment clarifying this is for development/examples only.

  llama_stack:
    use_as_library_client: false
    url: http://localhost:8321
+   # Test api_key—replace with actual credentials in production
    api_key: xyzzy
examples/lightspeed-stack-byok-rag.yaml (1)

37-47: Add comments clarifying RAG configuration and file paths.

The RAG configuration uses hardcoded paths in /tmp/ which may not persist or could conflict. Consider adding inline documentation explaining:

  1. The purpose of each RAG configuration
  2. How to customize db_path for production use
  3. The role of embedding_dimension and vector_db_id fields
  byok_rag:
+   # Example RAG configurations using local FAISS vector stores
-   - rag_id: ocp_docs
+   - rag_id: ocp_docs  # Example: OpenShift documentation RAG
      rag_type: inline::faiss
      embedding_dimension: 1024
      vector_db_id: vector_byok_1
+     # Customize db_path for production; /tmp is used only for examples
      db_path: /tmp/ocp.faiss
-   - rag_id: knowledge_base
+   - rag_id: knowledge_base  # Example: Generic knowledge base RAG
      rag_type: inline::faiss
      embedding_dimension: 384
      vector_db_id: vector_byok_2
      db_path: /tmp/kb.faiss
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a5c345 and 6c71c74.

📒 Files selected for processing (6)
  • examples/lightspeed-stack-byok-rag.yaml (1 hunks)
  • examples/lightspeed-stack-conversation-cache-pg.yaml (1 hunks)
  • examples/lightspeed-stack-conversation-cache-sqlite.yaml (1 hunks)
  • examples/lightspeed-stack-mcp-servers.yaml (1 hunks)
  • examples/lightspeed-stack-quota-limiter-pg.yaml (1 hunks)
  • examples/lightspeed-stack-quota-limiter-sqlite.yaml (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). (4)
  • GitHub Check: build-pr
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)

Comment on lines +20 to +36
quota_handlers:
sqlite:
db_path: quota.sqlite
limiters:
- name: user_monthly_limits
type: user_limiter
initial_quota: 50
quota_increase: 50
period: "30 seconds"
- name: cluster_monthly_limits
type: cluster_limiter
initial_quota: 100
quota_increase: 100
period: "30 seconds"
scheduler:
# scheduler ticks in seconds
period: 10
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

Fix period value format inconsistency (same as quota-limiter-pg).

The scheduler period (line 36) uses bare 10 while limiter periods use "30 seconds" strings. Align the format for consistency across all example configs.

  scheduler:
    # scheduler ticks in seconds
-   period: 10
+   period: "10 seconds"
📝 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
quota_handlers:
sqlite:
db_path: quota.sqlite
limiters:
- name: user_monthly_limits
type: user_limiter
initial_quota: 50
quota_increase: 50
period: "30 seconds"
- name: cluster_monthly_limits
type: cluster_limiter
initial_quota: 100
quota_increase: 100
period: "30 seconds"
scheduler:
# scheduler ticks in seconds
period: 10
quota_handlers:
sqlite:
db_path: quota.sqlite
limiters:
- name: user_monthly_limits
type: user_limiter
initial_quota: 50
quota_increase: 50
period: "30 seconds"
- name: cluster_monthly_limits
type: cluster_limiter
initial_quota: 100
quota_increase: 100
period: "30 seconds"
scheduler:
# scheduler ticks in seconds
period: "10 seconds"
🤖 Prompt for AI Agents
In examples/lightspeed-stack-byok-rag.yaml around lines 20 to 36, the scheduler
period value uses a bare numeric 10 while limiter periods use string durations
like "30 seconds"; update the scheduler period to match the same string duration
format (e.g., "10 seconds") for consistency across example configs.

Comment on lines +19 to +22
conversation_cache:
type: "sqlite"
sqlite:
db_path: quota.sqlite
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

Fix YAML indentation inconsistency.

Line 22 uses 6 spaces of indentation instead of 4. For consistency with standard YAML conventions and the PostgreSQL variants (e.g., lightspeed-stack-conversation-cache-pg.yaml), nested keys should use 2-space increments.

  conversation_cache:
    type: "sqlite"
    sqlite:
-      db_path: quota.sqlite
+    db_path: quota.sqlite
📝 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
conversation_cache:
type: "sqlite"
sqlite:
db_path: quota.sqlite
conversation_cache:
type: "sqlite"
sqlite:
db_path: quota.sqlite
🤖 Prompt for AI Agents
In examples/lightspeed-stack-conversation-cache-sqlite.yaml around lines 19 to
22, the nested key indentation is inconsistent (line 22 is indented 6 spaces);
update the YAML to use 2-space increments for nested keys so that "sqlite:"
remains indented 2 spaces under "conversation_cache:" and "db_path:" is indented
4 spaces under "sqlite:" (i.e., change line 22 from 6 spaces to 4 spaces).

Comment on lines +34 to +42
period: "30 seconds"
- name: cluster_monthly_limits
type: cluster_limiter
initial_quota: 100
quota_increase: 100
period: "30 seconds"
scheduler:
# scheduler ticks in seconds
period: 10
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

Fix inconsistent period value format.

The scheduler period (line 42) uses a bare number 10 while the limiter periods (lines 34, 38) use string format "30 seconds". For consistency and clarity, align the format—either use numeric values with a clarifying comment, or use string format with units.

  scheduler:
    # scheduler ticks in seconds
-   period: 10
+   period: "10 seconds"

Alternatively, if the schema expects numeric values only in this context, update the limiter periods to match:

    - name: user_monthly_limits
      type: user_limiter
      initial_quota: 50
      quota_increase: 50
-     period: "30 seconds"
+     period: 30
📝 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
period: "30 seconds"
- name: cluster_monthly_limits
type: cluster_limiter
initial_quota: 100
quota_increase: 100
period: "30 seconds"
scheduler:
# scheduler ticks in seconds
period: 10
period: "30 seconds"
- name: cluster_monthly_limits
type: cluster_limiter
initial_quota: 100
quota_increase: 100
period: "30 seconds"
scheduler:
# scheduler ticks in seconds
period: "10 seconds"
🤖 Prompt for AI Agents
In examples/lightspeed-stack-quota-limiter-pg.yaml around lines 34 to 42, the
scheduler period uses a bare number (10) while the limiter periods use string
values ("30 seconds"); make formats consistent by changing the scheduler period
to the same string format — replace 10 with "10 seconds" (or alternatively
convert the limiter periods to numeric seconds if the schema requires numbers)
so all period fields use the same type and unit.

Comment on lines +20 to +22
quota_handlers:
sqlite:
db_path: quota.sqlite
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

Fix YAML indentation consistency (SQLite block).

Line 22 uses 6 spaces indentation, inconsistent with standard 4-space YAML nesting. This matches the issue in lightspeed-stack-conversation-cache-sqlite.yaml. Ensure all nested keys follow 2-space increments.

  quota_handlers:
    sqlite:
-      db_path: quota.sqlite
+    db_path: quota.sqlite

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In examples/lightspeed-stack-quota-limiter-sqlite.yaml around lines 20–22, the
db_path line is indented with 6 spaces which is inconsistent; change the YAML
indentation so nested keys use 2-space increments (i.e., "sqlite:" indented 2
spaces under "quota_handlers:" and "db_path:" indented 2 spaces further under
"sqlite:") to make indentation consistent with the other YAML examples.

Comment on lines +34 to +36
scheduler:
# scheduler ticks in seconds
period: 10
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

Fix period value format inconsistency.

The scheduler period (line 36) uses bare 10 while limiter periods (lines 28, 32) use "30 seconds" strings. This inconsistency appears across multiple example files. Standardize the format.

  scheduler:
    # scheduler ticks in seconds
-   period: 10
+   period: "30 seconds"  # or align to numeric format across all examples
📝 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
scheduler:
# scheduler ticks in seconds
period: 10
scheduler:
# scheduler ticks in seconds
period: "10 seconds"
🤖 Prompt for AI Agents
In examples/lightspeed-stack-quota-limiter-sqlite.yaml around lines 34 to 36,
the scheduler period is written as a bare number (10) while other periods in the
file use string durations like "30 seconds"; update the scheduler period to the
same string duration format (e.g., "10 seconds") so all period values are
consistent, quoted, and parsable as durations.

@tisnik tisnik merged commit 8d49513 into lightspeed-core:main Nov 10, 2025
21 of 23 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