modelSpecs.list requires min 1 entry, preventing agents-only UX with addedEndpoints #12167
eric-chamberlain-tw
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment 2 replies
-
|
I think this is not intended, because it's meant to generally add endpoint options on top of model specs. Seems like this could be an independent feature, though! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
When using
addedEndpoints: [agents]to show only the Agents endpoint in the UI, the Zod schema requiresmodelSpecs.listto have at least 1 entry (.min(1)inspecsConfigSchema). This makes it impossible to configure an agents-only UX where no raw model specs are shown:The
addedEndpointsfield was added in config v1.2.4 (PR #6650) specifically to keep endpoints likeagentsvisible alongside model specs. However, the.min(1)constraint onlistpredatesaddedEndpointsand was never relaxed, so there's no valid config that shows only agents with no raw model specs.Additionally,
processModelSpecsinpackages/data-schemas/src/app/specs.tsreturnsundefinedwhenlistis empty (line 39), which would discardaddedEndpointseven if the schema check were bypassed.Expected behavior
modelSpecs.listshould accept an empty array (or be optional) whenaddedEndpointsis provided, allowing configurations like agents-only UX without needing a dummy spec entry.Suggested fix
In
packages/data-provider/src/models.ts:And update
processModelSpecsinpackages/data-schemas/src/app/specs.tsto not discardaddedEndpointswhenlistis empty.Version Information
Commit
9054ca9c1(current main)Steps to Reproduce
librechat.yamlwithmodelSpecs.enforce: true,addedEndpoints: [agents], andlist: []Invalid custom config file... Array must contain at least 1 elementCode of Conduct
Beta Was this translation helpful? Give feedback.
All reactions