-
Notifications
You must be signed in to change notification settings - Fork 45
🤖 feat: add admin policy file enforcement #1933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 774cd1446a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
2a04492 to
7f21b43
Compare
|
@codex review Addressed the outstanding review threads:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3efccb87d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const selectableProviders = visibleProviders.filter( | ||
| (provider) => !HIDDEN_PROVIDERS.has(provider) | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter settings model dropdowns by policy
Policy filtering is only applied to the provider list used for adding custom models here, but the default/compaction model selectors still use the unfiltered getSuggestedModels(config) list later in this component. When an admin policy restricts providers/models, users can still select disallowed models in Settings, and subsequent sends fail with policy_denied. Consider driving those dropdowns from the policy-filtered list (e.g., useModelsFromSettings().models) or filtering allModels against the effective policy.
Useful? React with 👍 / 👎.
Summary
MUX_POLICY_FILE) that is loaded at startup and refreshed every 15 minutes.sshvsssh+coderdistinction)minimum_client_version)Background
Implementation
PolicyServiceparses a strict JSON policy file (JSON.parse), validates it with zod, and publishes an effective (normalized) policy via ORPC.Validation
make static-checkRisks
Generated with
mux• Model:openai:gpt-5.2• Thinking:high• Cost:$20.21