-
Notifications
You must be signed in to change notification settings - Fork 94
LCORE-1473: Tool RAG is always enabled #1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,8 @@ | |
| from enum import Enum | ||
| from functools import cached_property | ||
| from pathlib import Path | ||
| from typing import Any, Optional, Literal, Self | ||
| from re import Pattern | ||
| from typing import Any, Literal, Optional, Self | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check minimum Python version in project configuration
echo "=== Checking pyproject.toml for Python version ==="
cat pyproject.toml 2>/dev/null | grep -A5 "python" | head -20
echo ""
echo "=== Checking setup.py/setup.cfg for Python version ==="
cat setup.py 2>/dev/null | grep -i python | head -10
cat setup.cfg 2>/dev/null | grep -i python | head -10
echo ""
echo "=== Checking if typing_extensions.Self was previously used ==="
git log -1 --format="%H" -- src/models/config.py 2>/dev/null
git show HEAD:src/models/config.py 2>/dev/null | head -15Repository: lightspeed-core/lightspeed-stack Length of output: 865 🏁 Script executed: # Check if Self import was added in this PR
echo "=== Check git diff for src/models/config.py ==="
git diff HEAD -- src/models/config.py 2>/dev/null | head -50
echo ""
echo "=== Check actual usage of Self in the file ==="
rg "Self" src/models/config.py -B2 -A2Repository: lightspeed-core/lightspeed-stack Length of output: 4681 Change The file imports 🤖 Prompt for AI Agents |
||
|
|
||
| import jsonpath_ng | ||
| import yaml | ||
|
|
@@ -1704,8 +1704,10 @@ class RagConfiguration(ConfigurationBase): | |
|
|
||
| Backward compatibility: | ||
| - ``inline`` defaults to ``[]`` (no inline RAG). | ||
| - ``tool`` defaults to ``None`` which means all registered vector stores | ||
| are used (identical to the previous ``tool.byok.enabled = True`` default). | ||
| - ``tool`` defaults to ``[]`` (no tool RAG). | ||
|
|
||
| If no RAG strategy is defined (inline and tool are empty), | ||
| the RAG tool will register all stores available to llama-stack. | ||
| """ | ||
|
|
||
| inline: list[str] = Field( | ||
|
|
@@ -1715,8 +1717,8 @@ class RagConfiguration(ConfigurationBase): | |
| f"Use '{constants.OKP_RAG_ID}' to enable OKP inline RAG. Empty by default (no inline RAG).", | ||
| ) | ||
|
|
||
| tool: Optional[list[str]] = Field( | ||
| default=None, | ||
| tool: list[str] = Field( | ||
| default_factory=list, | ||
| title="Tool RAG IDs", | ||
| description="RAG IDs made available to the LLM as a file_search tool. " | ||
| f"Use '{constants.OKP_RAG_ID}' to include the OKP vector store. " | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve conflicting
rag.toolbehavior in the OpenAPI schema docs.Line 11041 states that omitting
toolenables all BYOK stores, but Line 11047 statestooldefaults to[]and “all stores” is only a fallback when bothinlineandtoolare empty. These semantics conflict and will mislead API/config consumers.Suggested doc fix
"tool": { "items": { "type": "string" }, "type": "array", + "default": [], "title": "Tool RAG IDs", - "description": "RAG IDs made available to the LLM as a file_search tool. Use 'okp' to include the OKP vector store. When omitted, all registered BYOK vector stores are used (backward compatibility)." + "description": "RAG IDs made available to the LLM as a file_search tool. Use 'okp' to include the OKP vector store. Defaults to an empty list (tool RAG disabled). If both rag.inline and rag.tool are empty, all stores available to llama-stack are registered as fallback." }📝 Committable suggestion
🤖 Prompt for AI Agents