Skip to content

LCORE-2505: Add migration guide and deprecation notes for BYOK config refactoring#1882

Open
are-ces wants to merge 2 commits into
lightspeed-core:mainfrom
are-ces:lcore-2505-migration-guide-byok-config
Open

LCORE-2505: Add migration guide and deprecation notes for BYOK config refactoring#1882
are-ces wants to merge 2 commits into
lightspeed-core:mainfrom
are-ces:lcore-2505-migration-guide-byok-config

Conversation

@are-ces

@are-ces are-ces commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a v0.7.0 migration guide and deprecation notices for the RAG configuration refactoring (PR #1843 / LCORE-1426). The migration guide documents the move from four separate top-level sections (byok_rag, rag, okp, reranker) to a unified nested rag section, including:

  • Field-by-field mapping table (old path → new path)
  • Full before/after YAML examples with inline comments
  • Chunk limit constants → config fields migration table

Deprecation callouts are added to byok_guide.md and rag_guide.md linking to the migration guide.

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

  • Assisted-by: Claude Code
  • Generated by: Claude Opus 4.6

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

Summary by CodeRabbit

  • Documentation
    • Added a v0.7.0 migration guide explaining how RAG configuration is consolidated under a unified rag section, including updated BYOK store, retrieval source, OKP, and reranker structure, plus field remapping guidance.
    • Introduced versioned deprecation warnings in the configuration and RAG guides, noting deprecated legacy sections and chunk-limit constants and pointing users to the v0.7.0 migration guide for the new lightspeed-stack.yaml fields.

… refactoring

Add docs/migrations/v0.7.0.md with field mapping, full RAG before/after
examples, and chunk limit migration table. Add deprecation callouts
to byok_guide.md and rag_guide.md linking to the migration guide.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3a9f9e2f-6a02-4733-8178-88872e2bd30d

📥 Commits

Reviewing files that changed from the base of the PR and between f9f362b and 803947a.

📒 Files selected for processing (1)
  • docs/migrations/v0.7.0.md
📜 Recent review details
⏰ Context from checks skipped due to timeout. (13)
  • GitHub Check: build-pr
  • GitHub Check: Pylinter
  • GitHub Check: radon
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-06-09T07:59:22.991Z
Learnt from: are-ces
Repo: lightspeed-core/lightspeed-stack PR: 1882
File: docs/migrations/v0.7.0.md:11-27
Timestamp: 2026-06-09T07:59:22.991Z
Learning: When reviewing lightspeed-stack migration documentation, a side-by-side appearance of the old v0.6 top-level configuration keys (e.g., `byok_rag`, `okp`, `reranker`, `rag.inline`, `rag.tool`) and the new v0.7.0 nested `rag.*` configuration paths (e.g., `rag.byok.stores`, `rag.okp`, `rag.retrieval.inline`, `rag.retrieval.tool`, `rag.retrieval.inline.reranker`) is expected and reflects the upgrade/mapping. Do not flag these as schema conflicts as long as the document clearly shows the old paths on the v0.6 side and the corresponding new paths on the v0.7.0 side per the migration guide.

Applied to files:

  • docs/migrations/v0.7.0.md
🔇 Additional comments (1)
docs/migrations/v0.7.0.md (1)

1-129: LGTM!


Walkthrough

This PR adds v0.7.0 documentation for RAG configuration restructuring, including a new migration guide and deprecation warnings in existing guides for the updated rag layout and chunk-limit fields.

Changes

RAG configuration restructuring documentation

Layer / File(s) Summary
Migration guide overview and examples
docs/migrations/v0.7.0.md
Introduces the v0.7.0 migration guide with the unified rag section mapping, the rag_type to backend rename, removal of backend prefixes, and the before/after YAML configuration example.
Chunk limits migration
docs/migrations/v0.7.0.md
Adds the chunk-limit section mapping the former constants to configurable lightspeed-stack.yaml fields under rag.byok, rag.okp, and rag.retrieval.
Deprecation warnings in existing guides
docs/byok_guide.md, docs/rag_guide.md
Adds warning callouts in the BYOK and RAG guides that mark the old top-level configuration sections and chunk-limit constants as deprecated and link to the migration guide.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • syedriko
  • tisnik
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the docs-only migration guide and deprecation notes for the BYOK/RAG config refactor.
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.
✨ Finishing Touches
🧪 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.

@are-ces

are-ces commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Should we include deprecation warning in logs? My concern is that if we do, users cannot already migrate to the new config format which will be confusing.

What do you think? @syedriko @tisnik

@are-ces are-ces requested review from syedriko and tisnik June 9, 2026 07:56

@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 `@docs/migrations/v0.7.0.md`:
- Around line 11-27: The migration doc describes moving fields into rag.byok,
rag.okp and rag.retrieval.* but the runtime schema still exposes top-level
byok_rag, okp, reranker and rag.inline/rag.tool and code
(validate_reranker_auto_enable) reads self.reranker and self.rag.inline; update
the doc to match the actual v0.7.0 schema by changing the Field Mapping and
examples to show the current top-level paths (byok_rag, okp, reranker,
rag.inline/rag.tool) OR explicitly mark this migration as targeting a future
schema and add version gating guidance; also mention
validate_reranker_auto_enable, self.reranker, self.rag.inline and the top-level
config names so maintainers can reconcile examples with the runtime model.
🪄 Autofix (Beta)

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

Run ID: 45cf17c1-0c9a-4824-ae83-763a7dddb35c

📥 Commits

Reviewing files that changed from the base of the PR and between 2606037 and f9f362b.

📒 Files selected for processing (3)
  • docs/byok_guide.md
  • docs/migrations/v0.7.0.md
  • docs/rag_guide.md
📜 Review details
⏰ 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). (10)
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: mypy
  • GitHub Check: black
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: bandit
  • GitHub Check: Pylinter
  • GitHub Check: build-pr
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
🔇 Additional comments (2)
docs/byok_guide.md (1)

116-123: LGTM!

docs/rag_guide.md (1)

66-73: LGTM!

Also applies to: 323-328

Comment thread docs/migrations/v0.7.0.md Outdated

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

LGTM

Comment thread docs/migrations/v0.7.0.md Outdated

### Chunk Limits

Chunk limits were previously hardcoded as constants in `src/constants.py`. They are now configurable fields in `lightspeed-stack.yaml` with the same default values:

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.

"Chunk limits have been moved from constants in the code to configurable fields in lightspeed-stack.yaml. The default values of the fields match the previous constants."
?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verb tense is wrong,
"chunk limits will be moved from constants in the code to configurable fields in lightspeed-stack.yaml"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the verb tenses over the docs, are you confused by something else?

What it means is that the old constants become configurable in the lightspeed config, and the defaults are unchanged.

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.

It's all good, I just thought why mention a file with code in user-facing docs.

Use future tense since these changes are not yet released.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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