Repository navigation
fix(rag): index on the Lemonade --base-url names, not the default - #7242
Closed
github-actions[bot] wants to merge 1 commit into
Closed
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
gaia talk --index with --base-url sent document indexing to the default Lemonade on localhost:13305, reloading the embedder on whatever server was there. enable_rag now forwards the chat's base_url into RAGConfig, and the RAG SDK builds its embedder and chunking clients with it. Closes #7190
Collaborator
|
This duplicates #7236, which fixes the same 🔍 Technical detailsBoth PRs make the same three source changes: |
4 tasks done
Collaborator
bniladridas
pushed a commit
to bniladridas/gaia
that referenced
this pull request
Nov 12, 2026
…er (amd#7263) amd#7236 routed RAG and chat to the `--base-url` server, but two paths stayed untested: a `base_url` passed to `enable_rag` must beat the chat config's, and LLM chunking must build its Lemonade client against the configured server. A regression in either would quietly send RAG traffic to the default-port Lemonade. The precedence test is salvaged from draft amd#7242, adapted to main. ## Test plan - [x] `python -m pytest tests/unit/test_base_url_reaches_every_client.py` passes - [x] Each new test fails when its behavior is broken (`setdefault` swapped for assignment; chunking client built without `base_url`) - [x] `python -m pytest tests/unit/rag tests/unit/test_chat_sdk_rag_grant.py` passes - [x] `python util/lint.py --black --isort` clean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gaia talk --index … --base-url Xsent document indexing to the default Lemonade onlocalhost:13305instead ofX. That reloaded the embedder on whatever server happened to be listening there, even one owned by another session. Now indexing uses the server the chat uses. An unreachable--base-urlfails the same way it already did when the URL came fromLEMONADE_BASE_URL.Closes #7190
Test plan
python -m pytest tests/unit/rag/test_rag_base_url.py tests/unit/test_chat_sdk_rag_grant.py tests/unit/rag/test_llm_chunking.py tests/unit/test_talk_rag_startup.pypassespython -m pytest tests/unit/ -xpassespython util/lint.py --allpassesgaia talk --index docs/quote.txt --no-tts --no-lemonade-check --base-url http://127.0.0.1:59344/api/v1exits 1 before voice startup, and the 13305 server's log shows no embedder unload or reload🔍 Technical details
AgentSDK.enable_rag(src/gaia/chat/sdk.py) builtRAGConfigwithoutself.config.base_url. It now passes it through, and abase_urlthe caller gives inrag_kwargsstill overrides it.RAGSDK._start_embedderand the LLM-chunking path (src/gaia/rag/sdk.py) built a bareLemonadeClient(). Both now passbase_url=self.config.base_url. When that isNone,LemonadeClientresolves it as before (LEMONADE_BASE_URL, then the default), so callers that never set a URL see no change.TalkSDK.enable_ragdelegates to the chat SDK, so talk gets the fix through that path.test_chat_sdk_rag_grant.pygainsbase_url, whichAgentConfigalways has.python-pptx, which this runner lacks. The fulltests/unit/run here was killed by the environment partway through, with no failures before that, so CI's full run is the check that counts.tests/unit/rag/test_rag_base_url.pychecks thatenable_ragforwards the URL, that an explicitrag_kwargsURL wins, and that the embedder'sLemonadeClientis built with the configured URL.