Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for configuring and syncing Marketplace agent categories from the YAML config into the database.
Changes:
- Extends the example config to include Marketplace category settings.
- Adds a new
syncCategoriesutility to upsert/delete custom categories and toggle default categories. - Triggers category sync during custom config load when Marketplace is enabled.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| librechat.example.yaml | Documents new Marketplace category configuration options. |
| api/server/utils/agentCategory.js | Implements DB synchronization for default/custom agent categories. |
| api/server/services/Config/loadCustomConfig.js | Calls category sync during config loading when Marketplace is enabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4da3289b22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
I could use this. do we have any plan for this? |
b90fc09 to
30c56e1
Compare
|
@Educg550
syncCategories derives the label from the YAML value: label: cat.value.toString().trim(), So YAML-declared categories always render in whatever language the admin typed, even for users on a different UI locale — while the DB-seeded defaults localize correctly. For a deployment where users switch between Japanese, English,...., that's a blocker. Would an optional label field be in scope? Something like: list:
general is hardcoded as the fallback category in three places: packages/data-schemas/src/schema/agent.ts#L104 — category: { default: 'general' } Keeping general always active, or letting custom entries override defaults, would avoid it.
This feature is exactly what we need — our current category set doesn't match how our internal teams actually use agents, and the alternative for us is patching the hardcoded defaults in our fork, which we'd rather avoid. We're holding off on that in the hope this lands. Also +1 to @nbhadauria 's question above — is there anything blocking this from moving forward? Happy to test any changes against our deployment if that helps. |
|
@duan-levan hey, thks for the reply. Here my considerations: 1. Localizable labels. Yep, 3. Overriding defaults. Doing it, but I'll keep overridden rows at 2. I'd like to split it, though. Now, in this PR: Later, as its own issue: making the fallback category configurable, which means pulling the |
253aa83 to
0236907
Compare
|
@Educg550 On 3: I independently verified the ordering you describe. await runAsSystem(seedDatabase) is at On 2: agreed, and the interim guard covers my case — I want to keep general as the fallback anyway, I just need to relabel it. Making the fallback configurable really is a separate question with migration implications; a focused issue is the right home for it. One thing I noticed while checking the above, which may or may not be in scope: syncCategories runs inside loadCustomConfig, which is the cache-miss path of getAppConfig ( The delete pass (deleteCategory for every custom: true row not in config) becomes a request-time destructive operation rather than a startup-only one. Happy to test the branch against our deployment once label and the override guard land. |
0236907 to
e983953
Compare
|
👋 Thanks for the contribution! LibreChat merges all changes into Nothing is needed from you; your commits, reviews and discussion are unchanged. If the diff now shows files you did not touch, rebase onto git remote add upstream https://github.com/LibreChat-AI/LibreChat.git
git fetch upstream dev
git rebase upstream/dev
git push --force-with-leaseMaintainers: apply the |
e983953 to
2a620e5
Compare
Summary
Now, it is possible to use a new syntax in
librechat.yamlto add categories. They are ordered according to the list declared in the YAML, always prioritizing the default categories first if enabled:Closes #9287, further implementation details are described in #9604.
Documentation added in librechat.ai repo at LibreChat-AI/docs#587
Change Type
Testing
Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.
Test Configuration:
Checklist