Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Configuration loading drops the policy, model filtering breaks agents-only deployments, and case-folding conflates distinct provider identities.
3 open findings
What changed in this PR
Adds deployment-controlled per-user endpoint allowlists to restrict provider visibility and normal chat requests.
Changes:
- Defines allowlist configuration and protects it from principal overrides.
- Adds endpoint, model catalog, and model-spec filtering.
- Adds chat authorization guards and regression tests.
| File | Description |
|---|---|
| packages/data-schemas/src/types/app.ts | Adds runtime policy typing. |
| packages/data-schemas/src/app/resolution.spec.ts | Tests deployment-only policy ownership. |
| packages/data-provider/src/config.ts | Defines and protects allowlist configuration. |
| packages/data-provider/src/config.spec.ts | Tests policy validation. |
| packages/api/src/endpoints/config/userAccess.ts | Implements access and filtering helpers. |
| packages/api/src/endpoints/config/userAccess.spec.ts | Tests policy matching and filtering. |
| packages/api/src/endpoints/config/index.ts | Exports policy helpers. |
| packages/api/src/endpoints/config/endpoints.ts | Filters endpoint catalogs. |
| packages/api/src/endpoints/config/endpoints.spec.ts | Tests user-scoped endpoint visibility. |
| api/server/routes/config.js | Filters returned model specs. |
| api/server/routes/__tests__/config.spec.js | Tests model-spec visibility. |
| api/server/middleware/validateModel.js | Adds endpoint authorization. |
| api/server/middleware/buildEndpointOption.js | Guards provider request construction. |
| api/server/middleware/__tests__/validateModel.spec.js | Tests unauthorized endpoint rejection. |
| api/server/middleware/__tests__/buildEndpointOption.userAccess.spec.js | Tests early request rejection. |
| api/server/controllers/ModelController.spec.js | Tests model catalog filtering. |
| api/server/controllers/ModelController.js | Filters model catalogs through endpoint visibility. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cidrblock
force-pushed
the
feat/user-endpoint-access
branch
from
October 15, 2026 20:39
46e2dc8 to
bebc7e4
Compare
cidrblock
force-pushed
the
feat/user-endpoint-access
branch
from
October 15, 2026 20:53
bebc7e4 to
cf9537d
Compare
This branch has not been deployed
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.


Summary
endpoints.userAccessrules mapping a username to exact allowed provider endpoint names. Matching is case-insensitive; endpoint names use LibreChat normalization.Verification
Fixtures use generic user and endpoint names. This PR is separate from MCP App tool approval.