feat(agents): select knowledge-base models - #12145
Draft
localai-org-maint-bot wants to merge 4 commits into
Draft
localai-org-maint-bot wants to merge 4 commits into
localai-org-maint-bot wants to merge 4 commits into
Conversation
Expose embedding and reranker model overrides in agent settings. Resolve models per user and collection, retain the pool embedding default, and check explicit selections against the owning user model allowlist. Preserve original agent names for embedded lookups and resolve normalized REST collection names only when they identify a single agent. Document embedding resets and the restart requirement for external sources. Assisted-by: Codex:GPT-6
Pin the pending LocalAGI dependency so reviewers can test the integration. Add a UI regression for capability filtering and saved model selections. Replace the fork pin after LocalAGI PR #499 merges. Assisted-by: Codex:GPT-6
Explicitly discard errors stored by GORM and response write results in mock handlers to satisfy errcheck. Assisted-by: Codex:gpt-6
The save icon contributes to the button accessible name. Match the text suffix so the knowledge-base selector test reaches the POST assertion. Assisted-by: Codex:gpt-6
localai-org-maint-bot
force-pushed
the
feat/agent-kb-models-11753
branch
from
September 20, 2026 03:06
6d90666 to
7281707
Compare
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.
Description
Closes #11753.
Agents can select embedding and reranker models in Model Settings or through
embedding_modelandreranker_modelin their configuration. Empty settings retain the pool embedding default and semantic-only search. Both standalone and distributed agents resolve settings within the owning user's namespace and check explicit selections against that user's model allowlist.The shared runtime preserves embedding identities across restarts, rejects incompatible model changes until reset, and preserves document metadata when reranking. Documentation explains defaults, reindexing, and the restart needed after resetting collections with external sources. Optional OCR is deferred.
Notes for Reviewers
Depends on mudler/LocalAGI#499. This PR remains draft until that merges.
go.modtemporarily pins its reviewed commit through the bot fork; replace that directive with the upstream version before merging.Validation passed:
go test ./core/services/agents -count=1 -ginkgo.skip='AgentStore|runDueAgents'go test ./core/services/agentpool -count=1 -ginkgo.focus='knowledge-base models'Go regressions cover configuration serialization, metadata, user isolation, normalized names, upload/search model selection, dynamic reranking, and model permission failures. The Playwright test checks capability filtering and the saved payload. Browser execution and Docker-dependent suites could not run in this container. No coverage gates were changed.
Signed commits
Assisted-by: Codex:GPT-6