Skip to content

make add_route public#624

Merged
rbs333 merged 1 commit into
mainfrom
feat/issue-623/add_route
Jun 10, 2026
Merged

make add_route public#624
rbs333 merged 1 commit into
mainfrom
feat/issue-623/add_route

Conversation

@rbs333

@rbs333 rbs333 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This resolves #623

Copilot AI review requested due to automatic review settings June 9, 2026 15:51
@rbs333 rbs333 requested review from nkanu17 and vishal-bala June 9, 2026 15:51
@jit-ci

jit-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copilot AI 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.

Pull request overview

This PR makes route mutation more usable and durable by exposing a public SemanticRouter.add_route() API and ensuring router configuration persists correctly across SemanticRouter.from_existing() reloads.

Changes:

  • Add public SemanticRouter.add_route(Route) -> str that embeds references, writes to the index, updates in-memory routes, and persists {name}:route_config.
  • Persist remove_route() changes by calling _update_router_state() after deleting the route’s indexed references.
  • Add integration tests for the public add API, duplicate-name errors, and add/remove persistence across reload; update uv.lock to reflect redisvl 0.20.0.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
redisvl/extensions/router/semantic.py Adds public add_route() and persists router config updates after remove_route().
tests/integration/test_semantic_router.py Adds integration coverage for add_route() and persistence across from_existing().
uv.lock Updates lockfile entries (including redisvl 0.20.0) and changes lockfile header revision.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +556 to +558
self._add_routes([route])
self._update_router_state()
return route.name

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rbs333 rbs333 added the auto:release Create a release when this PR is merged label Jun 10, 2026
@rbs333 rbs333 merged commit 0b6fc2f into main Jun 10, 2026
19 of 23 checks passed
@rbs333 rbs333 deleted the feat/issue-623/add_route branch June 10, 2026 13:56
@applied-ai-release-bot

Copy link
Copy Markdown

🚀 PR was released in v0.20.1 🚀

@applied-ai-release-bot applied-ai-release-bot Bot added the released This issue/pull request has been released. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto:release Create a release when this PR is merged released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SemanticRouter: public add_route method (+ two persistence bugs)

3 participants