mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 05:52:10 +00:00
* 🏷️ feat: Hide and Rename Custom Endpoints by Name in Config Profiles Config profiles merge `endpoints.custom` over librechat.yaml entry by entry on `name`, but could not take one entry away. A tombstone that named one, such as `endpoints.custom["Name"]`, passed every check, was stored with a 200 and did nothing, because the merge removes object paths only and stops at arrays; a tombstone at a position (`endpoints.custom.0.headers`) was stored and did nothing either. Renaming a profile's own endpoint through PUT or PATCH lost its stored key, since the `renames` hint covered MCP servers only. POST `/fields/tombstone`, DELETE `/fields` and the `tombstone` and `unset` ops of a change batch now take a keyed path, `endpoints.custom["<name>"]` or `endpoints.custom["<name>"].<path>`, whose name is a JSON string compared as the merge folds it. A tombstone hides the inherited endpoint, or one of its fields or record keys, for the profile's principals and removes the profile's own entry or path; hiding an endpoint also hides the model specs that select it, whether librechat.yaml or a lower profile defines it. An unset resets the profile's own entry or path with the keyed tombstones at or below it, and writing an entry clears the tombstone that hides it whole. Malformed keyed paths, keyed paths after arrays not merged by key, the entry's name, its key, preview or destination fingerprint, keyed writes and positional tombstones answer 400, and the store's keyed mutations refuse a location whose stored tombstone would name another path. A `segments` target names keys as written on every route, so a segment such as `custom["Name"]` never reaches an entry past these guards: a write by it stores a key of that spelling and clears none of the entry's tombstones. A stored tombstone reads as keyed only after an array merged by key, so an older one such as `mcpServers.a["b"]` keeps hiding that server. PUT and PATCH `renames` also take `{ path: 'endpoints.custom', previousName, name }`: the renamed entry gets the stored ciphertext and preview, and the keyed tombstones of the old name move to the new one, as they do for a batch `rename`. The carried key stays bound to its destination (400 `CONFIG_SECRET_REENTRY_REQUIRED` when the renamed entry sends it elsewhere) and keeps the destination fingerprint it was entered with; a hint that cannot apply answers 400 `CONFIG_RENAME_INVALID` with a reason. Removing the destination of a profile's own keyed entry beside its stored key needs the key again, and removing an inherited one drops the inherited key at merge and lists it in `ignored`. The merge-key registry moves to its own module so mutations can match entries by identity without an import cycle. Meta reports `keyedTombstones` and `renameHints`, `rules.renameHintPaths` and `limits.maxEntryKeyLength`, and `docs/endpoint-overrides.md` documents the contract. * 🙈 fix: Scope Hidden Endpoint Allow-Lists and Refuse Duplicate Rename Sources - A hidden custom endpoint leaves endpoints.agents.allowedProviders as it leaves modelSpecs; scopeHiddenEndpointSpecs becomes scopeHiddenEndpointReferences. - modelSpecs collapses only when no spec and no added endpoint remain, so unrelated addedEndpoints survive when the hidden endpoint owned every spec (tenant scoping shares the helper). - An addedEndpoints or allowedProviders list that names only hidden endpoints is kept whole: an empty list allows every endpoint. - Two endpoints.custom rename hints from one previousName answer CONFIG_RENAME_INVALID duplicate_source; MCP hints may still duplicate a server. * 🔀 fix: Keep Keyed Tombstones Whole Across Dev's Patch Steps, Write Report and Resolved API - PATCH resets (dev's request-ordered steps) still move a renamed entry's keyed tombstones, in validation and in the stored state; lifted tombstones come from one data-schemas helper for both paths. - The write report of POST /fields/tombstone and DELETE /fields names a keyed location by its keyed path, collection, key and entryPath, as a change ref does, instead of the bare collection. - resolveConfigLayers scopes the model specs and allow-lists of hidden endpoints as getAppConfig does, so the resolved API keeps its parity. - GET /meta reports maxEntryKeyLength beside dev's catalogModelsTtlMs. |
||
|---|---|---|
| .. | ||
| permissions | ||
| endpoint-overrides.md | ||
| mcp-apps.md | ||
| mcp-overrides.md | ||
| run_files.md | ||
| skills-management-api.md | ||
| tool-approval-modes.md | ||
| workspace-checkouts.md | ||